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