yegang %!s(int64=2) %!d(string=hai) anos
pai
achega
6e8c680c32
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 "一个用户只能抢购一次";
         }