From 64fea0ebfe6313ab104b54887e426872db295c8a Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Mon, 23 Jul 2018 17:54:20 +0800 Subject: [PATCH] update --- .../openim/core/impl/CustomerServiceServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/openim/core/impl/CustomerServiceServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/openim/core/impl/CustomerServiceServiceImpl.java index 3ba1ce652..ba1e4f268 100644 --- a/src/main/java/au/com/royalpay/payment/manage/openim/core/impl/CustomerServiceServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/openim/core/impl/CustomerServiceServiceImpl.java @@ -53,7 +53,6 @@ public class CustomerServiceServiceImpl implements CustomerServiceService { @Resource private StringRedisTemplate stringRedisTemplate; private final String REDIS_UNREADMSG_PREFIX = "REDIS_UNREADMSG_PREFIX"; - private final String REDIS_UNREADMSG_SEND_PREFIX = "REDIS_UNREADMSG_SEND_PREFIX"; @Value("${im.openim.appkey}") private String appkey; @@ -151,7 +150,7 @@ public class CustomerServiceServiceImpl implements CustomerServiceService { if (StringUtils.isEmpty(uid) || StringUtils.isEmpty(tuid)) { return; } - BoundListOperations ops = stringRedisTemplate.boundListOps("REDIS_UNREADMSG_PREFIX" + tuid); + BoundListOperations ops = stringRedisTemplate.boundListOps(REDIS_UNREADMSG_PREFIX + tuid); for (int i = 0; i < ops.size(); i++) { String jStr = ops.index(i); if (jStr.contains(uid)) { @@ -171,7 +170,7 @@ public class CustomerServiceServiceImpl implements CustomerServiceService { MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); servants.parallelStream().forEach(p -> { p.getString("user_id"); - BoundListOperations ops = stringRedisTemplate.boundListOps("REDIS_UNREADMSG_PREFIX" + p.getString("user_id")); + BoundListOperations ops = stringRedisTemplate.boundListOps(REDIS_UNREADMSG_PREFIX + p.getString("user_id")); if (ops.size() < 1) { return; } @@ -183,7 +182,7 @@ public class CustomerServiceServiceImpl implements CustomerServiceService { } TemplateMessage msg = initUnreadMsg(unreadMsg, clients, p.getString("wx_openid"), paymentApi.getTemplateId("commission")); paymentApi.sendTemplateMessage(msg); - stringRedisTemplate.delete("REDIS_UNREADMSG_PREFIX" + p.getString("user_id")); + stringRedisTemplate.delete(REDIS_UNREADMSG_PREFIX + p.getString("user_id")); }); }