yegang 2 years ago
parent
commit
6e8c680c32
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/java/com/sw/controller/SpikeController.java

+ 1 - 1
src/main/java/com/sw/controller/SpikeController.java

@@ -45,7 +45,7 @@ public class SpikeController {
             return "用户不存在";
         }
         //2.是否已经抢购成功
-        Boolean successUser = redisTemplate.opsForSet().isMember("success", uid);
+        Boolean successUser = redisTemplate.opsForSet().isMember("success-" + mid, uid);
         if (successUser) {
             return "一个用户只能抢购一次";
         }