瀏覽代碼

fix refund

he2802 2 年之前
父節點
當前提交
703b509fb8

+ 7 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/system/SysUserController.java

@@ -21,6 +21,7 @@ import com.zhongzheng.common.exception.user.UserPasswordNotMatchException;
 import com.zhongzheng.common.utils.MessageUtils;
 import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.common.utils.ServletUtils;
+import com.zhongzheng.common.utils.ToolsUtils;
 import com.zhongzheng.common.utils.poi.ExcelUtil;
 import com.zhongzheng.framework.manager.AsyncManager;
 import com.zhongzheng.framework.manager.factory.AsyncFactory;
@@ -163,6 +164,9 @@ public class SysUserController extends BaseController
             return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
         }
         user.setCreateBy(SecurityUtils.getUsername());
+        if(!ToolsUtils.verifPwd(user.getPassword())){
+            throw new CustomException("密码应由8-16位数字、大小写字母、符号组成");
+        }
         user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
         return toAjax(userService.insertUser(user));
     }
@@ -216,6 +220,9 @@ public class SysUserController extends BaseController
                 }
 
             }
+            if(!ToolsUtils.verifPwd(user.getPassword())){
+                throw new CustomException("密码应由8-16位数字、大小写字母、符号组成");
+            }
             user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
         }
         user.setUpdateBy(SecurityUtils.getUsername());

+ 0 - 1
zhongzheng-common/src/main/java/com/zhongzheng/common/config/WxSmallConfig.java

@@ -60,7 +60,6 @@ public class WxSmallConfig extends WXPayConfig {
 
     }
 
-    //安全证书放在项目resources写法
     @Override
     public InputStream getCertStream() {
         try {