Commit 97a0f901 by 徐高华

缓存

parent 1806e680
......@@ -720,13 +720,13 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
@Override
public List<HmQrcodeStoreDTO> getHmStoreByEnterpriseId(String wxEnterpriseId , String enterpriseId) {
String key = "HM:STORE:" + enterpriseId;
String key = "HM:STORE:" + enterpriseId + wxEnterpriseId;
Object cache = RedisUtil.getCache(key);
if (cache != null) {
return (List<HmQrcodeStoreDTO>) cache;
}
List<HmQrcodeStoreDTO> hmQrcodeStoreDTOS = EntityUtil.changeEntityListNew(HmQrcodeStoreDTO.class, hmQrcodeService.getHmStoreByEnterpriseId(wxEnterpriseId,enterpriseId));
RedisUtil.setCache(key, hmQrcodeStoreDTOS, 10L, TimeUnit.MINUTES);
RedisUtil.setCache(key, hmQrcodeStoreDTOS, 5L, TimeUnit.MINUTES);
return hmQrcodeStoreDTOS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment