Sfoglia il codice sorgente

[修改][卷列表][添加缓存]

release_toaliyun_real
luozukai 6 anni fa
parent
commit
e8b9093d77
11 ha cambiato i file con 172 aggiunte e 2 eliminazioni
  1. +19
    -0
      mallinkAdmin/src/main/java/com/iformall/config/RedisConfig.java
  2. +19
    -0
      mallinkBApi/src/main/java/com/iformall/config/RedisConfig.java
  3. +18
    -0
      mallinkCApi/src/main/java/com/iformall/config/RedisConfig.java
  4. +19
    -0
      mallinkCallback/src/main/java/com/iformall/config/RedisConfig.java
  5. +18
    -0
      mallinkMQConsumer/src/main/java/com/iformall/config/RedisConfig.java
  6. +18
    -0
      mallinkPosApi/src/main/java/com/iformall/config/RedisConfig.java
  7. +19
    -0
      mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java
  8. +0
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java
  9. +3
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  10. +19
    -0
      mallinkSysAdmin/src/main/java/com/iformall/config/RedisConfig.java
  11. +20
    -0
      mallinkWebSocketServer/src/main/java/com/iformall/config/RedisConfig.java

+ 19
- 0
mallinkAdmin/src/main/java/com/iformall/config/RedisConfig.java Vedi File

@@ -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;
}

}

+ 19
- 0
mallinkBApi/src/main/java/com/iformall/config/RedisConfig.java Vedi File

@@ -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;
}

}

+ 18
- 0
mallinkCApi/src/main/java/com/iformall/config/RedisConfig.java Vedi File

@@ -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;
}
}

+ 19
- 0
mallinkCallback/src/main/java/com/iformall/config/RedisConfig.java Vedi File

@@ -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;
}

}

+ 18
- 0
mallinkMQConsumer/src/main/java/com/iformall/config/RedisConfig.java Vedi File

@@ -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;
}
}

+ 18
- 0
mallinkPosApi/src/main/java/com/iformall/config/RedisConfig.java Vedi File

@@ -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;
}
}

+ 19
- 0
mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java Vedi File

@@ -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;
}

}

+ 0
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java Vedi File

@@ -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.*;



+ 3
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Vedi File

@@ -427,6 +427,9 @@ public class WxCouponServiceImpl implements WxCouponService {
wxCouponMapper.updateByPrimaryKeySelective(record);

}

//清空缓存

return new ResultData(record.getId());
}



+ 19
- 0
mallinkSysAdmin/src/main/java/com/iformall/config/RedisConfig.java Vedi File

@@ -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;
}

}

+ 20
- 0
mallinkWebSocketServer/src/main/java/com/iformall/config/RedisConfig.java Vedi File

@@ -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;
}


}

Caricamento…
Annulla
Salva