wujiefeng 11 月之前
父节点
当前提交
ae8d032447

+ 2 - 9
RewardServer/src/main/java/com/zhongshu/reward/server/core/service/WxTransferService.java

@@ -29,22 +29,15 @@ import com.zhongshu.reward.server.core.domain.Wallet;
 import com.zhongshu.reward.server.core.domain.WxTransferBatch;
 import com.zhongshu.reward.server.core.util.DateUtils;
 import com.zhongshu.reward.server.core.util.JedisUtil;
-import com.zhongshu.reward.server.core.util.RedisDistributedLock;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
-import org.springframework.data.mongodb.core.aggregation.DateOperators;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import redis.clients.jedis.Jedis;
 
+import javax.annotation.Resource;
 import java.math.BigDecimal;
-import java.time.LocalDateTime;
-import java.time.temporal.TemporalAdjuster;
-import java.time.temporal.TemporalAdjusters;
 import java.util.*;
-import java.util.concurrent.locks.ReentrantLock;
 import java.util.stream.Collectors;
 
 /**
@@ -82,7 +75,7 @@ public class WxTransferService {
     @Autowired
     DBHelper dbHelper;
 
-    @Autowired
+    @Resource
     JedisUtil jedisUtil;
     private static final String TRANSFER = "com:zswl:reward:wxtransfer";
 

+ 2 - 2
RewardServer/src/main/java/com/zhongshu/reward/server/core/util/ext/RedisExtProperties.java

@@ -21,8 +21,8 @@ public class RedisExtProperties {
     @Value("${spring.redis.port}")
     private int port;
 
-//    @Value("${spring.redis.password}")
-//    private String password;
+    @Value("${spring.redis.password}")
+    private String password;
 
     @Value("${spring.redis.database}")
     private Integer database;

+ 5 - 0
RewardServer/src/main/resources/application-dev.yml

@@ -16,6 +16,11 @@ spring:
         max-idle: 16  # 连接池中的最大空闲连接
         min-idle: 5  # 连接池中的最小空闲连接
         max-wait: 30000 # 当池耗尽时,在引发异常之前,连接分配应阻塞的最长时间(毫秒)
+  cloud:
+    consul:
+      discovery:
+        prefer-ip-address: false
+        hostname: 192.168.110.241
 
 swagger:
   packageName: "com.zhongshu.reward.server.core.controller"