Authored by TANLING

Merge branch 'test6.9.24' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.24

... ... @@ -213,4 +213,19 @@ public class ProductIdentifyController {
return new ApiResponse.ApiResponseBuilder().code(402).message("查询失败,请稍后重试").build();
}
}
/**
* 更新上链的配置,是走node还是java接口
* @param configFlag
* @return
* @throws GatewayException
*/
@IgnoreSignature
@IgnoreSession
@RequestMapping(params = "method=ufo.product.updateIdentifyconfig")
public ApiResponse updateIdentifyconfig(@RequestParam(value = "configFlag", required = true) boolean configFlag) throws GatewayException {
logger.info("enter updateIdentifyconfig with configFlag={}", configFlag);
identifyService.updateIdentifyconfig(configFlag);
return new ApiResponse.ApiResponseBuilder().code(200).build();
}
}
\ No newline at end of file
... ...
... ... @@ -30,4 +30,12 @@ public interface ProductIdentifyService {
void autoTransfer(Long orderCode, Integer toUid, Long buyerOrderCode); // 自动转移物权所属
Map<String, Object> getProductInfo(Long orderCode);
/**
* 更新上链的配置,是走node还是java接口
* @param configFlag
* @return
* @throws GatewayException
*/
void updateIdentifyconfig(boolean configFlag);
}
... ...
... ... @@ -158,6 +158,8 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
@Autowired
OrderConfigConstant orderConfigConstant;
private volatile boolean configFlag = false;
private static final String UIC_PROFILE_URL = "/profile/getProfile";
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{
if(null != productChain) {
infoMap.put("last_transaction_id", productChain.getTransactionId());
}
logger.info("req url is {}, params is {}", syncBlockChain_url, infoMap);
String result = serviceCaller.call("ufoPlatform.addItem", infoMap, String.class, 5);
logger.info("req url is {}, params is {}, configFlag is {}", syncBlockChain_url, infoMap, configFlag);
String result ;
if (configFlag) {
result = serviceCaller.call("ufoPlatform.addItem", infoMap, String.class, 5);
} else {
result = serviceCaller.post("", syncBlockChain_url, infoMap, String.class, null).get(5);
}
logger.info(" result is {}", result);
}
... ... @@ -1114,4 +1122,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
throw new GatewayException(402, "鉴定信息不存在");
}
}
/**
* 更新上链的配置,是走node还是java接口
* @param configFlag
* @return
* @throws GatewayException
*/
public void updateIdentifyconfig(boolean configFlag) {
this.configFlag = configFlag;
}
}
... ...
... ... @@ -121,7 +121,7 @@ yoho.reviewed.controller.url=http://java-yoho-reviewed.test3.ingress.dev.yohocor
#rabbit address for transaction compensate
#rabbit_host=192.168.104.199:30005
rabbit_host=192.168.102.45:5672
rabbit_host=192.168.104.244:5672
rabbit_user=yoho
rabbit_password=yoho
... ...
... ... @@ -119,7 +119,7 @@ consumer:
interval: 4320
# crm
- address: 192.168.102.211:5672
- address: 192.168.104.244:5672
consumers:
# CRM发券
- class: com.yohoufo.promotion.mq.CouponSendConsumer
... ...