|
|
@@ -12,6 +12,7 @@ import com.github.pagehelper.PageHelper;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.kym.common.R;
|
|
|
import com.kym.common.constant.ResponseEnum;
|
|
|
+import com.kym.common.exception.BusinessException;
|
|
|
import com.kym.common.utils.CommUtil;
|
|
|
import com.kym.common.utils.IDGenerator;
|
|
|
import com.kym.entity.admin.AdminUser;
|
|
|
@@ -65,6 +66,9 @@ public class AdminUserServiceImpl extends MPJBaseServiceImpl<AdminUserMapper, Ad
|
|
|
@Override
|
|
|
public R<?> login(String mobilePhone, String password) {
|
|
|
var user = lambdaQuery().eq(AdminUser::getMobilePhone, mobilePhone).one();
|
|
|
+ if(user.getStatus() == AdminUser.STATUS_禁用){
|
|
|
+ throw new BusinessException("用户状态异常,无法登录");
|
|
|
+ }
|
|
|
RSA rsa = new RSA(privateKey, publicKey);
|
|
|
password = rsa.decryptStr(password, KeyType.PrivateKey, StandardCharsets.UTF_8);
|
|
|
var pwd = MD5.digestHex(password.concat(MD5.digestHex(mobilePhone).substring(0, 5)));
|