Commit 3dd400bb by ping.wu

蜜雪并发接单重复推送两次消息过滤

parent e2276a8c
......@@ -59,7 +59,7 @@ public class SaasOrderHandle {
BaseOrderResponse confirmOrderResponse = orderCenterSdkService.orderConfirmTake(orderConfirmRequest);
//处理1秒重复接单问题 订单服务接单返回20067重复操作,20018状态机不支持认为接单成功
if ("20067".equals(confirmOrderResponse.getErrcode().toString()) || "20018".equals(confirmOrderResponse.getErrcode().toString()) || "50002".equals(confirmOrderResponse.getErrcode().toString())) {
return ResponseUtil.success();
return ResponseUtil.success(confirmOrderResponse.getErrcode());
}
if (ObjectUtils.notEqual(ResponseResult.SUCCESS.getCode(), confirmOrderResponse.getErrcode().toString())) {
throw new OrderServiceException(ResponseResult.ORDER_ACCEPT_FAILED);
......
......@@ -57,13 +57,14 @@ public class SaasOrderMangerServiceImpl implements OrderManagerService {
@Override
public BaseResponse<OrderManagerResponse> orderConfirm(OrderManagerRequest request, QueryOrdersResponse.DataBean.OrderBean orderBean) {
// 订单接单
saasOrderHandle.orderConfirm(request, orderBean);
BaseResponse baseResponse = saasOrderHandle.orderConfirm(request, orderBean);
//获取门店信息
StoreResponse storeInfo = storeCenterService.getStoreInfo(new StoreInfoRequest(orderBean.getCompanyId(), orderBean.getShopId()), "");
// 创建配送单
deliveryHandle.createDelivery(orderBean, request, storeInfo);
// 推送pos、微信消息中心
orderBaseService.sendMessage(orderBean, OperateType.ORDER_CONFIRM, request.getReason());
// 推送pos、微信消息中心 重复接单不重复推消息(针对蜜雪做的修改)
if(baseResponse != null && baseResponse.getResult() == null)
orderBaseService.sendMessage(orderBean, OperateType.ORDER_CONFIRM, request.getReason());
return ResponseUtil.success(new OrderManagerResponse(storeInfo.getBizVO().getOrderPrintConfig(), orderBean.getGmtExpect(),
CollectionUtils.isEmpty(orderBean.getRefundList()) ? null : RefundStatus.getByCode(orderBean.getRefundList().get(0).getStatus())));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment