Commit d6f585de by leejoker

修复全部客户缓存未命中的问题

1 parent 39f97d7a
...@@ -158,7 +158,12 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS ...@@ -158,7 +158,12 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
public List<WeCustomer> externalUserIds(String pushRange, String staffId, String department, String tag) { public List<WeCustomer> externalUserIds(String pushRange, String staffId, String department, String tag) {
if (pushRange.equals(WeConstans.SEND_MESSAGE_CUSTOMER_ALL)) { if (pushRange.equals(WeConstans.SEND_MESSAGE_CUSTOMER_ALL)) {
//从redis中读取数据 //从redis中读取数据
return redisCache.getCacheList(WeConstans.WECUSTOMERS_KEY); List<WeCustomer> customers = redisCache.getCacheList(WeConstans.WECUSTOMERS_KEY);
if (CollectionUtils.isEmpty(customers)) {
customers = weCustomerService.selectWeCustomerList(null);
redisCache.setCacheList(WeConstans.WECUSTOMERS_KEY, customers);
}
return customers;
} else { } else {
//按条件查询客户 //按条件查询客户
//通过部门id查询所有的员工 //通过部门id查询所有的员工
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!