...
|
...
|
@@ -564,7 +564,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
|
|
|
String args = "orderAppraise.appraiseSuccess";
|
|
|
LOGGER.info("judgePass begin call enter interface is {}, orderCode is {}", buyerOrder.getOrderCode(), args);
|
|
|
//JSONObject jsonObject = asyncCallJudgeResultUpdate(args, buyerOrder.getOrderCode());
|
|
|
|
|
|
//重新设置mobile
|
|
|
restMobileFromBuyer(req,buyerOrder.getOrderCode());
|
|
|
JSONObject jsonObject = asyncCallAppraise(args, buyerOrder.getOrderCode(), req);
|
...
|
...
|
@@ -573,6 +573,68 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
//鉴定通过 :更新订单状态为judge_pass ,期望状态有两种情况:平台鉴定中或者瑕疵接受了
|
|
|
public JSONObject judgeCenterPass(String orderCode){
|
|
|
if(StringUtils.isBlank(orderCode)){
|
|
|
throw new ServiceException(400,"参数错误");
|
|
|
}
|
|
|
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
|
|
if(null == buyerOrder) {
|
|
|
throw new ServiceException(400,"订单不存在");
|
|
|
}
|
|
|
|
|
|
if( Constant.BUYER_ORDER_STATUS_JUDGING.getByteVal()!=buyerOrder.getStatus().byteValue()
|
|
|
&& Constant.BUYER_ORDER_STATUS_MINI_FAULT_ACCEPT.getByteVal()!=buyerOrder.getStatus().byteValue()){
|
|
|
throw new ServiceException(400,"错误:订单状态变化,鉴定通过失败,请重新刷新列表");
|
|
|
}
|
|
|
|
|
|
//记录操作日志
|
|
|
int operateType =OperateTypeEnum.ONLY_JUDGE_PASS.getCode();
|
|
|
UserHelper userHelper = new UserHelper();
|
|
|
saveOrderOperateRecord(buyerOrder.getOrderCode(), userHelper, operateType, "");
|
|
|
|
|
|
|
|
|
String args = "orderAppraise.judgeCenterPass";
|
|
|
LOGGER.info("judgeCenterPass begin call enter interface is {}, orderCode is {}", buyerOrder.getOrderCode(), args);
|
|
|
JSONObject jsonObject = asyncCallJudgeResultUpdate(args, buyerOrder.getOrderCode());
|
|
|
LOGGER.info("judgeCenterPass saveOrderOperateRecord operateType={} ,order code ={} ,userHelper = {} ,result json {}",operateType,buyerOrder.getOrderCode() ,userHelper,jsonObject);
|
|
|
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
//鉴定通过 :更新订单状态为judge_pass ,期望状态有两种情况:平台鉴定中或者瑕疵接受了
|
|
|
public JSONObject judgeCenterNotPass(String orderCode){
|
|
|
if(StringUtils.isBlank(orderCode)){
|
|
|
throw new ServiceException(400,"参数错误");
|
|
|
}
|
|
|
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
|
|
if(null == buyerOrder) {
|
|
|
throw new ServiceException(400,"订单不存在");
|
|
|
}
|
|
|
|
|
|
if( Constant.BUYER_ORDER_STATUS_JUDGING.getByteVal()!=buyerOrder.getStatus().byteValue()
|
|
|
&& Constant.BUYER_ORDER_STATUS_MINI_FAULT_ACCEPT.getByteVal()!=buyerOrder.getStatus().byteValue()){
|
|
|
throw new ServiceException(400,"错误:订单状态变化,鉴定通过失败,请重新刷新列表");
|
|
|
}
|
|
|
|
|
|
//记录操作日志
|
|
|
int operateType =OperateTypeEnum.ONLY_JUDGE_REJECT.getCode();
|
|
|
UserHelper userHelper = new UserHelper();
|
|
|
saveOrderOperateRecord(buyerOrder.getOrderCode(), userHelper, operateType, "");
|
|
|
|
|
|
|
|
|
String args = "orderAppraise.judgeCenterNotPass";
|
|
|
LOGGER.info("judgeCenterNotPass begin call enter interface is {}, orderCode is {}", buyerOrder.getOrderCode(), args);
|
|
|
JSONObject jsonObject = asyncCallJudgeResultUpdate(args, buyerOrder.getOrderCode());
|
|
|
LOGGER.info("judgeCenterNotPass saveOrderOperateRecord operateType={} ,order code ={} ,userHelper = {} ,result json {}",operateType,buyerOrder.getOrderCode() ,userHelper,jsonObject);
|
|
|
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//鉴定不通过
|
|
|
public JSONObject judgeRejectAndDelivery(BuyerOrderReq req){
|
...
|
...
|
@@ -604,14 +666,14 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
/*private JSONObject asyncCallJudgeResultUpdate(String args, String orderCode) {
|
|
|
private JSONObject asyncCallJudgeResultUpdate(String args, String orderCode) {
|
|
|
LOGGER.info("call asyncCallJudgeResultUpdate enter orderCode is {}, interface is {},result is {}", orderCode, args);
|
|
|
OrderRequest request = new OrderRequest();
|
|
|
request.setOrderCode(Long.valueOf(orderCode));
|
|
|
JSONObject jsonObject = serviceCaller.asyncCall(args, request, JSONObject.class).get(5, TimeUnit.SECONDS);
|
|
|
LOGGER.info("call asyncCallJudgeResultUpdate orderCode is {}, interface is {},result is {}", orderCode, args, jsonObject.toJSONString());
|
|
|
return jsonObject;
|
|
|
}*/
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
public JSONObject updateOrderStatus(BuyerOrderReq req) {
|
...
|
...
|
|