ordersMapper.updateById(updateObj);

This commit is contained in:
Owen 2025-01-13 09:47:10 +08:00
parent f765fd9579
commit 91a6ad43aa
2 changed files with 32 additions and 13 deletions

View File

@ -314,6 +314,7 @@ public class HaiNanDianXinApi {
*/
@Data
public static class OrderProdInst {
public String prodNo; // 产品编码
public String prodName; // 产品名称
public String prodInstAct; // 产品动作ADD/DEL/EDIT
}

View File

@ -93,7 +93,11 @@ public class HaiNanDxApiDealStrategy implements ApiDealStrategy {
createParam.setBusiScenarioCode(configs.getString("ApiPrefix_busiScenarioCode"));
createParam.setOrderType(configs.getString("ApiPrefix_orderType"));
HaiNanDianXinApi.OrderProdInst orderProdInst = new HaiNanDianXinApi.OrderProdInst();
orderProdInst.setProdName(configs.getString("ApiPrefix_prodNo"));
String string = configs.getString("ApiPrefix_prodNo");
orderProdInst.setProdNo(string);
orderProdInst.setProdName(configs.getString("ApiPrefix_prodName"));
orderProdInst.setProdInstAct(configs.getString("ApiPrefix_prodInstAct"));
createParam.setOrderProdInst(orderProdInst);
@ -102,8 +106,6 @@ public class HaiNanDxApiDealStrategy implements ApiDealStrategy {
}
// 0占用号码 lianTongZhanHao
// 1提交资料 lianTongSubmitUserInfo
// 2提交预订单 得到token lianTongPreOrderSync
@ -113,16 +115,32 @@ public class HaiNanDxApiDealStrategy implements ApiDealStrategy {
try {
logVO.setParam(JSON.toJSONString(createParam));
HaiNanDianXinApi.HaiNanResponseInfo<HaiNanDianXinApi.SynOrderInfoResponse> responseInfo
= apiHaiNanDXService.synOrderInfo(logVO, haokaSuperiorApiId,createParam);
= apiHaiNanDXService.synOrderInfo(logVO, haokaSuperiorApiId, createParam);
HaiNanDianXinApi.SynOrderInfoResponse data = responseInfo.getData();
if (data == null) {
// return ApiDealResp.failed(responseInfo.getErrMsg());
String msg = "";
if (StringUtils.isNotEmpty(responseInfo.getErrMsg())) {
msg = msg + responseInfo.getErrMsg();
}
if (StringUtils.isNotEmpty(responseInfo.getMessage())) {
msg = msg + responseInfo.getMessage();
}
if (StringUtils.isNotEmpty(responseInfo.getReason())) {
msg = msg + responseInfo.getReason();
}
if (StringUtils.isNotEmpty(responseInfo.getReferenceError())) {
msg = msg + responseInfo.getReferenceError();
}
if (StringUtils.isEmpty( msg) ){
msg = "上游接口返回信息为空";
}
superApiResponse.setOrderStatusCode("0");
superApiResponse.setSupplierOrderStatusDesc("上游接口返回信息为空");
superApiResponse.setSupplierOrderStatusDesc(msg);
return ApiDealResp.ok(superApiResponse);
}
if (!"1000".equals(data.getResultCode()) ) {
if (!"1000".equals(data.getResultCode())) {
// return ApiDealResp.failed(responseInfo.getErrMsg());
superApiResponse.setOrderStatusCode("0");
@ -160,7 +178,7 @@ public class HaiNanDxApiDealStrategy implements ApiDealStrategy {
queryParam.setQueryType("1");
queryParam.setOrderCode(param.getSupplierOrderId());
HaiNanDianXinApi.HaiNanResponseInfo<String> responseInfo = apiHaiNanDXService.queryOrderInfo(logVO, haokaSuperiorApiId,queryParam);
HaiNanDianXinApi.HaiNanResponseInfo<String> responseInfo = apiHaiNanDXService.queryOrderInfo(logVO, haokaSuperiorApiId, queryParam);
String data = responseInfo.getData();
if (data == null) {
@ -170,7 +188,7 @@ public class HaiNanDxApiDealStrategy implements ApiDealStrategy {
JSONArray jsonArray = JSON.parseArray(data);
if (null==jsonArray){
if (null == jsonArray) {
// return ApiDealResp.failed("上游接口返回信息为空");
orderApiQueryResp.setOrderStatusCode("0");
@ -179,7 +197,7 @@ public class HaiNanDxApiDealStrategy implements ApiDealStrategy {
}
JSONObject jsonObject = jsonArray.getJSONObject(0);
if (null==jsonObject){
if (null == jsonObject) {
// return ApiDealResp.failed("上游接口返回信息为空");
orderApiQueryResp.setOrderStatusCode("0");
@ -195,7 +213,7 @@ public class HaiNanDxApiDealStrategy implements ApiDealStrategy {
orderApiQueryResp.setOrderStatusCode("470");
JSONObject orderLogisticInfo = jsonObject.getJSONObject("orderLogisticInfo");
if (orderLogisticInfo!=null){
if (orderLogisticInfo != null) {
// 物流编号 logisticNbr
String logisticNbr = orderLogisticInfo.getString("logisticNbr");
orderApiQueryResp.setTrackingNumber(logisticNbr);