Authored by qinchao

瑕疵不接受和超时确定状态

... ... @@ -36,14 +36,10 @@ public class BuyerOrderMiniFaultOuterTimeDelayMsgConsumer implements YhConsumer
logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} ", getMessageTopic(), o);
BuyerMiniFaultOuterTimeEvent event = JSONObject.parseObject(o.toString(), BuyerMiniFaultOuterTimeEvent.class);
//Integer buyerUid = event.getUid();
Long orderCode = event.getOrderCode();
//AppraiseExpressInfoBo appraiseExpressInfoBo = new AppraiseExpressInfoBo();
//appraiseExpressInfoBo.setOrderCode(orderCode);
//OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;
//int type= 4; //1 鉴定不通过 ;2 质检不通过 ; 3,瑕疵确认不通过 ,4,瑕疵确认不通过(超时)
appraiseService.miniFaultReject(orderCode,true);
OrderStatus targetStatus = OrderStatus.MINI_FAULT_OUT_TIME_REJECT;
appraiseService.miniFaultReject(orderCode,targetStatus,true);
logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} finish", getMessageTopic(), event);
}
... ...
... ... @@ -265,8 +265,8 @@ public class AppraiseService {
* @outTimeFlag 超时
* @return
*/
public ApiResponse miniFaultReject(Long orderCode,boolean outTimeFlag){
LOGGER.info("miniFaultReject enter , orderCode {} ,outTimeFlag {}", orderCode ,outTimeFlag);
public ApiResponse miniFaultReject(Long orderCode,OrderStatus targetStatus,boolean outTimeFlag){
LOGGER.info("miniFaultReject enter , orderCode {} ,targetStatus {},outTimeFlag {}", orderCode ,targetStatus ,outTimeFlag);
OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;
ApiResponse apiResponse=new ApiResponse();
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
... ... @@ -281,9 +281,8 @@ public class AppraiseService {
buyerOrder.getStatus(), orderCode);
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
}
// 更新买家订单状态 为鉴定不通过
// 更新买家订单状态
int buyerUid = buyerOrder.getUid();
OrderStatus targetStatus = OrderStatus.CHECKING_FAKE;
LOGGER.info("miniFaultReject update buyer order {} ", buyerOrder);
int rows = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid, expectStatus.getCode(), targetStatus.getCode(),
DateUtil.getCurrentTimeSecond());
... ...
... ... @@ -836,20 +836,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
logger.info("Buyer Order miniFaultReject (OrderRequest) {}", orderRequest);
//订单状态变更为 鉴定不通过 ,记录调拨的物流信息 ,发消息 ,
OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;
//OrderStatus targetStatus = OrderStatus.CHECKING_FAKE;
OrderStatus targetStatus = OrderStatus.MINI_FAULT_REJECT;
// 参数检查
DataNode node = checkBase(orderRequest);
checkStatus(node,orderRequest, expectStatus);
//int uid=orderRequest.getUid();
long orderCode=orderRequest.getOrderCode();
//BuyerOrder buyerOrder = node.buyerOrderInDB;
//int sellerUid = buyerOrder.getSellerUid();
//调用鉴定不通过的逻辑
//AppraiseExpressInfoBo appraiseExpressInfoBo=new AppraiseExpressInfoBo();
//appraiseExpressInfoBo.setOrderCode(orderCode);
ApiResponse result=appraiseService.miniFaultReject(orderCode,false);
ApiResponse result=appraiseService.miniFaultReject(orderCode,targetStatus,false);
if(result!=null&&result.getCode()==200){
//TODO 发消息
... ...