|
|
|
@@ -157,4 +157,29 @@ public class CouponCacheUtils { |
|
|
|
return RedisCacheUtils.getCacheObject(template, key,WxCouponCVo.class); |
|
|
|
} |
|
|
|
|
|
|
|
public static void removeOldDetailHtmlCache(RedisTemplate<String, Object> template) { |
|
|
|
String key = EnumCacheKey.OLD_DETAIL_HTML.getMessage(); |
|
|
|
RedisCacheUtils.removeCachePrefix(template, key); |
|
|
|
} |
|
|
|
|
|
|
|
public static void setOldDetaileHtmlCache(RedisTemplate<String, Object> template,WxCouponCVo coupon,Long couponChannelIdL,Long couponIdL) { |
|
|
|
String key = EnumCacheKey.OLD_DETAIL_HTML.getMessage(); |
|
|
|
if(couponChannelIdL > 0){ |
|
|
|
key = key + couponChannelIdL; |
|
|
|
}else if(couponIdL > 0){ |
|
|
|
key = key + couponIdL; |
|
|
|
} |
|
|
|
RedisCacheUtils.cache(template, key, coupon, 3600); |
|
|
|
} |
|
|
|
|
|
|
|
public static WxCouponCVo getOldDetailHtmlCache(RedisTemplate<String, Object> template,Long couponChannelIdL,Long couponIdL) { |
|
|
|
String key = EnumCacheKey.OLD_DETAIL_HTML.getMessage(); |
|
|
|
if(couponChannelIdL > 0){ |
|
|
|
key = key + couponChannelIdL; |
|
|
|
}else if(couponIdL > 0){ |
|
|
|
key = key + couponIdL; |
|
|
|
} |
|
|
|
return RedisCacheUtils.getCacheObject(template, key,WxCouponCVo.class); |
|
|
|
} |
|
|
|
|
|
|
|
} |