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;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
... ... @@ -534,6 +535,16 @@ public class BuyerOrderController {
PageResponseBO<String> result = buyerOrderService.queryAbnormalPackage(req);
return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(null == result ? new PageResponseBO<BuyerOrderResp>() : result).build();
}
@RequestMapping(value = "/queryIsExistCsCancelOrder")
public ApiResponse queryIsExistCsCancelOrder(BuyerOrderReq req) {
LOGGER.info("queryIsExistCsCancelOrder in. param is {}", req);
if(StringUtils.isEmpty(req.getSellerWaybillCode())) {
return new ApiResponse.ApiResponseBuilder().code(400).message("卖家快递单号不能为空").build();
}
boolean result = buyerOrderService.queryIsExistCsCancleOrder(req.getSellerWaybillCode());
return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(result).build();
}
@RequestMapping(value = "/queryIdentifyCenter")
... ...
... ... @@ -124,4 +124,6 @@ public interface IBuyerOrderService {
* @return
*/
ExpressCompany orderQueryExpressCompanyId(BuyerOrderReq req);
boolean queryIsExistCsCancleOrder(String sellerWaybillCode);
}
... ...
... ... @@ -2563,6 +2563,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
return result;
}
@Override
public boolean queryIsExistCsCancleOrder(String sellerWaybillCode) {
boolean flag = false;
List<BuyerOrder> orderList = queryOrderByQueryStr(sellerWaybillCode, null, null);
if(CollectionUtils.isNotEmpty(orderList)) {
for(BuyerOrder order : orderList) {
if(order.getStatus().equals(Constant.CS_CANCEL_BEFORE_DEPOT_RECEIVE.getByteVal())) {//已取消(鉴定中心收货前客服取消)
flag = true;
break;
}
}
}
return flag;
}
private JSONObject updateBuyerReceiveInfo(BuyerOrderReq req, String oldMetaValue, Integer buyerUid) {
JSONObject metaValue = JSONObject.parseObject(oldMetaValue);
metaValue.replace("consignee", req.getReceiveName());
... ...