Merge branch 'test6.9.24' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.24
Showing
5 changed files
with
45 additions
and
4 deletions
@@ -213,4 +213,19 @@ public class ProductIdentifyController { | @@ -213,4 +213,19 @@ public class ProductIdentifyController { | ||
213 | return new ApiResponse.ApiResponseBuilder().code(402).message("查询失败,请稍后重试").build(); | 213 | return new ApiResponse.ApiResponseBuilder().code(402).message("查询失败,请稍后重试").build(); |
214 | } | 214 | } |
215 | } | 215 | } |
216 | + | ||
217 | + /** | ||
218 | + * 更新上链的配置,是走node还是java接口 | ||
219 | + * @param configFlag | ||
220 | + * @return | ||
221 | + * @throws GatewayException | ||
222 | + */ | ||
223 | + @IgnoreSignature | ||
224 | + @IgnoreSession | ||
225 | + @RequestMapping(params = "method=ufo.product.updateIdentifyconfig") | ||
226 | + public ApiResponse updateIdentifyconfig(@RequestParam(value = "configFlag", required = true) boolean configFlag) throws GatewayException { | ||
227 | + logger.info("enter updateIdentifyconfig with configFlag={}", configFlag); | ||
228 | + identifyService.updateIdentifyconfig(configFlag); | ||
229 | + return new ApiResponse.ApiResponseBuilder().code(200).build(); | ||
230 | + } | ||
216 | } | 231 | } |
@@ -30,4 +30,12 @@ public interface ProductIdentifyService { | @@ -30,4 +30,12 @@ public interface ProductIdentifyService { | ||
30 | void autoTransfer(Long orderCode, Integer toUid, Long buyerOrderCode); // 自动转移物权所属 | 30 | void autoTransfer(Long orderCode, Integer toUid, Long buyerOrderCode); // 自动转移物权所属 |
31 | 31 | ||
32 | Map<String, Object> getProductInfo(Long orderCode); | 32 | Map<String, Object> getProductInfo(Long orderCode); |
33 | + | ||
34 | + /** | ||
35 | + * 更新上链的配置,是走node还是java接口 | ||
36 | + * @param configFlag | ||
37 | + * @return | ||
38 | + * @throws GatewayException | ||
39 | + */ | ||
40 | + void updateIdentifyconfig(boolean configFlag); | ||
33 | } | 41 | } |
@@ -158,6 +158,8 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -158,6 +158,8 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
158 | @Autowired | 158 | @Autowired |
159 | OrderConfigConstant orderConfigConstant; | 159 | OrderConfigConstant orderConfigConstant; |
160 | 160 | ||
161 | + private volatile boolean configFlag = false; | ||
162 | + | ||
161 | private static final String UIC_PROFILE_URL = "/profile/getProfile"; | 163 | private static final String UIC_PROFILE_URL = "/profile/getProfile"; |
162 | 164 | ||
163 | public static final String DEFAULT_HEAD_IMG = "http://img11.static.yhbimg.com/yhb-img01/2016/07/05/13/017ec560b82c132ab2fdb22f7cf6f42b83.png?imageView/{mode}/w/{width}/h/{height}"; | 165 | public static final String DEFAULT_HEAD_IMG = "http://img11.static.yhbimg.com/yhb-img01/2016/07/05/13/017ec560b82c132ab2fdb22f7cf6f42b83.png?imageView/{mode}/w/{width}/h/{height}"; |
@@ -610,8 +612,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -610,8 +612,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
610 | if(null != productChain) { | 612 | if(null != productChain) { |
611 | infoMap.put("last_transaction_id", productChain.getTransactionId()); | 613 | infoMap.put("last_transaction_id", productChain.getTransactionId()); |
612 | } | 614 | } |
613 | - logger.info("req url is {}, params is {}", syncBlockChain_url, infoMap); | ||
614 | - String result = serviceCaller.call("ufoPlatform.addItem", infoMap, String.class, 5); | 615 | + logger.info("req url is {}, params is {}, configFlag is {}", syncBlockChain_url, infoMap, configFlag); |
616 | + String result ; | ||
617 | + if (configFlag) { | ||
618 | + result = serviceCaller.call("ufoPlatform.addItem", infoMap, String.class, 5); | ||
619 | + } else { | ||
620 | + result = serviceCaller.post("", syncBlockChain_url, infoMap, String.class, null).get(5); | ||
621 | + } | ||
622 | + | ||
615 | logger.info(" result is {}", result); | 623 | logger.info(" result is {}", result); |
616 | } | 624 | } |
617 | 625 | ||
@@ -1114,4 +1122,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -1114,4 +1122,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
1114 | throw new GatewayException(402, "鉴定信息不存在"); | 1122 | throw new GatewayException(402, "鉴定信息不存在"); |
1115 | } | 1123 | } |
1116 | } | 1124 | } |
1125 | + | ||
1126 | + /** | ||
1127 | + * 更新上链的配置,是走node还是java接口 | ||
1128 | + * @param configFlag | ||
1129 | + * @return | ||
1130 | + * @throws GatewayException | ||
1131 | + */ | ||
1132 | + public void updateIdentifyconfig(boolean configFlag) { | ||
1133 | + this.configFlag = configFlag; | ||
1134 | + } | ||
1117 | } | 1135 | } |
@@ -121,7 +121,7 @@ yoho.reviewed.controller.url=http://java-yoho-reviewed.test3.ingress.dev.yohocor | @@ -121,7 +121,7 @@ yoho.reviewed.controller.url=http://java-yoho-reviewed.test3.ingress.dev.yohocor | ||
121 | 121 | ||
122 | #rabbit address for transaction compensate | 122 | #rabbit address for transaction compensate |
123 | #rabbit_host=192.168.104.199:30005 | 123 | #rabbit_host=192.168.104.199:30005 |
124 | -rabbit_host=192.168.102.45:5672 | 124 | +rabbit_host=192.168.104.244:5672 |
125 | rabbit_user=yoho | 125 | rabbit_user=yoho |
126 | rabbit_password=yoho | 126 | rabbit_password=yoho |
127 | 127 |
@@ -119,7 +119,7 @@ consumer: | @@ -119,7 +119,7 @@ consumer: | ||
119 | interval: 4320 | 119 | interval: 4320 |
120 | 120 | ||
121 | # crm | 121 | # crm |
122 | - - address: 192.168.102.211:5672 | 122 | + - address: 192.168.104.244:5672 |
123 | consumers: | 123 | consumers: |
124 | # CRM发券 | 124 | # CRM发券 |
125 | - class: com.yohoufo.promotion.mq.CouponSendConsumer | 125 | - class: com.yohoufo.promotion.mq.CouponSendConsumer |
-
Please register or login to post a comment