|
@@ -97,6 +97,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
private String dcFirst;
|
|
private String dcFirst;
|
|
@Value("${spring.ldap.base.dcSecond}")
|
|
@Value("${spring.ldap.base.dcSecond}")
|
|
private String dcSecond;
|
|
private String dcSecond;
|
|
|
|
+ @Value("${configEnv.isPrivateDeploy}")
|
|
|
|
+ private boolean isPrivateDeploy;
|
|
|
|
|
|
public static final String GET_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
|
|
public static final String GET_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
|
|
public static final String GET_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=accessToken&openid=openId&lang=zh_CN";
|
|
public static final String GET_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=accessToken&openid=openId&lang=zh_CN";
|
|
@@ -2180,13 +2182,17 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
UserVcode item = new UserVcode();
|
|
UserVcode item = new UserVcode();
|
|
item.setMobile(mobile);
|
|
item.setMobile(mobile);
|
|
item.setVcode(""+vcode);
|
|
item.setVcode(""+vcode);
|
|
-// userVcodeMapper.insert(item);
|
|
|
|
- SendSmsResponse sendSmsResponse = SmsUtil.sendSms(mobile, "" + vcode);
|
|
|
|
- if (!sendSmsResponse.getBody().getCode().equals("OK")) {
|
|
|
|
- msg.setError(sendSmsResponse.getBody().getMessage());
|
|
|
|
- } else {
|
|
|
|
|
|
+ if (isPrivateDeploy) {
|
|
userVcodeMapper.insert(item);
|
|
userVcodeMapper.insert(item);
|
|
|
|
+ } else {
|
|
|
|
+ SendSmsResponse sendSmsResponse = SmsUtil.sendSms(mobile, "" + vcode);
|
|
|
|
+ if (!sendSmsResponse.getBody().getCode().equals("OK")) {
|
|
|
|
+ msg.setError(sendSmsResponse.getBody().getMessage());
|
|
|
|
+ } else {
|
|
|
|
+ userVcodeMapper.insert(item);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
|