Browse Source

藏品 rid

wangqifan 3 years ago
parent
commit
1beff3a87a
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/main/java/com/izouma/nineth/service/DomainOrderService.java

+ 4 - 4
src/main/java/com/izouma/nineth/service/DomainOrderService.java

@@ -145,23 +145,23 @@ public class DomainOrderService {
         domainOrder.setUserName(user.getNickname());
         if (checkPoint.get()) {
             if (realName.length() < 5) {
-                increaseCount(userId, 1L);
+                increaseCount(userId, 1);
             }
         }
         return domainOrderRepo.save(domainOrder);
     }
 
-    public void increaseCount(Long userId, Long count) {
+    public void increaseCount(Long userId, Integer count) {
         BoundValueOperations<String, Object> ops = redisTemplate.boundValueOps(RedisKeys.DOMAIN_COUNT + userId);
         if (ops.get() == null) {
-            Boolean success = ops.setIfAbsent(count.intValue());
+            Boolean success = ops.setIfAbsent(count);
             log.info("创建redis域名统计:{}", success);
         }
         ops.increment(count);
     }
 
     public void decreaseCount(Long userId) {
-        increaseCount(userId, -1L);
+        increaseCount(userId, -1);
     }
 
     public AtomicBoolean checkPoint(Long userId) {