|
@@ -58,6 +58,7 @@ import com.yoho.order.dal.AppraiseOrderStorageMapper; |
|
@@ -58,6 +58,7 @@ import com.yoho.order.dal.AppraiseOrderStorageMapper; |
58
|
import com.yoho.order.dal.BuyerOrderGoodsMapper;
|
58
|
import com.yoho.order.dal.BuyerOrderGoodsMapper;
|
59
|
import com.yoho.order.dal.BuyerOrderMapper;
|
59
|
import com.yoho.order.dal.BuyerOrderMapper;
|
60
|
import com.yoho.order.dal.BuyerOrderMetaMapper;
|
60
|
import com.yoho.order.dal.BuyerOrderMetaMapper;
|
|
|
61
|
+import com.yoho.order.dal.BuyerOrderStatusFlowMapper;
|
61
|
import com.yoho.order.dal.DepositOrderMapper;
|
62
|
import com.yoho.order.dal.DepositOrderMapper;
|
62
|
import com.yoho.order.dal.ExpressCompanyMapper;
|
63
|
import com.yoho.order.dal.ExpressCompanyMapper;
|
63
|
import com.yoho.order.dal.ExpressInfoMapper;
|
64
|
import com.yoho.order.dal.ExpressInfoMapper;
|
|
@@ -89,6 +90,7 @@ import com.yoho.order.model.BuyerOrderFeedback; |
|
@@ -89,6 +90,7 @@ import com.yoho.order.model.BuyerOrderFeedback; |
89
|
import com.yoho.order.model.BuyerOrderGoods;
|
90
|
import com.yoho.order.model.BuyerOrderGoods;
|
90
|
import com.yoho.order.model.BuyerOrderMeta;
|
91
|
import com.yoho.order.model.BuyerOrderMeta;
|
91
|
import com.yoho.order.model.BuyerOrderReq;
|
92
|
import com.yoho.order.model.BuyerOrderReq;
|
|
|
93
|
+import com.yoho.order.model.BuyerOrderStatusFlow;
|
92
|
import com.yoho.order.model.DepositOrder;
|
94
|
import com.yoho.order.model.DepositOrder;
|
93
|
import com.yoho.order.model.ExpressCompany;
|
95
|
import com.yoho.order.model.ExpressCompany;
|
94
|
import com.yoho.order.model.ExpressInfo;
|
96
|
import com.yoho.order.model.ExpressInfo;
|
|
@@ -308,6 +310,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
@@ -308,6 +310,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
308
|
@Autowired
|
310
|
@Autowired
|
309
|
private AppraiseOrderMetaMapper appraiseOrderMetaMapper;
|
311
|
private AppraiseOrderMetaMapper appraiseOrderMetaMapper;
|
310
|
|
312
|
|
|
|
313
|
+ @Autowired
|
|
|
314
|
+ private BuyerOrderStatusFlowMapper buyerOrderStatusFlowMapper;
|
|
|
315
|
+
|
311
|
private static final String BUYER_ORDER_META_KEY_DELIVERY_ADDRESS = "delivery_address";
|
316
|
private static final String BUYER_ORDER_META_KEY_DELIVERY_ADDRESS = "delivery_address";
|
312
|
|
317
|
|
313
|
private static final String BUYER_ORDER_META_KEY_HIDDEN_DELIVER_ADDRESS = "hidden_delivery_address";
|
318
|
private static final String BUYER_ORDER_META_KEY_HIDDEN_DELIVER_ADDRESS = "hidden_delivery_address";
|
|
@@ -412,7 +417,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
@@ -412,7 +417,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
412
|
Constant.BUYER_ORDER_STATUS_JUDGE_PASS.getByteVal(),//平台鉴定通过
|
417
|
Constant.BUYER_ORDER_STATUS_JUDGE_PASS.getByteVal(),//平台鉴定通过
|
413
|
Constant.BUYER_ORDER_STATUS_JUDGE_NOT_PASS.getByteVal(),//已取消(商品鉴定不通过)
|
418
|
Constant.BUYER_ORDER_STATUS_JUDGE_NOT_PASS.getByteVal(),//已取消(商品鉴定不通过)
|
414
|
Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal(),//无法鉴定
|
419
|
Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal(),//无法鉴定
|
415
|
- Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal());//已取消(买家在卖家发货后取消)
|
420
|
+ Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal(),//已取消(买家在卖家发货后取消)
|
|
|
421
|
+ Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal());//商品检测不通过
|
416
|
|
422
|
|
417
|
//已发货
|
423
|
//已发货
|
418
|
private static final List<Byte> alreadyDeliverList = Lists.newArrayList(Constant.BUYER_ORDER_STATUS_TO_BE_RECEIVED.getByteVal(),//平台已发货
|
424
|
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 |
|
@@ -421,7 +427,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
421
|
Constant.CANCEL_MINI_FAULT_REJECT.getByteVal(),//已取消(瑕疵确认不通过)
|
427
|
Constant.CANCEL_MINI_FAULT_REJECT.getByteVal(),//已取消(瑕疵确认不通过)
|
422
|
Constant.CANCEL_MINI_FAULT_OUT_TIME_REJECT.getByteVal(),//已取消(瑕疵确认超时)
|
428
|
Constant.CANCEL_MINI_FAULT_OUT_TIME_REJECT.getByteVal(),//已取消(瑕疵确认超时)
|
423
|
Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal(),//无法鉴定
|
429
|
Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal(),//无法鉴定
|
424
|
- Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal());//已取消(买家在卖家发货后取消)
|
430
|
+ Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal(),//已取消(买家在卖家发货后取消)
|
|
|
431
|
+ Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal());//商品检测不通过
|
425
|
|
432
|
|
426
|
//问题单
|
433
|
//问题单
|
427
|
private static final List<Byte> problemList = Lists.newArrayList(Constant.BUYER_ORDER_STATUS_MINI_FAULT_WAITING.getByteVal(),//瑕疵确认中
|
434
|
private static final List<Byte> problemList = Lists.newArrayList(Constant.BUYER_ORDER_STATUS_MINI_FAULT_WAITING.getByteVal(),//瑕疵确认中
|
|
@@ -1569,6 +1576,37 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
@@ -1569,6 +1576,37 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
1569
|
return jsonObject;
|
1576
|
return jsonObject;
|
1570
|
}
|
1577
|
}
|
1571
|
|
1578
|
|
|
|
1579
|
+ @Override
|
|
|
1580
|
+ public void detectionNotpass(BuyerOrderReq req) {
|
|
|
1581
|
+ BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(req.getOrderCode());
|
|
|
1582
|
+ if (null == buyerOrder) {
|
|
|
1583
|
+ throw new ServiceException(400, "订单不存在");
|
|
|
1584
|
+ }
|
|
|
1585
|
+
|
|
|
1586
|
+ if (Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal() == buyerOrder.getStatus().byteValue()) {
|
|
|
1587
|
+ return;
|
|
|
1588
|
+ }
|
|
|
1589
|
+ if (Constant.BUYER_ORDER_STATUS_PLATFORM_RECEIVE.getByteVal() != buyerOrder.getStatus().byteValue()) {
|
|
|
1590
|
+ throw new ServiceException(400, "错误:订单状态已变化");
|
|
|
1591
|
+ }
|
|
|
1592
|
+
|
|
|
1593
|
+ ufoLiveService.checkHasLiveVedioTime(Long.valueOf(req.getOrderCode())); // 检查是否有录制视频
|
|
|
1594
|
+
|
|
|
1595
|
+ int operateType = OperateTypeEnum.OPERATE_TYPE_DETECTION_NOT_PASS.getCode();
|
|
|
1596
|
+ UserHelper userHelper = new UserHelper();
|
|
|
1597
|
+ saveOrderOperateRecord(buyerOrder.getOrderCode(), userHelper, operateType, "");
|
|
|
1598
|
+ LOGGER.info("detectionNotpass saveOrderOperateRecord operateType={} ,order code ={} ,userHelper = {}", operateType, buyerOrder.getOrderCode(), userHelper);
|
|
|
1599
|
+ String args = "orderAppraise.detectNotPass";
|
|
|
1600
|
+ LOGGER.info("call ufo-gateway enter orderCode is {}, interface is {}", req.getOrderCode(), args);
|
|
|
1601
|
+ BuyerOrderCancelReq request = new BuyerOrderCancelReq();
|
|
|
1602
|
+ request.setUid(buyerOrder.getUid());
|
|
|
1603
|
+ request.setOrderCode(Long.valueOf(req.getOrderCode()));
|
|
|
1604
|
+ request.setCancelReason(req.getDetectionNotPassReason());
|
|
|
1605
|
+ request.setCancelType(Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal());
|
|
|
1606
|
+ JSONObject result = serviceCaller.asyncCall(args, request, JSONObject.class).get();
|
|
|
1607
|
+ LOGGER.info("call ufo-gateway orderCode is {}, interface is {},result is {}", req.getOrderCode(), args, result);
|
|
|
1608
|
+ }
|
|
|
1609
|
+
|
1572
|
private BuyerOrder checkParam4ExistOrder(BuyerOrderReq req){
|
1610
|
private BuyerOrder checkParam4ExistOrder(BuyerOrderReq req){
|
1573
|
LOGGER.info("checkParam4ExistOrder enter ,req = {}",req);
|
1611
|
LOGGER.info("checkParam4ExistOrder enter ,req = {}",req);
|
1574
|
boolean isBlankOrderCode = StringUtils.isBlank(req.getOrderCode());
|
1612
|
boolean isBlankOrderCode = StringUtils.isBlank(req.getOrderCode());
|
|
@@ -2917,6 +2955,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
@@ -2917,6 +2955,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
2917
|
|
2955
|
|
2918
|
resp.setAttributesStr(OrderConfigConstant.getOrderAttributeStr(buyerOrder.getAttributes(), sellerGoods.getRegion()));
|
2956
|
resp.setAttributesStr(OrderConfigConstant.getOrderAttributeStr(buyerOrder.getAttributes(), sellerGoods.getRegion()));
|
2919
|
|
2957
|
|
|
|
2958
|
+ queryDetectionNotPassReason(resp, buyerOrder.getOrderCode());
|
|
|
2959
|
+
|
2920
|
return resp;
|
2960
|
return resp;
|
2921
|
}
|
2961
|
}
|
2922
|
|
2962
|
|
|
@@ -4451,7 +4491,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
@@ -4451,7 +4491,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
4451
|
Constant.CANCEL_QUALITY_CHECK_FAKE.getByteVal(),
|
4491
|
Constant.CANCEL_QUALITY_CHECK_FAKE.getByteVal(),
|
4452
|
Constant.CANCEL_MINI_FAULT_REJECT.getByteVal(),
|
4492
|
Constant.CANCEL_MINI_FAULT_REJECT.getByteVal(),
|
4453
|
Constant.CANCEL_MINI_FAULT_OUT_TIME_REJECT.getByteVal(),
|
4493
|
Constant.CANCEL_MINI_FAULT_OUT_TIME_REJECT.getByteVal(),
|
4454
|
- Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal()
|
4494
|
+ Constant.BUYER_ORDER_STATUS_APPRAISE_UNSURE.getByteVal(),
|
|
|
4495
|
+ Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal()
|
4455
|
);
|
4496
|
);
|
4456
|
case 8:
|
4497
|
case 8:
|
4457
|
return Lists.newArrayList(Constant.BUYER_ORDER_STATUS_PLATFORM_RECEIVE.getByteVal());
|
4498
|
return Lists.newArrayList(Constant.BUYER_ORDER_STATUS_PLATFORM_RECEIVE.getByteVal());
|
|
@@ -4617,6 +4658,15 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
@@ -4617,6 +4658,15 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
4617
|
resp.setAbnormalTypeStr(OrderAbnormalTypeEnum.convertAbnormalTypeStr(order.getType().byteValue()));
|
4658
|
resp.setAbnormalTypeStr(OrderAbnormalTypeEnum.convertAbnormalTypeStr(order.getType().byteValue()));
|
4618
|
}
|
4659
|
}
|
4619
|
|
4660
|
|
|
|
4661
|
+ private void queryDetectionNotPassReason(QcOrderDetailResp resp, String orderCode) { // 查询异常订单信息
|
|
|
4662
|
+ BuyerOrderStatusFlow flow = buyerOrderStatusFlowMapper.selectByOrderCodeAndStatus(orderCode, Constant.BUYER_ORDER_STATUS_DECETION_NOT_PASS.getByteVal());
|
|
|
4663
|
+ if(null == flow) {
|
|
|
4664
|
+ return;
|
|
|
4665
|
+ }
|
|
|
4666
|
+
|
|
|
4667
|
+ resp.setDetectionNotPassReason(StringUtils.isEmpty(flow.getRemark()) ? "" : flow.getRemark());
|
|
|
4668
|
+ }
|
|
|
4669
|
+
|
4620
|
/**
|
4670
|
/**
|
4621
|
* 根据订单号查询具体的物流公司
|
4671
|
* 根据订单号查询具体的物流公司
|
4622
|
* @return
|
4672
|
* @return
|