he2802 2 лет назад
Родитель
Сommit
ee78b9ce95

+ 1 - 1
zhongzheng-common/src/main/java/com/zhongzheng/common/type/EncryptHandler.java

@@ -17,7 +17,7 @@ public class EncryptHandler  implements TypeHandler<String> {
 
     private static final byte[] KEYS = "base20230213zzkj".getBytes(StandardCharsets.UTF_8);
 
-    public static final boolean ENCRYPT_STATUS = true; //是否开启字段加密
+    public static final boolean ENCRYPT_STATUS = false; //是否开启字段加密
 
 
 

+ 15 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -47,6 +47,7 @@ import com.zhongzheng.modules.grade.vo.ClassGradeUserGoodsVo;
 import com.zhongzheng.modules.inform.domain.InformSysUser;
 import com.zhongzheng.modules.order.domain.OrderBillGoods;
 import com.zhongzheng.modules.order.domain.OrderGoodsRefund;
+import com.zhongzheng.modules.system.service.ISysConfigService;
 import com.zhongzheng.modules.user.bo.*;
 import com.zhongzheng.modules.user.domain.*;
 import com.zhongzheng.modules.user.entity.ClientLoginUser;
@@ -126,6 +127,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
     @Autowired
     private IUserLoginErrorService iUserLoginErrorService;
+    @Autowired
+    private  ISysConfigService configService;
 
 
     @Override
@@ -1127,6 +1130,18 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         if(Validator.isEmpty(bo.getAccount())){
             throw new CustomException("账号不能为空");
         }
+       /* String dualAuth = configService.selectConfigByKey("login.dual.auth");
+        if(Validator.isNotEmpty(dualAuth)&&dualAuth.equals("1")){
+            String key = Constants.LOGIN_SMS + bo.getTel();
+            String code =  redisCache.getCacheObject(key);
+            if(code==null){
+                throw new CustomException("验证码错误");
+            }
+            if(!code.equals(bo.getCode())){
+                iUserLoginErrorService.saveErrorLog(bo.getTel());
+                throw new CustomException("验证码错误");
+            }
+        }*/
         iUserLoginErrorService.checkLimit(bo.getAccount());
         LambdaQueryWrapper<User> queryWrapper =new LambdaQueryWrapper<User>();
         queryWrapper.and(wq -> wq

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserAppAccountLoginBo.java

@@ -24,4 +24,9 @@ public class UserAppAccountLoginBo {
     private String pwd;
     @ApiModelProperty("活动分销码")
     private String shareActivityCode;
+
+    @ApiModelProperty("手机号")
+    private String tel;
+    @ApiModelProperty("验证码")
+    private String code;
 }