2 Commits 341ff469c5 ... 30b8e05ba0

Autore SHA1 Messaggio Data
  wch 30b8e05ba0 Merge remote-tracking branch 'origin/master' 2 anni fa
  wch b7e62f67f6 修改登录密码初始设定 2 anni fa

+ 4 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -135,6 +135,10 @@ public class SysUserController extends BaseController
         {
             return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在");
         }
+        else if (!user.getPassword().substring(0,1).matches("^[A-Za-z]$") )
+        {
+            return error("密码首位必须为字母");
+        }
         else if (StringUtils.isNotEmpty(user.getEmail())
                 && UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
         {

+ 1 - 1
ruoyi-admin/src/main/resources/templates/system/user/add.html

@@ -68,7 +68,7 @@
                         <label class="col-sm-4 control-label is-required">登录密码:</label>
                         <div class="col-sm-8">
                             <div class="input-group">
-                                <input id="password" name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
+                                <input id="password" name="password" placeholder="请输入登录密码,需字母数字组合且长度不小于5" class="form-control" type="password" th:value="hndj12345" required>
                                 <span class="input-group-addon" title="登录密码,鼠标按下显示密码"
                                     onmousedown="$('#password').attr('type','text')"
                                     onmouseup="$('#password').attr('type','password')"><i class="fa fa-key"></i></span>

+ 4 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/service/SysRegisterService.java

@@ -48,6 +48,10 @@ public class SysRegisterService
         {
             msg = "用户密码不能为空";
         }
+        else if (!password.substring(0,1).matches("^[A-Za-z]$") )
+        {
+            msg = "密码首位必须为字母";
+        }
         else if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
                 || password.length() > UserConstants.PASSWORD_MAX_LENGTH)
         {

+ 1 - 1
ruoyi-hndj/src/main/java/com/ruoyi/alliance/womenCommissionStaff/controller/WomenCommissionStaffController.java

@@ -126,7 +126,7 @@ public class WomenCommissionStaffController extends BaseController
                 user.setUserName(name);
                 user.setPhonenumber(phone);
                 user.setSalt(ShiroUtils.randomSalt());
-                user.setPassword(passwordService.encryptPassword(simpleSpell, "12345", user.getSalt()));
+                user.setPassword(passwordService.encryptPassword(simpleSpell, "hndj12345", user.getSalt()));
                 user.setCreateBy(ShiroUtils.getLoginName());
                 user.setCreateTime(DateUtils.getNowDate());
                 userService.insertUser(user);

+ 0 - 12
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/noticeTask.java

@@ -1,25 +1,13 @@
 package com.ruoyi.quartz.task;
 
-import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.daily.getui.env.PushApiUtil;
 import com.ruoyi.daily.notice.domain.Notice;
 import com.ruoyi.daily.notice.service.INoticeService;
-import com.ruoyi.party.partychangecheck.domain.PartyChangeCheck;
-import com.ruoyi.party.partychangecheck.service.IPartyChangeCheckService;
-import com.ruoyi.party.partychargedetails.domain.PartyChargeDetails;
-import com.ruoyi.party.partychargedetails.service.IPartyChargeDetailsService;
-import com.ruoyi.party.partychargestandard.domain.PartyChargeStandard;
-import com.ruoyi.party.partychargestandard.serviice.IPartyChargeStandardService;
-import com.ruoyi.system.mapper.SysDeptMapper;
-import com.ruoyi.system.service.ISysDeptService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.util.Calendar;
 import java.util.List;
-import java.util.UUID;
 import java.util.stream.Collectors;
 
 /**