Commit 3acdeed9 by ping.wu

Merge branch 'feature/20240104_美团外卖出餐限制一分钟_wuping' of…

Merge branch 'feature/20240104_美团外卖出餐限制一分钟_wuping' of https://gitlab.freemud.com/order-group-application/order-group
parents 26c4a61e 73d94a25
...@@ -173,8 +173,8 @@ public enum ResponseResult { ...@@ -173,8 +173,8 @@ public enum ResponseResult {
AGREE_REFUND_APPLY_ORDER_NOT_ALLOW("45088", "商户配置不允许退款,请检查商户配置"), AGREE_REFUND_APPLY_ORDER_NOT_ALLOW("45088", "商户配置不允许退款,请检查商户配置"),
PARTNER_ORDER_CANCEL_ERROR("45089", "取消订单失败"), PARTNER_ORDER_CANCEL_ERROR("45089", "取消订单失败"),
ORDER_DELIVERY_EDIT_FAILED("45090", "修改配送状态失败"), ORDER_DELIVERY_EDIT_FAILED("45090", "修改配送状态失败"),
PARTNER_CAN_NOT_CANCEL_ORDER("45091","订单已部分退款,不能取消"), PARTNER_CAN_NOT_CANCEL_ORDER("45091","订单已部分退款,不能取消"),
DONE_FAIL_ONE_MINUTE("45092", "平台规定,接单一分钟后才能出餐"),
/** /**
* 支付 * 支付
......
...@@ -33,11 +33,11 @@ import org.springframework.stereotype.Component; ...@@ -33,11 +33,11 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Stream; import java.util.stream.Stream;
//import cn.freemud.base.log.LogTreadLocal;
/** /**
* All rights Reserved, Designed By www.freemud.cn * All rights Reserved, Designed By www.freemud.cn
...@@ -149,6 +149,12 @@ public class OrderVerifyHandle { ...@@ -149,6 +149,12 @@ public class OrderVerifyHandle {
if (this.checkSaasWm(orderBean) && this.verifyThirdFlow(orderBean,request)) { if (this.checkSaasWm(orderBean) && this.verifyThirdFlow(orderBean,request)) {
return ResponseUtil.error(ResponseResult.ORDER_MOVE_FAILED); return ResponseUtil.error(ResponseResult.ORDER_MOVE_FAILED);
} }
//美团规定,一分钟内不能出餐
if (Objects.equals(OrderClientType.MEITUAN.getIndex().toString(), orderBean.getOrderClient()) && orderBean.getGmtAccept() != null) {
if (orderBean.getGmtAccept() - new Date().getTime() < 60 * 1000) {
return ResponseUtil.error(ResponseResult.DONE_FAIL_ONE_MINUTE);
}
}
return ResponseUtil.success(); return ResponseUtil.success();
} }
......
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