Commit e919ca1a by ping.wu

下单判断修改

parent 290a5919
......@@ -212,15 +212,20 @@ public class CheckOrder {
|| takeMealDateTime.after(storeResponseDto.getBusinessHoursDayEndTime()))) {
throw new ServiceException(ResponseResult.ORDER_TAKEMEALTIME_INVAILD);
}
//当顾客指定送达时间小于当前时间+提前预约时间时,订单记录类型为即时单
if (takeMealDateTime != null && storeResponseDto.getServiceTime() != null
&& takeMealDateTime.before(DateUtil.addMinutes(date,storeResponseDto.getServiceTime()))) {
takeMealDateTime = null;
}
//0=到店单我已到店、外卖单尽快送出
if (StringUtils.isNotBlank(createOrderVo.getTakeMealFlag()) && "0".equals(createOrderVo.getTakeMealFlag())) {
takeMealDateTime = null;
}
//当顾客指定送达时间小于当前时间,订单记录类型为即时单
if (takeMealDateTime != null && takeMealDateTime.before(date)) {
takeMealDateTime = null;
}
//当顾客指定送达时间小于当前时间+提前预约时间时,订单记录类型为即时单
if (CreateOrderType.TAKE_OUT.getCode().equals(createOrderVo.getOrderType()) && takeMealDateTime != null
&& storeResponseDto.getServiceTime() != null && takeMealDateTime.before(DateUtil.addMinutes(date,storeResponseDto.getServiceTime()))) {
takeMealDateTime = null;
}
String appId = userLoginInfoDto.getWxAppId();
// 校验小程序是否支持到店或者外卖
OpenPlatformIappWxappConfig config = openPlatformIappWxappConfigManager.selectIappWxappConfigByWxAppId(appId);
......
package cn.freemud.management.adapter;
import com.freemud.application.sdk.api.deliverycenter.dto.CreateDeliveryOrderRequestDto;
import com.freemud.application.sdk.api.ordercenter.enums.OrderType;
import com.freemud.application.sdk.api.storecenter.response.StoreResponse;
import com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse;
import org.springframework.stereotype.Component;
......@@ -55,7 +56,7 @@ public class DeliverySdkAdapter {
if (order.getGmtExpect() != null && order.getGmtExpect() != 0) {
deliveryOrderRequestDto.setExpectTime(new Date(order.getGmtExpect()));
}
deliveryOrderRequestDto.setIsPre(order.getGmtExpect() != null ? 1 : 0);
deliveryOrderRequestDto.setIsPre(order.getNewOrderType() == OrderType.RESERVED_EXPRESS.getIndex() ? 1 : 0);
List<CreateDeliveryOrderRequestDto.DeliveryProductInfo> productInfos = new ArrayList<>();
order.getProductList().forEach(productList -> {
if (productList.getPrice() > 0) {
......
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