Pārlūkot izejas kodu

删除无用代码

xueyiming 5 mēneši atpakaļ
vecāks
revīzija
b7774bbc5d

+ 1 - 1
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/component/RedisLock.java

@@ -15,8 +15,8 @@ public class RedisLock {
 
     public boolean tryLock(String lockKey, String lockValue, long expireTime, TimeUnit timeUnit) {
         ValueOperations<String, Object> valueOps = redisTemplate.opsForValue();
-        Boolean result = valueOps.setIfAbsent(lockKey, lockValue, expireTime, timeUnit);
         // setIfAbsent 方法会在键不存在时设置键值对,并返回是否成功
+        Boolean result = valueOps.setIfAbsent(lockKey, lockValue, expireTime, timeUnit);
         return result != null && result;
     }
 

+ 0 - 4
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/controller/IndexController.java

@@ -11,10 +11,6 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/")
 public class IndexController {
 
-
-    @Autowired
-    MatchVideoServiceImpl matchVideoService;
-
     /**
      * 探活
      *