yegang 2 yıl önce
ebeveyn
işleme
6e8c680c32

+ 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 "一个用户只能抢购一次";
         }