Browse Source

/。 mall

release_toaliyun_real
xhxu 4 years ago
parent
commit
be6fd5dfd0
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java

+ 6
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java View File

@@ -370,6 +370,9 @@ public class WxMallServiceImpl implements WxMallService {

@Override
public String mallValid(Long loginUserId,WxMall mall) {
if(mall.getSaleType() == null || mall.getValidEnd() == null){
return null;
}
Map<String,Object> map = new HashMap<>();
Date today = DateUtils.getDateZero(new Date());
map.put("mallName",mall.getName());
@@ -380,11 +383,11 @@ public class WxMallServiceImpl implements WxMallService {
map.put("surplusDay",days);
//是否展示(6小时登陆展示)
String key = Constant.LOGIN_A_USER_VALID + mall.getTenantId() + ":" + loginUserId;
if(redisTemplate.hasKey(key)){
map.put("isShow",false);
}else{
if(days <= 30 && !redisTemplate.hasKey(key)){
RedisCacheUtils.cache(redisTemplate,key,true,3600*6);
map.put("isShow",true);
}else{
map.put("isShow",false);
}
return JSON.toJSONString(map);
}


Loading…
Cancel
Save