...
|
...
|
@@ -58,6 +58,7 @@ import com.yoho.order.dal.AppraiseOrderStorageMapper; |
|
|
import com.yoho.order.dal.BuyerOrderGoodsMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderMetaMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderStatusFlowMapper;
|
|
|
import com.yoho.order.dal.DepositOrderMapper;
|
|
|
import com.yoho.order.dal.ExpressCompanyMapper;
|
|
|
import com.yoho.order.dal.ExpressInfoMapper;
|
...
|
...
|
@@ -89,6 +90,7 @@ import com.yoho.order.model.BuyerOrderFeedback; |
|
|
import com.yoho.order.model.BuyerOrderGoods;
|
|
|
import com.yoho.order.model.BuyerOrderMeta;
|
|
|
import com.yoho.order.model.BuyerOrderReq;
|
|
|
import com.yoho.order.model.BuyerOrderStatusFlow;
|
|
|
import com.yoho.order.model.DepositOrder;
|
|
|
import com.yoho.order.model.ExpressCompany;
|
|
|
import com.yoho.order.model.ExpressInfo;
|
...
|
...
|
@@ -308,6 +310,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
@Autowired
|
|
|
private AppraiseOrderMetaMapper appraiseOrderMetaMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BuyerOrderStatusFlowMapper buyerOrderStatusFlowMapper;
|
|
|
|
|
|
private static final String BUYER_ORDER_META_KEY_DELIVERY_ADDRESS = "delivery_address";
|
|
|
|
|
|
private static final String BUYER_ORDER_META_KEY_HIDDEN_DELIVER_ADDRESS = "hidden_delivery_address";
|
...
|
...
|
@@ -412,7 +417,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
Constant.BUYER_ORDER_STATUS_JUDGE_PASS.getByteVal(),//平台鉴定通过
|
|
|
Constant.BUYER_ORDER_STATUS_JUDGE_NOT_PASS.getByteVal(),//已取消(商品鉴定不通过)
|
|
|
Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal(),//无法鉴定
|
|
|
Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal());//已取消(买家在卖家发货后取消)
|
|
|
Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal(),//已取消(买家在卖家发货后取消)
|
|
|
Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal());//商品检测不通过
|
|
|
|
|
|
//已发货
|
|
|
private static final List<Byte> alreadyDeliverList = Lists.newArrayList(Constant.BUYER_ORDER_STATUS_TO_BE_RECEIVED.getByteVal(),//平台已发货
|
...
|
...
|
@@ -421,7 +427,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
Constant.CANCEL_MINI_FAULT_REJECT.getByteVal(),//已取消(瑕疵确认不通过)
|
|
|
Constant.CANCEL_MINI_FAULT_OUT_TIME_REJECT.getByteVal(),//已取消(瑕疵确认超时)
|
|
|
Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal(),//无法鉴定
|
|
|
Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal());//已取消(买家在卖家发货后取消)
|
|
|
Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal(),//已取消(买家在卖家发货后取消)
|
|
|
Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal());//商品检测不通过
|
|
|
|
|
|
//问题单
|
|
|
private static final List<Byte> problemList = Lists.newArrayList(Constant.BUYER_ORDER_STATUS_MINI_FAULT_WAITING.getByteVal(),//瑕疵确认中
|
...
|
...
|
@@ -1568,6 +1575,37 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void detectionNotpass(BuyerOrderReq req) {
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(req.getOrderCode());
|
|
|
if (null == buyerOrder) {
|
|
|
throw new ServiceException(400, "订单不存在");
|
|
|
}
|
|
|
|
|
|
if (Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal() == buyerOrder.getStatus().byteValue()) {
|
|
|
return;
|
|
|
}
|
|
|
if (Constant.BUYER_ORDER_STATUS_PLATFORM_RECEIVE.getByteVal() != buyerOrder.getStatus().byteValue()) {
|
|
|
throw new ServiceException(400, "错误:订单状态已变化");
|
|
|
}
|
|
|
|
|
|
ufoLiveService.checkHasLiveVedioTime(Long.valueOf(req.getOrderCode())); // 检查是否有录制视频
|
|
|
|
|
|
int operateType = OperateTypeEnum.OPERATE_TYPE_DETECTION_NOT_PASS.getCode();
|
|
|
UserHelper userHelper = new UserHelper();
|
|
|
saveOrderOperateRecord(buyerOrder.getOrderCode(), userHelper, operateType, "");
|
|
|
LOGGER.info("detectionNotpass saveOrderOperateRecord operateType={} ,order code ={} ,userHelper = {}", operateType, buyerOrder.getOrderCode(), userHelper);
|
|
|
String args = "orderAppraise.detectNotPass";
|
|
|
LOGGER.info("call ufo-gateway enter orderCode is {}, interface is {}", req.getOrderCode(), args);
|
|
|
BuyerOrderCancelReq request = new BuyerOrderCancelReq();
|
|
|
request.setUid(buyerOrder.getUid());
|
|
|
request.setOrderCode(Long.valueOf(req.getOrderCode()));
|
|
|
request.setCancelReason(req.getDetectionNotPassReason());
|
|
|
request.setCancelType(Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal());
|
|
|
JSONObject result = serviceCaller.asyncCall(args, request, JSONObject.class).get();
|
|
|
LOGGER.info("call ufo-gateway orderCode is {}, interface is {},result is {}", req.getOrderCode(), args, result);
|
|
|
}
|
|
|
|
|
|
private BuyerOrder checkParam4ExistOrder(BuyerOrderReq req){
|
|
|
LOGGER.info("checkParam4ExistOrder enter ,req = {}",req);
|
...
|
...
|
@@ -2914,9 +2952,11 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
queryStorageDeposit(resp, buyerOrder.getOrderCode()); //查询寄存信息
|
|
|
|
|
|
queryAbnormalOrder(resp, buyerOrder.getOrderCode());//查询异常订单信息
|
|
|
|
|
|
|
|
|
resp.setAttributesStr(OrderConfigConstant.getOrderAttributeStr(buyerOrder.getAttributes(), sellerGoods.getRegion()));
|
|
|
|
|
|
queryDetectionNotPassReason(resp, buyerOrder.getOrderCode());
|
|
|
|
|
|
return resp;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -4451,7 +4491,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
Constant.CANCEL_QUALITY_CHECK_FAKE.getByteVal(),
|
|
|
Constant.CANCEL_MINI_FAULT_REJECT.getByteVal(),
|
|
|
Constant.CANCEL_MINI_FAULT_OUT_TIME_REJECT.getByteVal(),
|
|
|
Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal()
|
|
|
Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal(),
|
|
|
Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal()
|
|
|
);
|
|
|
case 8:
|
|
|
return Lists.newArrayList(Constant.BUYER_ORDER_STATUS_PLATFORM_RECEIVE.getByteVal());
|
...
|
...
|
@@ -4616,6 +4657,15 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
|
|
|
resp.setAbnormalTypeStr(OrderAbnormalTypeEnum.convertAbnormalTypeStr(order.getType().byteValue()));
|
|
|
}
|
|
|
|
|
|
private void queryDetectionNotPassReason(QcOrderDetailResp resp, String orderCode) { // 查询异常订单信息
|
|
|
BuyerOrderStatusFlow flow = buyerOrderStatusFlowMapper.selectByOrderCodeAndStatus(orderCode, Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal());
|
|
|
if(null == flow) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
resp.setDetectionNotPassReason(StringUtils.isEmpty(flow.getRemark()) ? "" : flow.getRemark());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据订单号查询具体的物流公司
|
...
|
...
|
|