| @@ -212,4 +212,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||||
| return template; | return template; | ||||
| } | } | ||||
| @Bean("cUserBasicInfoRedisTemplate") | |||||
| public RedisTemplate<String, WxCUserBasicInfo> getCUserBasicInfoRedisTemplate(RedisConnectionFactory connectionFactory) { | |||||
| RedisTemplate<String, WxCUserBasicInfo> template = new RedisTemplate<String, WxCUserBasicInfo>(); | |||||
| Jackson2JsonRedisSerializer<WxCUserBasicInfo> j = new Jackson2JsonRedisSerializer<WxCUserBasicInfo>(WxCUserBasicInfo.class); | |||||
| // value值的序列化 | |||||
| template.setValueSerializer(j); | |||||
| template.setHashKeySerializer(j); | |||||
| // key的序列化 | |||||
| template.setKeySerializer(new StringRedisSerializer()); | |||||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||||
| template.setConnectionFactory(connectionFactory); | |||||
| return template; | |||||
| } | |||||
| } | } | ||||
| @@ -175,6 +175,23 @@ public class RedisConfig extends CachingConfigurerSupport { | |||||
| return template; | return template; | ||||
| } | } | ||||
| @Bean("cUserBasicInfoRedisTemplate") | |||||
| public RedisTemplate<String, WxCUserBasicInfo> getCUserBasicInfoRedisTemplate(RedisConnectionFactory connectionFactory) { | |||||
| RedisTemplate<String, WxCUserBasicInfo> template = new RedisTemplate<String, WxCUserBasicInfo>(); | |||||
| Jackson2JsonRedisSerializer<WxCUserBasicInfo> j = new Jackson2JsonRedisSerializer<WxCUserBasicInfo>(WxCUserBasicInfo.class); | |||||
| // value值的序列化 | |||||
| template.setValueSerializer(j); | |||||
| template.setHashKeySerializer(j); | |||||
| // key的序列化 | |||||
| template.setKeySerializer(new StringRedisSerializer()); | |||||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||||
| template.setConnectionFactory(connectionFactory); | |||||
| return template; | |||||
| } | |||||
| @Bean("stringValueOperations") | @Bean("stringValueOperations") | ||||
| public ValueOperations<String, String> getStringValueOperations(RedisConnectionFactory connectionFactory) { | public ValueOperations<String, String> getStringValueOperations(RedisConnectionFactory connectionFactory) { | ||||
| StringRedisTemplate template = new StringRedisTemplate(); | StringRedisTemplate template = new StringRedisTemplate(); | ||||
| @@ -142,6 +142,23 @@ public class RedisConfig extends CachingConfigurerSupport { | |||||
| return template; | return template; | ||||
| } | } | ||||
| @Bean("cUserBasicInfoRedisTemplate") | |||||
| public RedisTemplate<String, WxCUserBasicInfo> getCUserBasicInfoRedisTemplate(RedisConnectionFactory connectionFactory) { | |||||
| RedisTemplate<String, WxCUserBasicInfo> template = new RedisTemplate<String, WxCUserBasicInfo>(); | |||||
| Jackson2JsonRedisSerializer<WxCUserBasicInfo> j = new Jackson2JsonRedisSerializer<WxCUserBasicInfo>(WxCUserBasicInfo.class); | |||||
| // value值的序列化 | |||||
| template.setValueSerializer(j); | |||||
| template.setHashKeySerializer(j); | |||||
| // key的序列化 | |||||
| template.setKeySerializer(new StringRedisSerializer()); | |||||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||||
| template.setConnectionFactory(connectionFactory); | |||||
| return template; | |||||
| } | |||||
| @Bean("mallRedisTemplate") | @Bean("mallRedisTemplate") | ||||
| public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | ||||
| RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | ||||
| @@ -127,6 +127,23 @@ public class RedisConfig extends CachingConfigurerSupport { | |||||
| return template; | return template; | ||||
| } | } | ||||
| @Bean("cUserBasicInfoRedisTemplate") | |||||
| public RedisTemplate<String, WxCUserBasicInfo> getCUserBasicInfoRedisTemplate(RedisConnectionFactory connectionFactory) { | |||||
| RedisTemplate<String, WxCUserBasicInfo> template = new RedisTemplate<String, WxCUserBasicInfo>(); | |||||
| Jackson2JsonRedisSerializer<WxCUserBasicInfo> j = new Jackson2JsonRedisSerializer<WxCUserBasicInfo>(WxCUserBasicInfo.class); | |||||
| // value值的序列化 | |||||
| template.setValueSerializer(j); | |||||
| template.setHashKeySerializer(j); | |||||
| // key的序列化 | |||||
| template.setKeySerializer(new StringRedisSerializer()); | |||||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||||
| template.setConnectionFactory(connectionFactory); | |||||
| return template; | |||||
| } | |||||
| @Bean("mallRedisTemplate") | @Bean("mallRedisTemplate") | ||||
| public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | ||||
| RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | ||||
| @@ -105,6 +105,23 @@ public class RedisConfig extends CachingConfigurerSupport { | |||||
| return template; | return template; | ||||
| } | } | ||||
| @Bean("cUserBasicInfoRedisTemplate") | |||||
| public RedisTemplate<String, WxCUserBasicInfo> getCUserBasicInfoRedisTemplate(RedisConnectionFactory connectionFactory) { | |||||
| RedisTemplate<String, WxCUserBasicInfo> template = new RedisTemplate<String, WxCUserBasicInfo>(); | |||||
| Jackson2JsonRedisSerializer<WxCUserBasicInfo> j = new Jackson2JsonRedisSerializer<WxCUserBasicInfo>(WxCUserBasicInfo.class); | |||||
| // value值的序列化 | |||||
| template.setValueSerializer(j); | |||||
| template.setHashKeySerializer(j); | |||||
| // key的序列化 | |||||
| template.setKeySerializer(new StringRedisSerializer()); | |||||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||||
| template.setConnectionFactory(connectionFactory); | |||||
| return template; | |||||
| } | |||||
| @Bean("mallRedisTemplate") | @Bean("mallRedisTemplate") | ||||
| public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | ||||
| RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | ||||
| @@ -127,6 +127,23 @@ public class RedisConfig extends CachingConfigurerSupport { | |||||
| return template; | return template; | ||||
| } | } | ||||
| @Bean("cUserBasicInfoRedisTemplate") | |||||
| public RedisTemplate<String, WxCUserBasicInfo> getCUserBasicInfoRedisTemplate(RedisConnectionFactory connectionFactory) { | |||||
| RedisTemplate<String, WxCUserBasicInfo> template = new RedisTemplate<String, WxCUserBasicInfo>(); | |||||
| Jackson2JsonRedisSerializer<WxCUserBasicInfo> j = new Jackson2JsonRedisSerializer<WxCUserBasicInfo>(WxCUserBasicInfo.class); | |||||
| // value值的序列化 | |||||
| template.setValueSerializer(j); | |||||
| template.setHashKeySerializer(j); | |||||
| // key的序列化 | |||||
| template.setKeySerializer(new StringRedisSerializer()); | |||||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||||
| template.setConnectionFactory(connectionFactory); | |||||
| return template; | |||||
| } | |||||
| @Bean("mallRedisTemplate") | @Bean("mallRedisTemplate") | ||||
| public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | ||||
| RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | ||||
| @@ -6,11 +6,8 @@ import java.util.concurrent.ConcurrentHashMap; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.domain.po.WxMerchantBUser; | |||||
| import com.iformall.domain.po.WxPayOrder; | |||||
| import com.iformall.enums.EnumPayWay; | import com.iformall.enums.EnumPayWay; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.service.WxPayOrderService; | |||||
| import com.iformall.service.pay.service.pay.CDrivingPayService; | import com.iformall.service.pay.service.pay.CDrivingPayService; | ||||
| import com.iformall.service.pay.service.pay.CPassivePayService; | import com.iformall.service.pay.service.pay.CPassivePayService; | ||||
| import com.iformall.service.pay.service.pay.PayAdapterService; | import com.iformall.service.pay.service.pay.PayAdapterService; | ||||
| @@ -20,7 +17,6 @@ import com.iformall.service.pay.service.pay.wx.miniApp.maPay.WxMiniMaPayAdapterS | |||||
| import com.iformall.service.pay.service.refund.RefundPayAdapterService; | import com.iformall.service.pay.service.refund.RefundPayAdapterService; | ||||
| import com.iformall.service.pay.service.refund.wx.WxRefundAdapterService; | import com.iformall.service.pay.service.refund.wx.WxRefundAdapterService; | ||||
| import com.iformall.service.pay.service.share.PayShareAdapterService; | import com.iformall.service.pay.service.share.PayShareAdapterService; | ||||
| import com.iformall.service.pay.service.share.neupos.NeuPosPayShareService; | |||||
| import com.iformall.service.pay.service.share.wx.WxPayShareService; | import com.iformall.service.pay.service.share.wx.WxPayShareService; | ||||
| /** | /** | ||||
| @@ -44,8 +40,6 @@ public class PayServiceFactory { | |||||
| @Autowired | @Autowired | ||||
| WxPayShareService wxShareService; | WxPayShareService wxShareService; | ||||
| @Autowired | |||||
| NeuPosPayShareService neuPosPayShareService; | |||||
| @Autowired | @Autowired | ||||
| @@ -68,7 +62,7 @@ public class PayServiceFactory { | |||||
| shareMap = new ConcurrentHashMap<Integer, PayShareAdapterService>(); | shareMap = new ConcurrentHashMap<Integer, PayShareAdapterService>(); | ||||
| shareMap.put(EnumPayWay.PAY_WAY_WECHAT.getCode(), wxShareService); | shareMap.put(EnumPayWay.PAY_WAY_WECHAT.getCode(), wxShareService); | ||||
| shareMap.put(EnumPayWay.PAY_WAY_WECHAT_MA.getCode(), wxShareService); | shareMap.put(EnumPayWay.PAY_WAY_WECHAT_MA.getCode(), wxShareService); | ||||
| shareMap.put(EnumPayWay.PAY_WAY_POS_NEU.getCode(), neuPosPayShareService); | |||||
| shareMap.put(EnumPayWay.PAY_WAY_POS_NEU.getCode(), wxShareService); | |||||
| } | } | ||||
| return shareMap; | return shareMap; | ||||
| } | } | ||||
| @@ -1,14 +0,0 @@ | |||||
| package com.iformall.service.pay.service.share.neupos; | |||||
| import org.springframework.stereotype.Service; | |||||
| import com.iformall.service.pay.service.share.wx.WxPayShareService; | |||||
| /** | |||||
| * 东软pos分账,实际走的是微信的一套 | |||||
| * @author alascor | |||||
| */ | |||||
| @Service | |||||
| public class NeuPosPayShareService extends WxPayShareService{ | |||||
| } | |||||
| @@ -142,6 +142,23 @@ public class RedisConfig extends CachingConfigurerSupport { | |||||
| return template; | return template; | ||||
| } | } | ||||
| @Bean("cUserBasicInfoRedisTemplate") | |||||
| public RedisTemplate<String, WxCUserBasicInfo> getCUserBasicInfoRedisTemplate(RedisConnectionFactory connectionFactory) { | |||||
| RedisTemplate<String, WxCUserBasicInfo> template = new RedisTemplate<String, WxCUserBasicInfo>(); | |||||
| Jackson2JsonRedisSerializer<WxCUserBasicInfo> j = new Jackson2JsonRedisSerializer<WxCUserBasicInfo>(WxCUserBasicInfo.class); | |||||
| // value值的序列化 | |||||
| template.setValueSerializer(j); | |||||
| template.setHashKeySerializer(j); | |||||
| // key的序列化 | |||||
| template.setKeySerializer(new StringRedisSerializer()); | |||||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||||
| template.setConnectionFactory(connectionFactory); | |||||
| return template; | |||||
| } | |||||
| @Bean("mallRedisTemplate") | @Bean("mallRedisTemplate") | ||||
| public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | ||||
| RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | ||||
| @@ -127,6 +127,23 @@ public class RedisConfig extends CachingConfigurerSupport { | |||||
| return template; | return template; | ||||
| } | } | ||||
| @Bean("cUserBasicInfoRedisTemplate") | |||||
| public RedisTemplate<String, WxCUserBasicInfo> getCUserBasicInfoRedisTemplate(RedisConnectionFactory connectionFactory) { | |||||
| RedisTemplate<String, WxCUserBasicInfo> template = new RedisTemplate<String, WxCUserBasicInfo>(); | |||||
| Jackson2JsonRedisSerializer<WxCUserBasicInfo> j = new Jackson2JsonRedisSerializer<WxCUserBasicInfo>(WxCUserBasicInfo.class); | |||||
| // value值的序列化 | |||||
| template.setValueSerializer(j); | |||||
| template.setHashKeySerializer(j); | |||||
| // key的序列化 | |||||
| template.setKeySerializer(new StringRedisSerializer()); | |||||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||||
| template.setConnectionFactory(connectionFactory); | |||||
| return template; | |||||
| } | |||||
| @Bean("mallRedisTemplate") | @Bean("mallRedisTemplate") | ||||
| public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | public RedisTemplate<String, WxMall> getMallRedisTemplate(RedisConnectionFactory connectionFactory) { | ||||
| RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); | ||||