From 6762f7a204a43e2cf4eaae3503d0621d224d4d88 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期一, 20 一月 2025 09:14:55 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java |    6 ++----
 ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java                                |    1 -
 ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java                             |   13 ++-----------
 ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml             |    2 +-
 4 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java
index 27ae4ad..13b6d0b 100644
--- a/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java
+++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java
@@ -93,7 +93,6 @@
 		}
 		if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
 			recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, "用户已停用,请联系管理员");
-//			throw new ServiceException("对不起,您的账号:" + username + " 已停用");
 			throw new ServiceException("您所属门店已被冻结,请联系平台");
 		}
 		if (user.getRoleType()==2){
diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
index 47783e0..0927dc0 100644
--- a/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
+++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
@@ -40,8 +40,7 @@
         return CacheConstants.PWD_ERR_CNT_KEY + username;
     }
 
-    public void validate(SysUser user, String password, HttpServletRequest request)
-    {
+    public void validate(SysUser user, String password, HttpServletRequest request) {
         String username = user.getUserName();
 
         Integer retryCount = redisService.getCacheObject(getCacheKey(username));
@@ -63,15 +62,7 @@
             recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, String.format("密码输入错误%s次", retryCount));
             redisService.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES);
             throw new ServiceException("密码错误");
-        }
-//        if (!user.getPassword().equals(password)){
-//            retryCount = retryCount + 1;
-//            recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, String.format("密码输入错误%s次", retryCount));
-//            redisService.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES);
-//            throw new ServiceException("密码错误");
-//        }
-        else
-        {
+        } else {
             clearLoginRecordCache(username);
         }
     }
diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java
index 9ff04a5..b6e6633 100644
--- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java
+++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java
@@ -117,11 +117,9 @@
     
     
     public static void main(String[] args) {
-        String s = encryptPassword("ad23a8ac3c902145ffe05df05812b1f0");
+        String s = encryptPassword("0192023a7bbd73250516f069df18b500");
         System.err.println(s);
-//        System.err.println(s);
 
-        System.err.println(matchesPassword("6ac9d3a5c7639060425fadd6db3d305e","$2a$10$M.L9orN4p8y6aLvBhOm9hevAmi0YXAPuWIHZrAyEAKGW3x8B4/0d."));
-        System.err.println(matchesPassword("ad23a8ac3c902145ffe05df05812b1f0","$2a$10$Rw0A4NjcdqnNrImdOn4EI.z.Ib.XfpY01NPPs9kSsF42JxGrMrJBy"));
+        System.err.println(matchesPassword("c4ca4238a0b923820dcc509a6f75849b", "$2a$10$/7z/wiZ2ejTjD4GQuuyiSe1ptS8uoxrRAUlGCitiLEmpOO78cISeq"));
     }
 }
diff --git a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
index c447ba3..8e71190 100644
--- a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
+++ b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
@@ -20,7 +20,7 @@
             t_seckill_activity_info tsai
                 LEFT JOIN t_goods tg ON tsai.good_id = tg.id
                 LEFT JOIN t_goods_seckill tgs ON tgs.seckill_activity_info_id = tsai.id and tgs.vip = #{vipId}
-        WHERE tsai.is_shelves = 1 AND tsai.del_flag = 0 and tsai.end_time &lt; now()
+        WHERE tsai.is_shelves = 1 AND tsai.del_flag = 0 and tsai.end_time >= now()
         <if test="name != null and name != ''">
             AND tg.`name` LIKE concat('%',#{name},'%')
         </if>

--
Gitblit v1.7.1