| @@ -317,7 +317,7 @@ public class WxCouponController extends BaseController { | |||||
| CouponCacheUtils.setCouponChannelCache(redisTemplate, couponChannelIdL, couponChannel); | 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) { | if (null == volist) { | ||||
| volist = couponService.getCouponMerchantList(getTenantInfo(), couponChannel.getCouponId()); | volist = couponService.getCouponMerchantList(getTenantInfo(), couponChannel.getCouponId()); | ||||
| if (null != volist && volist.size() > 0 ) { | if (null != volist && volist.size() > 0 ) { | ||||
| @@ -232,7 +232,7 @@ public class WxCouponOrderBVo extends WxCouponOrder { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Date verifyEndDate; | private Date verifyEndDate; | ||||
| @Excel(name = "类型", width = 50, orderNum = "16", replace = {"满减券_1", "代金券_2", "团购券_3", "礼品券_4", "停车券_5", "通用券_6", "砍价券_8", "团购券_9", "预购商品_10", "可配送商品_11", "券礼包_12", "积分券_50", "积分停车券_51", "消费卡_100"}) | |||||
| @Excel(name = "类型", width = 50, orderNum = "16", replace = {"满减券_1", "代金券_2", "团购券_3", "礼品券_4", "停车券_5", "通用券_6", "砍价券_8", "团购券_9", "预购商品_10", "可配送商品_11", "券礼包_12", "积分券_50", "积分停车券_51","抖音券_66","抖音平台券_67","抖音品牌券_68", "消费卡_100"}) | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer couponType; | private Integer couponType; | ||||
| @@ -279,7 +279,7 @@ public interface WxCouponService { | |||||
| Map<Long, WxCoupon> getCouponMap(List<Long> couponIds, TenantEntity tenantEntity); | Map<Long, WxCoupon> getCouponMap(List<Long> couponIds, TenantEntity tenantEntity); | ||||
| Map<WxMall,List<WxMerchantVo>> getCouponMerchantList(TenantEntity tenantInfo, Long couponId); | |||||
| Map<String,List<WxMerchantVo>> getCouponMerchantList(TenantEntity tenantInfo, Long couponId); | |||||
| /** | /** | ||||
| * 作废卷 | * 作废卷 | ||||
| @@ -1684,7 +1684,7 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public Map<WxMall,List<WxMerchantVo>> getCouponMerchantList(TenantEntity tenantInfo, Long couponId) { | |||||
| public Map<String,List<WxMerchantVo>> getCouponMerchantList(TenantEntity tenantInfo, Long couponId) { | |||||
| WxCoupon wxCoupon = wxCouponMapper.selectById(couponId,tenantInfo.getTenantId()); | WxCoupon wxCoupon = wxCouponMapper.selectById(couponId,tenantInfo.getTenantId()); | ||||
| if (EnumCouponType.isParentCoupon(wxCoupon.getType())){ | if (EnumCouponType.isParentCoupon(wxCoupon.getType())){ | ||||
| WxCouponMall couponMall = new WxCouponMall(); | WxCouponMall couponMall = new WxCouponMall(); | ||||
| @@ -1693,19 +1693,19 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| couponMall.setStatus(EnumCouponMallStatus.FINISED.getCode()); | couponMall.setStatus(EnumCouponMallStatus.FINISED.getCode()); | ||||
| List<WxCouponMall> couponMallList = wxCouponMallMapper.findList(couponMall); | List<WxCouponMall> couponMallList = wxCouponMallMapper.findList(couponMall); | ||||
| if (null != couponMallList && couponMallList.size()> 0 ) { | if (null != couponMallList && couponMallList.size()> 0 ) { | ||||
| Map<WxMall,List<WxMerchantVo>> mallMerchantMap = new HashMap<WxMall,List<WxMerchantVo>>(); | |||||
| Map<String,List<WxMerchantVo>> mallMerchantMap = new HashMap<String,List<WxMerchantVo>>(); | |||||
| for (int i = 0 ; i < couponMallList.size();i++) { | for (int i = 0 ; i < couponMallList.size();i++) { | ||||
| WxCouponMall cm = couponMallList.get(i); | WxCouponMall cm = couponMallList.get(i); | ||||
| WxMall mall = wxMallMapper.getByTenantId(cm.getMallTenantId()); | WxMall mall = wxMallMapper.getByTenantId(cm.getMallTenantId()); | ||||
| mallMerchantMap.put(mall, getCouponMerchantList(couponId,mall)); | |||||
| mallMerchantMap.put(mall.getTenantId()+"|"+mall.getName(), getCouponMerchantList(couponId,mall)); | |||||
| } | } | ||||
| return mallMerchantMap; | return mallMerchantMap; | ||||
| } | } | ||||
| return null; | return null; | ||||
| }else { | }else { | ||||
| Map<WxMall,List<WxMerchantVo>> mallMerchantMap = new HashMap<WxMall,List<WxMerchantVo>>(); | |||||
| Map<String,List<WxMerchantVo>> mallMerchantMap = new HashMap<String,List<WxMerchantVo>>(); | |||||
| WxMall mall = wxMallMapper.getByTenantId(tenantInfo.getTenantId()); | WxMall mall = wxMallMapper.getByTenantId(tenantInfo.getTenantId()); | ||||
| mallMerchantMap.put(mall, getCouponMerchantList(couponId,mall)); | |||||
| mallMerchantMap.put(mall.getTenantId()+"|"+mall.getName(), getCouponMerchantList(couponId,mall)); | |||||
| return mallMerchantMap; | return mallMerchantMap; | ||||
| } | } | ||||
| } | } | ||||
| @@ -48,18 +48,18 @@ public class CouponCacheUtils { | |||||
| } | } | ||||
| public static void removeCouponMerchantCache(RedisTemplate<String, Object> template,Long couponId) { | public static void removeCouponMerchantCache(RedisTemplate<String, Object> template,Long couponId) { | ||||
| String key = "couponMerchant:"+couponId; | |||||
| String key = "couponMerchantNew:"+couponId; | |||||
| RedisCacheUtils.removeCache(template, key); | 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); | 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) { | public static void removeDouyinLivePageCache(RedisTemplate<String, Object> template,String tenantId,Integer targetAd,Integer bussiness) { | ||||