1.update
Showing
8 changed files
with
56 additions
and
29 deletions
... | @@ -83,7 +83,15 @@ public class MemberServiceImpl implements MemberService { | ... | @@ -83,7 +83,15 @@ public class MemberServiceImpl implements MemberService { |
83 | if(Objects.isNull(id) && StringUtils.isBlank(memberCode)) | 83 | if(Objects.isNull(id) && StringUtils.isBlank(memberCode)) |
84 | throw new BadRequestException(GlobeExceptionMsg.MEMBER_ID_AND_CODE_ARE_NULL); | 84 | throw new BadRequestException(GlobeExceptionMsg.MEMBER_ID_AND_CODE_ARE_NULL); |
85 | 85 | ||
86 | return this.findByIdOrCode(id, memberCode); | 86 | if (StringUtils.isNotBlank(memberCode)) { |
87 | MemberDTO memberDTO = this.findByCode(memberCode); | ||
88 | return memberDTO; | ||
89 | } else if (Objects.nonNull(id)) { | ||
90 | MemberDTO memberDTO = this.findById(id); | ||
91 | return memberDTO; | ||
92 | } | ||
93 | |||
94 | return null; | ||
87 | } | 95 | } |
88 | 96 | ||
89 | @Override | 97 | @Override | ... | ... |
... | @@ -97,24 +97,44 @@ public class RabbitMqConfig { | ... | @@ -97,24 +97,44 @@ public class RabbitMqConfig { |
97 | return u; | 97 | return u; |
98 | } | 98 | } |
99 | 99 | ||
100 | /**************************************************uc-getaway-iptv 2 uc-consumer-service*************************************************************/ | 100 | /**************************************************uc-getaway-samll 2 uc-consumer-samll*************************************************************/ |
101 | |||
102 | /*public static final String GATEWAY_TO_SMALL_DIRECT = "uc.gateway.small.direct"; | ||
103 | |||
104 | @Bean | ||
105 | public Queue eventSmallDirect() { | ||
106 | return new Queue(GATEWAY_TO_SMALL_DIRECT); | ||
107 | } | ||
108 | |||
109 | @Bean | ||
110 | Binding eventSmallBinding(DirectExchange managementExchange , Queue eventSmallDirect) { | ||
111 | BindingBuilder.DirectExchangeRoutingKeyConfigurer directExchangeRoutingKeyConfigurer = | ||
112 | BindingBuilder.bind(eventSmallDirect).to(managementExchange); | ||
113 | return directExchangeRoutingKeyConfigurer.with(GATEWAY_TO_SMALL_DIRECT); | ||
114 | }*/ | ||
115 | |||
116 | |||
117 | /**************************************************uc-engine-management 2 uc-consumer-iptv*************************************************************/ | ||
118 | |||
119 | |||
120 | /**************************************************uc-getaway-iptv 2 uc-consumer-iptv*************************************************************/ | ||
101 | 121 | ||
102 | public static final String GATEWAY_TO_SERVICE_DIRECT = "uc.gateway.service.direct"; | 122 | public static final String GATEWAY_TO_SERVICE_DIRECT = "uc.gateway.service.direct"; |
103 | 123 | ||
104 | @Bean | 124 | @Bean |
105 | public Queue eventDirect() { | 125 | public Queue eventServiceDirect() { |
106 | return new Queue(GATEWAY_TO_SERVICE_DIRECT); | 126 | return new Queue(GATEWAY_TO_SERVICE_DIRECT); |
107 | } | 127 | } |
108 | 128 | ||
109 | @Bean | 129 | @Bean |
110 | Binding eventBinding(DirectExchange managementExchange , Queue eventDirect) { | 130 | Binding eventBinding(DirectExchange managementExchange, Queue eventServiceDirect) { |
111 | BindingBuilder.DirectExchangeRoutingKeyConfigurer directExchangeRoutingKeyConfigurer = | 131 | BindingBuilder.DirectExchangeRoutingKeyConfigurer directExchangeRoutingKeyConfigurer = |
112 | BindingBuilder.bind(eventDirect).to(managementExchange); | 132 | BindingBuilder.bind(eventServiceDirect).to(managementExchange); |
113 | return directExchangeRoutingKeyConfigurer.with(ENGINE_TO_SERVICE_DIRECT); | 133 | return directExchangeRoutingKeyConfigurer.with(ENGINE_TO_SERVICE_DIRECT); |
114 | } | 134 | } |
115 | 135 | ||
116 | 136 | ||
117 | /**************************************************uc-engine-management 2 uc-consumer-service*************************************************************/ | 137 | /**************************************************uc-engine-management 2 uc-consumer-iptv*************************************************************/ |
118 | 138 | ||
119 | public static final String UC_DIRECT_MANAGEMENT = "uc.direct.management"; | 139 | public static final String UC_DIRECT_MANAGEMENT = "uc.direct.management"; |
120 | // uc-service-management 2 uc-consumer-iptv | 140 | // uc-service-management 2 uc-consumer-iptv |
... | @@ -138,8 +158,7 @@ public class RabbitMqConfig { | ... | @@ -138,8 +158,7 @@ public class RabbitMqConfig { |
138 | } | 158 | } |
139 | 159 | ||
140 | 160 | ||
141 | /**************************************************uc-engine-service 2 uc-consumer-management*************************************************************/ | 161 | /**************************************************uc-engine-iptv 2 uc-consumer-management*************************************************************/ |
142 | |||
143 | 162 | ||
144 | public static final String UC_DIRECT_SERVICE = "uc.direct"; | 163 | public static final String UC_DIRECT_SERVICE = "uc.direct"; |
145 | // uc-service-iptv 2 uc-consumer-management | 164 | // uc-service-iptv 2 uc-consumer-management | ... | ... |
... | @@ -16,7 +16,7 @@ import org.springframework.util.Assert; | ... | @@ -16,7 +16,7 @@ import org.springframework.util.Assert; |
16 | 16 | ||
17 | @Component | 17 | @Component |
18 | @Slf4j | 18 | @Slf4j |
19 | public class UcEngineServiceIptvEventConsumer { | 19 | public class UcEngineIptv2ManagementConsumer { |
20 | 20 | ||
21 | @Autowired | 21 | @Autowired |
22 | AutoRoute autoUser; | 22 | AutoRoute autoUser; |
... | @@ -33,7 +33,7 @@ public class UcEngineServiceIptvEventConsumer { | ... | @@ -33,7 +33,7 @@ public class UcEngineServiceIptvEventConsumer { |
33 | */ | 33 | */ |
34 | /*@RabbitHandler | 34 | /*@RabbitHandler |
35 | @RabbitListener(bindings = { | 35 | @RabbitListener(bindings = { |
36 | @QueueBinding(value = @Queue(value = RabbitMqConfig.ENGINE_TO_IPTV_CONSUMER_MEMBER_DIRECT), | 36 | @QueueBinding(value = @Queue(value = RabbitMqConfig.ENGINE_TO_MANAGEMENT_DIRECT), |
37 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) | 37 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) |
38 | }, containerFactory = "serviceRabbitListenerContainerFactory")*/ | 38 | }, containerFactory = "serviceRabbitListenerContainerFactory")*/ |
39 | public void ucEventConsumer(String content) { | 39 | public void ucEventConsumer(String content) { | ... | ... |
... | @@ -13,7 +13,7 @@ import org.springframework.util.Assert; | ... | @@ -13,7 +13,7 @@ import org.springframework.util.Assert; |
13 | 13 | ||
14 | @Component | 14 | @Component |
15 | @Slf4j | 15 | @Slf4j |
16 | public class UcEngineManagementEventConsumer { | 16 | public class UcEngineManagement2IptvConsumer { |
17 | 17 | ||
18 | @Autowired | 18 | @Autowired |
19 | AutoRoute autoUser; | 19 | AutoRoute autoUser; |
... | @@ -28,11 +28,11 @@ public class UcEngineManagementEventConsumer { | ... | @@ -28,11 +28,11 @@ public class UcEngineManagementEventConsumer { |
28 | * @author Hongyan Wang | 28 | * @author Hongyan Wang |
29 | * @date 2021/9/7 11:26 上午 | 29 | * @date 2021/9/7 11:26 上午 |
30 | */ | 30 | */ |
31 | /*@RabbitHandler | 31 | @RabbitHandler |
32 | @RabbitListener(bindings = { | 32 | @RabbitListener(bindings = { |
33 | @QueueBinding(value = @Queue(value = RabbitMqConfig.ENGINE_TO_SERVICE_DIRECT), | 33 | @QueueBinding(value = @Queue(value = RabbitMqConfig.ENGINE_TO_SERVICE_DIRECT), |
34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) | 34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) |
35 | }, containerFactory = "serviceRabbitListenerContainerFactory")*/ | 35 | }, containerFactory = "serviceRabbitListenerContainerFactory") |
36 | public void ucEventConsumer(String content) { | 36 | public void ucEventConsumer(String content) { |
37 | log.info(" receive dataSync msg , content is : {} ", content); | 37 | log.info(" receive dataSync msg , content is : {} ", content); |
38 | TableOperationMsg tableOperationMsg = this.parseContent(content); | 38 | TableOperationMsg tableOperationMsg = this.parseContent(content); | ... | ... |
... | @@ -24,7 +24,7 @@ import java.util.Objects; | ... | @@ -24,7 +24,7 @@ import java.util.Objects; |
24 | 24 | ||
25 | @Component | 25 | @Component |
26 | @Slf4j | 26 | @Slf4j |
27 | public class UcEventBusConsumer { | 27 | public class UcEventBusIptv2IptvConsumer { |
28 | 28 | ||
29 | @Autowired | 29 | @Autowired |
30 | RestTemplateClient restTemplateClient; | 30 | RestTemplateClient restTemplateClient; |
... | @@ -38,9 +38,9 @@ public class UcEventBusConsumer { | ... | @@ -38,9 +38,9 @@ public class UcEventBusConsumer { |
38 | * @author Hongyan Wang | 38 | * @author Hongyan Wang |
39 | * @date 2021/9/7 11:26 上午 | 39 | * @date 2021/9/7 11:26 上午 |
40 | */ | 40 | */ |
41 | /*@RabbitHandler | 41 | @RabbitHandler |
42 | @RabbitListener(queues = RabbitMqConfig.UC_EVENTBUS_TOPIC, | 42 | @RabbitListener(queues = RabbitMqConfig.UC_EVENTBUS_TOPIC, |
43 | containerFactory = "managementRabbitListenerContainerFactory")*/ | 43 | containerFactory = "managementRabbitListenerContainerFactory") |
44 | public void ucEventConsumer(String content) { | 44 | public void ucEventConsumer(String content) { |
45 | log.info(" receive dataSync msg , content is : {} ", content); | 45 | log.info(" receive dataSync msg , content is : {} ", content); |
46 | DataSyncMsg dataSyncMsg = this.parseContent(content); | 46 | DataSyncMsg dataSyncMsg = this.parseContent(content); | ... | ... |
... | @@ -13,7 +13,7 @@ import org.springframework.util.Assert; | ... | @@ -13,7 +13,7 @@ import org.springframework.util.Assert; |
13 | 13 | ||
14 | @Component | 14 | @Component |
15 | @Slf4j | 15 | @Slf4j |
16 | public class UcGatewayEventConsumer { | 16 | public class UcGatewayIptv2IptvConsumer { |
17 | 17 | ||
18 | @Autowired | 18 | @Autowired |
19 | RestTemplateClient restTemplateClient; | 19 | RestTemplateClient restTemplateClient; |
... | @@ -28,11 +28,11 @@ public class UcGatewayEventConsumer { | ... | @@ -28,11 +28,11 @@ public class UcGatewayEventConsumer { |
28 | * @author Hongyan Wang | 28 | * @author Hongyan Wang |
29 | * @date 2021/9/7 11:26 上午 | 29 | * @date 2021/9/7 11:26 上午 |
30 | */ | 30 | */ |
31 | /*@RabbitHandler | 31 | @RabbitHandler |
32 | @RabbitListener(bindings = { | 32 | @RabbitListener(bindings = { |
33 | @QueueBinding(value = @Queue(value = RabbitMqConfig.GATEWAY_TO_SERVICE_DIRECT), | 33 | @QueueBinding(value = @Queue(value = RabbitMqConfig.GATEWAY_TO_SERVICE_DIRECT), |
34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) | 34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) |
35 | }, containerFactory = "managementRabbitListenerContainerFactory")*/ | 35 | }, containerFactory = "managementRabbitListenerContainerFactory") |
36 | public void ucEventConsumer(String content) { | 36 | public void ucEventConsumer(String content) { |
37 | log.info(" receive dataSync msg , content is : {} ", content); | 37 | log.info(" receive dataSync msg , content is : {} ", content); |
38 | DataSyncMsg dataSyncMsg = this.parseContent(content); | 38 | DataSyncMsg dataSyncMsg = this.parseContent(content); | ... | ... |
... | @@ -32,11 +32,11 @@ public class WeiXinEventConsumer { | ... | @@ -32,11 +32,11 @@ public class WeiXinEventConsumer { |
32 | * @description 删除用户收藏记录 | 32 | * @description 删除用户收藏记录 |
33 | * @param content 消息内容 | 33 | * @param content 消息内容 |
34 | */ | 34 | */ |
35 | @RabbitHandler | 35 | /*@RabbitHandler |
36 | @RabbitListener(bindings = { | 36 | @RabbitListener(bindings = { |
37 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_DELETE_QUEUE), | 37 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_DELETE_QUEUE), |
38 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, | 38 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, |
39 | containerFactory = "managementRabbitListenerContainerFactory") | 39 | containerFactory = "managementRabbitListenerContainerFactory")*/ |
40 | public void deleteCollection(String content) { | 40 | public void deleteCollection(String content) { |
41 | try { | 41 | try { |
42 | log.info("receive UserCollection delete message, content {}", content); | 42 | log.info("receive UserCollection delete message, content {}", content); |
... | @@ -50,11 +50,11 @@ public class WeiXinEventConsumer { | ... | @@ -50,11 +50,11 @@ public class WeiXinEventConsumer { |
50 | * @description 删除全部收藏记录 | 50 | * @description 删除全部收藏记录 |
51 | * @param content 消息内容 | 51 | * @param content 消息内容 |
52 | */ | 52 | */ |
53 | @RabbitHandler | 53 | /*@RabbitHandler |
54 | @RabbitListener(bindings = { | 54 | @RabbitListener(bindings = { |
55 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_DELETE_ALL_QUEUE), | 55 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_DELETE_ALL_QUEUE), |
56 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, | 56 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, |
57 | containerFactory = "managementRabbitListenerContainerFactory") | 57 | containerFactory = "managementRabbitListenerContainerFactory")*/ |
58 | @Transactional | 58 | @Transactional |
59 | public void deleteAllCollection(String content) { | 59 | public void deleteAllCollection(String content) { |
60 | try { | 60 | try { |
... | @@ -74,11 +74,11 @@ public class WeiXinEventConsumer { | ... | @@ -74,11 +74,11 @@ public class WeiXinEventConsumer { |
74 | * } | 74 | * } |
75 | * @param content | 75 | * @param content |
76 | */ | 76 | */ |
77 | @RabbitHandler | 77 | /*@RabbitHandler |
78 | @RabbitListener(bindings = { | 78 | @RabbitListener(bindings = { |
79 | @QueueBinding(value = @Queue(value = RabbitMqConfig.WEIXIN_SUBORUNSUB_QUEUE), | 79 | @QueueBinding(value = @Queue(value = RabbitMqConfig.WEIXIN_SUBORUNSUB_QUEUE), |
80 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, | 80 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, |
81 | containerFactory = "managementRabbitListenerContainerFactory") | 81 | containerFactory = "managementRabbitListenerContainerFactory")*/ |
82 | @Transactional | 82 | @Transactional |
83 | public void subOrUnSubEvent(String content) { | 83 | public void subOrUnSubEvent(String content) { |
84 | try { | 84 | try { |
... | @@ -120,11 +120,11 @@ public class WeiXinEventConsumer { | ... | @@ -120,11 +120,11 @@ public class WeiXinEventConsumer { |
120 | * @description 添加收藏记录 | 120 | * @description 添加收藏记录 |
121 | * @param content 消息内容 | 121 | * @param content 消息内容 |
122 | */ | 122 | */ |
123 | @RabbitHandler | 123 | /*@RabbitHandler |
124 | @RabbitListener(bindings = { | 124 | @RabbitListener(bindings = { |
125 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_ADD_QUEUE), | 125 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_ADD_QUEUE), |
126 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, | 126 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, |
127 | containerFactory = "managementRabbitListenerContainerFactory") | 127 | containerFactory = "managementRabbitListenerContainerFactory")*/ |
128 | @Transactional | 128 | @Transactional |
129 | public void addCollection(String content) { | 129 | public void addCollection(String content) { |
130 | try { | 130 | try { | ... | ... |
... | @@ -119,9 +119,9 @@ mutil-mq: | ... | @@ -119,9 +119,9 @@ mutil-mq: |
119 | # 服务属性 | 119 | # 服务属性 |
120 | service: | 120 | service: |
121 | #平台类型 service: 服务侧 management: 管理侧 | 121 | #平台类型 service: 服务侧 management: 管理侧 |
122 | platform: management | 122 | platform: service |
123 | # 服务域 mobile:小屏侧 vis:大屏侧 | 123 | # 服务域 mobile:小屏侧 vis:大屏侧 |
124 | type: | 124 | type: vis |
125 | 125 | ||
126 | # uc-engine服务地址 | 126 | # uc-engine服务地址 |
127 | api: | 127 | api: | ... | ... |
-
Please register or sign in to post a comment