xusl 1 年間 前
コミット
e3a03ecd5e

+ 1 - 1
backend/src/main/java/com/jiayue/ssi/mapper/SysUserMapper.java

@@ -31,6 +31,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
      * @param password 新密码
      * @return 结果
      */
-    @Update("update sys_user t set t.password=#{password} where t.id=#{id}")
+    @Update("update sys_user t set t.password=#{password},t.last_update_pwd_time=null where t.id=#{id}")
     public int resetPassword(Long id, String password);
 }

+ 1 - 3
backend/src/main/java/com/jiayue/ssi/util/RandomPwd.java

@@ -86,12 +86,10 @@ public class RandomPwd {
 
     // 测试函数入口
     public static void main(String[] args) {
-        for (int i = 0; i < 10000; i++) {
+        for (int i = 0; i < 100; i++) {
             int num = 8;
             String str = getRandomPwd(num);
-            if (str.length()<4){
                 System.out.println(str);
-            }
 
         }
     }