merge
This commit is contained in:
@@ -10,6 +10,6 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class ExpressTrace {
|
||||
private String AcceptTime;
|
||||
private String AcceptStation;
|
||||
private String acceptTime;
|
||||
private String acceptStation;
|
||||
}
|
||||
|
||||
@@ -16,16 +16,16 @@ public class ExpressInfoVo {
|
||||
/**
|
||||
* 快递代码
|
||||
*/
|
||||
private String ShipperCode;
|
||||
private Boolean Success;
|
||||
private String shipperCode;
|
||||
private boolean success;
|
||||
/**
|
||||
* 运单号
|
||||
*/
|
||||
private String LogisticCode;
|
||||
private String logisticCode;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String State;
|
||||
private String state;
|
||||
/**
|
||||
* 物流信息
|
||||
*/
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ExpressDeliveryService {
|
||||
String result = KdniaoUtil.sendPost(reqURL, params);
|
||||
ExpressInfoVo infoVo = JSONObject.parseObject(result, ExpressInfoVo.class);
|
||||
if (infoVo != null) {
|
||||
Boolean success = infoVo.getSuccess();
|
||||
boolean success = infoVo.isSuccess();
|
||||
logger.info("查询快递信息:{}", success);
|
||||
if(success){
|
||||
String status= StringUtils.isNotEmpty(infoVo.getState()) ? infoVo.getState() : "0";
|
||||
@@ -107,21 +107,7 @@ public class ExpressDeliveryService {
|
||||
info.setLogisticCode("211386517825");
|
||||
try {
|
||||
ExpressInfoVo result = api.queryOrderTraces(info);
|
||||
String status = result.getState();
|
||||
if (StringUtils.isEmpty(status)) {
|
||||
status = String.valueOf(0);
|
||||
}
|
||||
String describe = null;
|
||||
//更新订单物流状态
|
||||
for (CommonEnum.ExpressStatusEnum statusEnum : CommonEnum.ExpressStatusEnum.values()) {
|
||||
int value = statusEnum.getValue();
|
||||
if (Integer.valueOf(status) == value) {
|
||||
describe = statusEnum.getName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// TODO: 2017/11/17
|
||||
System.out.print(describe);
|
||||
// TODO: 根据公司业务处理返回的信息......
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user