|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.epmet.controller; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.exception.ErrorCode; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.RSASignature; |
|
|
@ -98,7 +99,15 @@ public class LoginController { |
|
|
|
//效验数据
|
|
|
|
ValidatorUtils.validateEntity(formDTO); |
|
|
|
//解密密码
|
|
|
|
if (formDTO.getPassword().length() > 50) { |
|
|
|
if (formDTO.getPhone().length() > NumConstant.FIFTY) { |
|
|
|
String phone = RSASignature.decryptByPrivateKey(formDTO.getPhone(), privateKey); |
|
|
|
formDTO.setPhone(phone); |
|
|
|
} |
|
|
|
if (formDTO.getMobile().length() > NumConstant.FIFTY) { |
|
|
|
String phone = RSASignature.decryptByPrivateKey(formDTO.getMobile(), privateKey); |
|
|
|
formDTO.setMobile(phone); |
|
|
|
} |
|
|
|
if (formDTO.getPassword().length() > NumConstant.FIFTY) { |
|
|
|
String confirmNewPassWord = RSASignature.decryptByPrivateKey(formDTO.getPassword(), privateKey); |
|
|
|
formDTO.setPassword(confirmNewPassWord); |
|
|
|
} |
|
|
|