Browse Source

fix bug

release_toaliyun_real
zhengfangyuan 3 years ago
parent
commit
ceaaec6e2a
3 changed files with 8 additions and 8 deletions
  1. +1
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  3. +6
    -6
      mallinkService/src/main/java/com/iformall/service/util/CouponCacheUtils.java

+ 1
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java View File

@@ -317,7 +317,7 @@ public class WxCouponController extends BaseController {
CouponCacheUtils.setCouponChannelCache(redisTemplate, couponChannelIdL, couponChannel);
}
Map<WxMall,List<WxMerchantVo>> volist = CouponCacheUtils.getCouponMerchantCache(redisTemplate, couponChannel.getId());
Map<String,List<WxMerchantVo>> volist = CouponCacheUtils.getCouponMerchantCache(redisTemplate, couponChannel.getId());
if (null == volist) {
volist = couponService.getCouponMerchantList(getTenantInfo(), couponChannel.getCouponId());
if (null != volist && volist.size() > 0 ) {


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java View File

@@ -1705,7 +1705,7 @@ public class WxCouponServiceImpl implements WxCouponService {
}else {
Map<String,List<WxMerchantVo>> mallMerchantMap = new HashMap<String,List<WxMerchantVo>>();
WxMall mall = wxMallMapper.getByTenantId(tenantInfo.getTenantId());
mallMerchantMap.put(mall.getTenantId()+"|"+mall.getName(),, getCouponMerchantList(couponId,mall));
mallMerchantMap.put(mall.getTenantId()+"|"+mall.getName(), getCouponMerchantList(couponId,mall));
return mallMerchantMap;
}
}


+ 6
- 6
mallinkService/src/main/java/com/iformall/service/util/CouponCacheUtils.java View File

@@ -48,18 +48,18 @@ public class CouponCacheUtils {
}
public static void removeCouponMerchantCache(RedisTemplate<String, Object> template,Long couponId) {
String key = "couponMerchant:"+couponId;
String key = "couponMerchantNew:"+couponId;
RedisCacheUtils.removeCache(template, key);
}
public static void setCouponMerchantCache(RedisTemplate<String, Object> template,Long couponId,Map<WxMall,List<WxMerchantVo>> merchantList) {
String key = "couponMerchant:"+couponId;
public static void setCouponMerchantCache(RedisTemplate<String, Object> template,Long couponId,Map<String,List<WxMerchantVo>> merchantList) {
String key = "couponMerchantNew:"+couponId;
RedisCacheUtils.cache(template, key, merchantList, 24*3600);
}
public static Map<WxMall,List<WxMerchantVo>> getCouponMerchantCache(RedisTemplate<String, Object> template,Long couponId) {
String key = "couponMerchant:"+couponId;
return (Map<WxMall, List<WxMerchantVo>>) RedisCacheUtils.getCacheListObject(template, key,Map.class);
public static Map<String,List<WxMerchantVo>> getCouponMerchantCache(RedisTemplate<String, Object> template,Long couponId) {
String key = "couponMerchantNew:"+couponId;
return (Map<String, List<WxMerchantVo>>) RedisCacheUtils.getCacheListObject(template, key,Map.class);
}
public static void removeDouyinLivePageCache(RedisTemplate<String, Object> template,String tenantId,Integer targetAd,Integer bussiness) {


Loading…
Cancel
Save