|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.ucenter.service.impl;
|
|
|
|
|
|
+import cn.hutool.crypto.digest.MD5;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.common.constant.ConstantRegex;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
@@ -88,7 +89,7 @@ public class LoginService {
|
|
|
}else {
|
|
|
password = Base64Converter.decode(Base64Converter.subText(param.getPassword()));
|
|
|
}
|
|
|
- String passwordCode = SecurityUtil.MD5(password);
|
|
|
+ String passwordCode = MD5.create().digestHex(password).toUpperCase();
|
|
|
User user = userService.getByUserName(param.getPhoneNum());
|
|
|
if(user == null){
|
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3015, LoginConstant.FAILURE_MSG_3015);
|
|
@@ -155,9 +156,7 @@ public class LoginService {
|
|
|
}else {
|
|
|
password = Base64Converter.decode(Base64Converter.subText(param.getPassword()));
|
|
|
}
|
|
|
- if(!password.matches(ConstantFilePath.PASSWORD_REGEX)){
|
|
|
- throw new BusinessException(LoginConstant.FAILURE_CODE_3011, LoginConstant.FAILURE_MSG_3011);
|
|
|
- }
|
|
|
+
|
|
|
if (!param.getConfirmPwd().equals(param.getPassword())){
|
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3009, LoginConstant.FAILURE_MSG_3009);
|
|
|
}
|
|
@@ -280,7 +279,8 @@ public class LoginService {
|
|
|
if(!param.getMsgAuthCode().equals(registerValidCode)){
|
|
|
checkSms(param.getMsgAuthCode(),param.getPhoneNum(),true);
|
|
|
}
|
|
|
- String pwdMd5 = SecurityUtil.MD5(password);
|
|
|
+ String pwdMd5 = MD5.create().digestHex(password).toUpperCase();
|
|
|
+
|
|
|
userService.updatePassword(param.getPhoneNum(), pwdMd5);
|
|
|
}
|
|
|
|