Authored by chaogeng

update

@@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory; @@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory;
9 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
10 import org.springframework.stereotype.Component; 10 import org.springframework.stereotype.Component;
11 11
  12 +import javax.annotation.Resource;
12 import java.util.ArrayList; 13 import java.util.ArrayList;
13 import java.util.List; 14 import java.util.List;
14 15
@@ -17,7 +18,7 @@ public class RedisHashCache { @@ -17,7 +18,7 @@ public class RedisHashCache {
17 18
18 private final static Logger logger = LoggerFactory.getLogger(RedisHashCache.class); 19 private final static Logger logger = LoggerFactory.getLogger(RedisHashCache.class);
19 20
20 - @Autowired 21 + @Resource(name="yhHashOperations")
21 YHHashOperations<String, String, String> yhHashOperations; 22 YHHashOperations<String, String, String> yhHashOperations;
22 23
23 /** 24 /**
@@ -8,12 +8,14 @@ import org.slf4j.LoggerFactory; @@ -8,12 +8,14 @@ import org.slf4j.LoggerFactory;
8 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
9 import org.springframework.stereotype.Component; 9 import org.springframework.stereotype.Component;
10 10
  11 +import javax.annotation.Resource;
  12 +
11 @Component 13 @Component
12 public class RedisListCache { 14 public class RedisListCache {
13 15
14 private static Logger logger = LoggerFactory.getLogger(RedisListCache.class); 16 private static Logger logger = LoggerFactory.getLogger(RedisListCache.class);
15 17
16 - @Autowired 18 + @Resource(name="yhListOperations")
17 YHListOperations<String, String> yhListOperations; 19 YHListOperations<String, String> yhListOperations;
18 20
19 /** 21 /**
@@ -43,7 +43,7 @@ public class UnionOrderServiceImpl implements IUnionOrderService { @@ -43,7 +43,7 @@ public class UnionOrderServiceImpl implements IUnionOrderService {
43 List<OrderInfo> resList = new ArrayList<OrderInfo>(); 43 List<OrderInfo> resList = new ArrayList<OrderInfo>();
44 Long size = redisListCache.size(UNION_ORDER_KEY); 44 Long size = redisListCache.size(UNION_ORDER_KEY);
45 int sizeInt = size == null ? 0 : size.intValue(); 45 int sizeInt = size == null ? 0 : size.intValue();
46 - limit = sizeInt < size ? sizeInt : limit; 46 + limit = sizeInt < limit ? sizeInt : limit;
47 for(int i=0; i < limit; i++){ 47 for(int i=0; i < limit; i++){
48 UnionOrders unionOrder = redisListCache.rightPop(UNION_ORDER_KEY, UnionOrders.class); 48 UnionOrders unionOrder = redisListCache.rightPop(UNION_ORDER_KEY, UnionOrders.class);
49 logger.info("getUnionOrders: get order list form bigdata redis: key is {}, result is {}", UNION_ORDER_KEY, unionOrder); 49 logger.info("getUnionOrders: get order list form bigdata redis: key is {}, result is {}", UNION_ORDER_KEY, unionOrder);
@@ -42,7 +42,7 @@ public class BigDataOrderInfoTask { @@ -42,7 +42,7 @@ public class BigDataOrderInfoTask {
42 @Autowired 42 @Autowired
43 IUserOrdersDAO userOrdersDAO; 43 IUserOrdersDAO userOrdersDAO;
44 44
45 - @Scheduled(cron = "0/10 * * * * ?") 45 + @Scheduled(cron = "* 0/10 * * * ?")
46 public void run() { 46 public void run() {
47 UnionOrderReqVO reqVO = new UnionOrderReqVO(); 47 UnionOrderReqVO reqVO = new UnionOrderReqVO();
48 reqVO.setLimit(20); 48 reqVO.setLimit(20);
@@ -26,15 +26,13 @@ activeTime_4=24 @@ -26,15 +26,13 @@ activeTime_4=24
26 redis.readonly.proxy.address=test-bigdata-redis-1903805580.cn-north-1.elb.amazonaws.com.cn 26 redis.readonly.proxy.address=test-bigdata-redis-1903805580.cn-north-1.elb.amazonaws.com.cn
27 redis.readonly.proxy.port=6379 27 redis.readonly.proxy.port=6379
28 redis.readonly.proxy.auth= 28 redis.readonly.proxy.auth=
  29 +redis.readonly.proxy.database=1
  30 +
29 31
30 redis.proxy.address=test-bigdata-redis-1903805580.cn-north-1.elb.amazonaws.com.cn 32 redis.proxy.address=test-bigdata-redis-1903805580.cn-north-1.elb.amazonaws.com.cn
31 redis.proxy.port=6379 33 redis.proxy.port=6379
32 redis.proxy.auth= 34 redis.proxy.auth=
33 -  
34 -redis.notsync.twemproxy.addresses=test-bigdata-redis-1903805580.cn-north-1.elb.amazonaws.com.cn:6379  
35 -redis.notsync.twemproxy.auth=  
36 -redis.notsync.twemproxy.database=1  
37 - 35 +redis.proxy.database=1
38 36
39 ########## common rabbitmq ########## 37 ########## common rabbitmq ##########
40 #aws 38 #aws