|
@ -168,6 +168,8 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
|
private String wechatId;
|
|
|
@Value("${wechat.id}")
|
|
|
private String wxId;//微信id
|
|
|
@Value("${spring.profiles}")
|
|
|
private String springProfile;//环境
|
|
|
@Value("${kick.eachOther}")
|
|
|
private String kickEachOther;
|
|
|
@Autowired
|
|
@ -188,6 +190,8 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
|
private BaseDoctorDao baseDoctorDao;
|
|
|
@Resource
|
|
|
private WechatService wechatService;
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
|
|
|
@PostConstruct
|
|
|
private void init() {
|
|
@ -429,7 +433,11 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
|
}
|
|
|
|
|
|
//账户密码登录的才验证密码强度
|
|
|
if ("hz_yyyzh_wx".equals(wechatId)) {
|
|
|
if ("hz_yyyzh_wx".equals(wechatId)||
|
|
|
"iottest".equals(springProfile)||//物联网
|
|
|
"iotprod".equals(springProfile)||//物联网
|
|
|
"iotprodIn".equals(springProfile)//物联网
|
|
|
) {
|
|
|
String grant_type = parameters.get("grant_type");
|
|
|
if ("password".equals(grant_type)) {
|
|
|
if (!testPwd(parameters.get("password"))) {
|
|
@ -3095,6 +3103,37 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/oauth/updateUserPw", method = RequestMethod.POST)
|
|
|
@ApiOperation("修改后台管理员密码")
|
|
|
public Envelop updateUserPw(String mobile,String client_id,String captcha,String pw) throws Exception{
|
|
|
if ("iottest".equals(springProfile)||//物联网
|
|
|
"iotprod".equals(springProfile)||//物联网
|
|
|
"iotprodIn".equals(springProfile)//物联网
|
|
|
){
|
|
|
WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyhospitalSysdictDao.findDictById("isNeedSMS");
|
|
|
if (wlyyHospitalSysDictDO!=null&&!StringUtils.isEmpty(wlyyHospitalSysDictDO.getDictValue())){
|
|
|
if (captcha.equalsIgnoreCase(wlyyHospitalSysDictDO.getDictValue())){
|
|
|
|
|
|
}else {
|
|
|
return ObjEnvelop.getError("验证码错误!");
|
|
|
}
|
|
|
}else if (wlyyRedisVerifyCodeService.verification(client_id, mobile, captcha)) {
|
|
|
//验证码正确
|
|
|
} else {
|
|
|
return ObjEnvelop.getError("验证码错误!");
|
|
|
}
|
|
|
|
|
|
if (!testPwd(pw)) {
|
|
|
throw new PwdException("密码强度低,密码长度不低于8位且应包含字母数字特殊字符3种");
|
|
|
}
|
|
|
String rs = userService.updateUserDoPw(mobile,pw);
|
|
|
if("ok".equals(rs)){
|
|
|
return ObjEnvelop.getSuccess("修改成功!");
|
|
|
}
|
|
|
return ObjEnvelop.getError("手机号未注册!");
|
|
|
}
|
|
|
return ObjEnvelop.getError("未知错误!");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 登陆
|