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")); }); }