Authored by qinchao

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

@@ -36,14 +36,10 @@ public class BuyerOrderMiniFaultOuterTimeDelayMsgConsumer implements YhConsumer @@ -36,14 +36,10 @@ public class BuyerOrderMiniFaultOuterTimeDelayMsgConsumer implements YhConsumer
36 logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} ", getMessageTopic(), o); 36 logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} ", getMessageTopic(), o);
37 37
38 BuyerMiniFaultOuterTimeEvent event = JSONObject.parseObject(o.toString(), BuyerMiniFaultOuterTimeEvent.class); 38 BuyerMiniFaultOuterTimeEvent event = JSONObject.parseObject(o.toString(), BuyerMiniFaultOuterTimeEvent.class);
39 - //Integer buyerUid = event.getUid();  
40 Long orderCode = event.getOrderCode(); 39 Long orderCode = event.getOrderCode();
41 40
42 - //AppraiseExpressInfoBo appraiseExpressInfoBo = new AppraiseExpressInfoBo();  
43 - //appraiseExpressInfoBo.setOrderCode(orderCode);  
44 - //OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;  
45 - //int type= 4; //1 鉴定不通过 ;2 质检不通过 ; 3,瑕疵确认不通过 ,4,瑕疵确认不通过(超时)  
46 - appraiseService.miniFaultReject(orderCode,true); 41 + OrderStatus targetStatus = OrderStatus.MINI_FAULT_OUT_TIME_REJECT;
  42 + appraiseService.miniFaultReject(orderCode,targetStatus,true);
47 43
48 logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} finish", getMessageTopic(), event); 44 logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} finish", getMessageTopic(), event);
49 } 45 }
@@ -265,8 +265,8 @@ public class AppraiseService { @@ -265,8 +265,8 @@ public class AppraiseService {
265 * @outTimeFlag 超时 265 * @outTimeFlag 超时
266 * @return 266 * @return
267 */ 267 */
268 - public ApiResponse miniFaultReject(Long orderCode,boolean outTimeFlag){  
269 - LOGGER.info("miniFaultReject enter , orderCode {} ,outTimeFlag {}", orderCode ,outTimeFlag); 268 + public ApiResponse miniFaultReject(Long orderCode,OrderStatus targetStatus,boolean outTimeFlag){
  269 + LOGGER.info("miniFaultReject enter , orderCode {} ,targetStatus {},outTimeFlag {}", orderCode ,targetStatus ,outTimeFlag);
270 OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE; 270 OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;
271 ApiResponse apiResponse=new ApiResponse(); 271 ApiResponse apiResponse=new ApiResponse();
272 BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode); 272 BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
@@ -281,9 +281,8 @@ public class AppraiseService { @@ -281,9 +281,8 @@ public class AppraiseService {
281 buyerOrder.getStatus(), orderCode); 281 buyerOrder.getStatus(), orderCode);
282 throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE); 282 throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
283 } 283 }
284 - // 更新买家订单状态 为鉴定不通过 284 + // 更新买家订单状态
285 int buyerUid = buyerOrder.getUid(); 285 int buyerUid = buyerOrder.getUid();
286 - OrderStatus targetStatus = OrderStatus.CHECKING_FAKE;  
287 LOGGER.info("miniFaultReject update buyer order {} ", buyerOrder); 286 LOGGER.info("miniFaultReject update buyer order {} ", buyerOrder);
288 int rows = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid, expectStatus.getCode(), targetStatus.getCode(), 287 int rows = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid, expectStatus.getCode(), targetStatus.getCode(),
289 DateUtil.getCurrentTimeSecond()); 288 DateUtil.getCurrentTimeSecond());
@@ -836,20 +836,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -836,20 +836,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
836 logger.info("Buyer Order miniFaultReject (OrderRequest) {}", orderRequest); 836 logger.info("Buyer Order miniFaultReject (OrderRequest) {}", orderRequest);
837 //订单状态变更为 鉴定不通过 ,记录调拨的物流信息 ,发消息 , 837 //订单状态变更为 鉴定不通过 ,记录调拨的物流信息 ,发消息 ,
838 OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE; 838 OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;
839 - //OrderStatus targetStatus = OrderStatus.CHECKING_FAKE; 839 + OrderStatus targetStatus = OrderStatus.MINI_FAULT_REJECT;
840 // 参数检查 840 // 参数检查
841 DataNode node = checkBase(orderRequest); 841 DataNode node = checkBase(orderRequest);
842 checkStatus(node,orderRequest, expectStatus); 842 checkStatus(node,orderRequest, expectStatus);
843 - //int uid=orderRequest.getUid();  
844 long orderCode=orderRequest.getOrderCode(); 843 long orderCode=orderRequest.getOrderCode();
845 -  
846 - //BuyerOrder buyerOrder = node.buyerOrderInDB;  
847 - //int sellerUid = buyerOrder.getSellerUid();  
848 -  
849 - //调用鉴定不通过的逻辑  
850 - //AppraiseExpressInfoBo appraiseExpressInfoBo=new AppraiseExpressInfoBo();  
851 - //appraiseExpressInfoBo.setOrderCode(orderCode);  
852 - ApiResponse result=appraiseService.miniFaultReject(orderCode,false); 844 + ApiResponse result=appraiseService.miniFaultReject(orderCode,targetStatus,false);
853 845
854 if(result!=null&&result.getCode()==200){ 846 if(result!=null&&result.getCode()==200){
855 //TODO 发消息 847 //TODO 发消息