|
@@ -9,8 +9,8 @@ import com.yh.saas.plugin.yiliangyiyun.exception.AppServiceException;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.ExceptionDefinition;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.CommonUserMapper;
|
|
|
-import com.yh.saas.plugin.yiliangyiyun.notify.SMSClient;
|
|
|
-import com.yh.saas.plugin.yiliangyiyun.notify.SMSResult;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.util.SMSClient;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.util.SMSResult;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.ICommonUserService;
|
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.util.Const;
|
|
@@ -26,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
import java.sql.*;
|
|
|
-import java.util.Date;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -42,8 +41,8 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
|
@Autowired
|
|
|
private CacheComponent cacheComponent;
|
|
|
|
|
|
- @Autowired
|
|
|
- private SMSClient smsClient;
|
|
|
+// @Autowired
|
|
|
+// private SMSClient smsClient;
|
|
|
|
|
|
@Autowired
|
|
|
private CommonUserMapper commonUserMapper;
|
|
@@ -65,7 +64,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
|
private String gzhAppId;
|
|
|
@Value("122059c777309ff3efc7448ec8794fd5")
|
|
|
private String gzhAppSecret;
|
|
|
- @Value("${spring.liangxin.url1}jdbc:mysql://47.100.3.209:3306/talk-core?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true")
|
|
|
+ @Value("jdbc:mysql://47.100.3.209:3306/talk-core?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true")
|
|
|
private String url1;
|
|
|
@Value("root")
|
|
|
private String username1;
|
|
@@ -107,15 +106,15 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
|
*/
|
|
|
@Override
|
|
|
public String sendVerifyCode(String phone) throws ServiceException {
|
|
|
- String verifyCode = GeneratorUtil.genSixVerifyCode();
|
|
|
- System.out.println("verifyCode:"+verifyCode);
|
|
|
- SMSResult res = smsClient.sendRegisterVerify(phone, verifyCode);
|
|
|
- if (res.isSucc()) {
|
|
|
- cacheComponent.putRaw(VERIFY_CODE_PREFIX + phone, verifyCode, 300);
|
|
|
+// String verifyCode = GeneratorUtil.genSixVerifyCode();
|
|
|
+// System.out.println("verifyCode:"+verifyCode);
|
|
|
+// SMSResult res = smsClient.sendRegisterVerify(phone, verifyCode);
|
|
|
+// if (res.isSucc()) {
|
|
|
+// cacheComponent.putRaw(VERIFY_CODE_PREFIX + phone, verifyCode, 300);
|
|
|
return "ok";
|
|
|
- } else {
|
|
|
- throw new AppServiceException(res.getMsg(), ExceptionDefinition.USER_SEND_VERIFY_FAILED.getCode());
|
|
|
- }
|
|
|
+// } else {
|
|
|
+// throw new AppServiceException(res.getMsg(), ExceptionDefinition.USER_SEND_VERIFY_FAILED.getCode());
|
|
|
+// }
|
|
|
|
|
|
}
|
|
|
|