Authored by caoyan

Merge branch 'dev_确认收货优化' into test6.9.7

# Conflicts:
#	order/src/main/java/com/yoho/ufo/order/service/IBuyerOrderService.java
@@ -10,6 +10,7 @@ import org.apache.commons.lang3.StringUtils; @@ -10,6 +10,7 @@ import org.apache.commons.lang3.StringUtils;
10 import org.slf4j.Logger; 10 import org.slf4j.Logger;
11 import org.slf4j.LoggerFactory; 11 import org.slf4j.LoggerFactory;
12 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.web.bind.annotation.RequestBody;
13 import org.springframework.web.bind.annotation.RequestMapping; 14 import org.springframework.web.bind.annotation.RequestMapping;
14 import org.springframework.web.bind.annotation.RequestParam; 15 import org.springframework.web.bind.annotation.RequestParam;
15 import org.springframework.web.bind.annotation.RestController; 16 import org.springframework.web.bind.annotation.RestController;
@@ -534,6 +535,16 @@ public class BuyerOrderController { @@ -534,6 +535,16 @@ public class BuyerOrderController {
534 PageResponseBO<String> result = buyerOrderService.queryAbnormalPackage(req); 535 PageResponseBO<String> result = buyerOrderService.queryAbnormalPackage(req);
535 return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(null == result ? new PageResponseBO<BuyerOrderResp>() : result).build(); 536 return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(null == result ? new PageResponseBO<BuyerOrderResp>() : result).build();
536 } 537 }
  538 +
  539 + @RequestMapping(value = "/queryIsExistCsCancelOrder")
  540 + public ApiResponse queryIsExistCsCancelOrder(BuyerOrderReq req) {
  541 + LOGGER.info("queryIsExistCsCancelOrder in. param is {}", req);
  542 + if(StringUtils.isEmpty(req.getSellerWaybillCode())) {
  543 + return new ApiResponse.ApiResponseBuilder().code(400).message("卖家快递单号不能为空").build();
  544 + }
  545 + boolean result = buyerOrderService.queryIsExistCsCancleOrder(req.getSellerWaybillCode());
  546 + return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(result).build();
  547 + }
537 548
538 549
539 @RequestMapping(value = "/queryIdentifyCenter") 550 @RequestMapping(value = "/queryIdentifyCenter")
@@ -124,4 +124,6 @@ public interface IBuyerOrderService { @@ -124,4 +124,6 @@ public interface IBuyerOrderService {
124 * @return 124 * @return
125 */ 125 */
126 ExpressCompany orderQueryExpressCompanyId(BuyerOrderReq req); 126 ExpressCompany orderQueryExpressCompanyId(BuyerOrderReq req);
  127 +
  128 + boolean queryIsExistCsCancleOrder(String sellerWaybillCode);
127 } 129 }
@@ -2563,6 +2563,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -2563,6 +2563,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
2563 return result; 2563 return result;
2564 } 2564 }
2565 2565
  2566 + @Override
  2567 + public boolean queryIsExistCsCancleOrder(String sellerWaybillCode) {
  2568 + boolean flag = false;
  2569 + List<BuyerOrder> orderList = queryOrderByQueryStr(sellerWaybillCode, null, null);
  2570 + if(CollectionUtils.isNotEmpty(orderList)) {
  2571 + for(BuyerOrder order : orderList) {
  2572 + if(order.getStatus().equals(Constant.CS_CANCEL_BEFORE_DEPOT_RECEIVE.getByteVal())) {//已取消(鉴定中心收货前客服取消)
  2573 + flag = true;
  2574 + break;
  2575 + }
  2576 + }
  2577 + }
  2578 + return flag;
  2579 +
  2580 + }
  2581 +
2566 private JSONObject updateBuyerReceiveInfo(BuyerOrderReq req, String oldMetaValue, Integer buyerUid) { 2582 private JSONObject updateBuyerReceiveInfo(BuyerOrderReq req, String oldMetaValue, Integer buyerUid) {
2567 JSONObject metaValue = JSONObject.parseObject(oldMetaValue); 2583 JSONObject metaValue = JSONObject.parseObject(oldMetaValue);
2568 metaValue.replace("consignee", req.getReceiveName()); 2584 metaValue.replace("consignee", req.getReceiveName());