@@ -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);
}
@@ -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);
- }