| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -160,4 +162,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -122,4 +124,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,10 +1,12 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponCVo; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -140,4 +142,20 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -160,4 +162,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -144,4 +146,20 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -122,4 +124,20 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -145,4 +147,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -6,7 +6,6 @@ import com.github.pagehelper.PageInfo; | |||
| import com.google.common.collect.Lists; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.msg.AppUniformMsg; | |||
| import com.iformall.domain.po.msg.MpAppMsg; | |||
| @@ -26,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Propagation; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.*; | |||
| @@ -427,6 +427,9 @@ public class WxCouponServiceImpl implements WxCouponService { | |||
| wxCouponMapper.updateByPrimaryKeySelective(record); | |||
| } | |||
| //清空缓存 | |||
| return new ResultData(record.getId()); | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -160,4 +162,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -144,4 +146,22 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||