Authored by mali

redis统一用ufo的redis

@@ -25,10 +25,10 @@ import java.util.concurrent.TimeUnit; @@ -25,10 +25,10 @@ import java.util.concurrent.TimeUnit;
25 public class LoginSessionService { 25 public class LoginSessionService {
26 private static final Logger logger = LoggerFactory.getLogger(LoginSessionService.class); 26 private static final Logger logger = LoggerFactory.getLogger(LoginSessionService.class);
27 27
28 - @Redis("yohoNoSyncRedis") 28 + @Redis("gwNoSyncRedis")
29 private YHRedisTemplate redisTemplate; 29 private YHRedisTemplate redisTemplate;
30 30
31 - @Redis("yohoNoSyncRedis") 31 + @Redis("gwNoSyncRedis")
32 private YHValueOperations yhValueOperations; 32 private YHValueOperations yhValueOperations;
33 33
34 /** 34 /**
  1 +package com.yohobuy.ufo;
  2 +
  3 +import java.io.*;
  4 +import java.util.ArrayList;
  5 +import java.util.List;
  6 +
  7 +/**
  8 + * Created by li.ma on 2019/1/14.
  9 + */
  10 +public class Test1 {
  11 + // 搜索查询的数据,抽取商品编码
  12 + public static void main(String[] args) throws IOException {
  13 + String fileName = "C:\\Users\\li.ma\\Desktop\\result.json";
  14 +
  15 + BufferedReader stream = new BufferedReader(new FileReader(fileName));
  16 + List<Integer> idList = new ArrayList<>();
  17 + while (stream.read()!=-1) {
  18 +
  19 + String line = stream.readLine();
  20 +
  21 +
  22 +
  23 + if (null != line && line.contains("\"id\":")) {
  24 + int i = line.lastIndexOf("\"id\":");
  25 +
  26 + idList.add(Integer.valueOf(line.substring(i + 5)));
  27 + }
  28 + }
  29 + System.out.println(idList);
  30 + }
  31 +}
@@ -41,10 +41,10 @@ import java.util.concurrent.TimeUnit; @@ -41,10 +41,10 @@ import java.util.concurrent.TimeUnit;
41 needUpdate = true) 41 needUpdate = true)
42 public class BuyerOrderWithoutPaidTimeoutCancelMonitor implements YhJob { 42 public class BuyerOrderWithoutPaidTimeoutCancelMonitor implements YhJob {
43 43
44 - @Redis("yohoNoSyncRedis") 44 + @Redis("gwNoSyncRedis")
45 private YHValueOperations yhValueOperations; 45 private YHValueOperations yhValueOperations;
46 46
47 - @Redis("yohoNoSyncRedis") 47 + @Redis("gwNoSyncRedis")
48 private YHHashOperations hashOperations; 48 private YHHashOperations hashOperations;
49 49
50 @Autowired 50 @Autowired
@@ -4,7 +4,7 @@ redis: @@ -4,7 +4,7 @@ redis:
4 - 192.168.102.45:6379 4 - 192.168.102.45:6379
5 auth: redis9646 5 auth: redis9646
6 6
7 - yohoNoSyncRedis : 7 + gwNoSyncRedis :
8 servers: 8 servers:
9 - 192.168.102.45:6379 9 - 192.168.102.45:6379
10 auth: redis9646 10 auth: redis9646
1 redis: 1 redis:
2 - yohoNoSyncRedis : 2 + gwNoSyncRedis :
3 servers: 3 servers:
4 - ${redis.ufo.twemproxy.addresses} 4 - ${redis.ufo.twemproxy.addresses}
5 auth: ${redis.ufo.twemproxy.auth} 5 auth: ${redis.ufo.twemproxy.auth}