|
|
@@ -57,10 +57,7 @@ public class OrderInfoService {
|
|
|
private MerchantRepo merchantRepo;
|
|
|
private UserCouponRepo userCouponRepo;
|
|
|
private OrderRefundApplyService orderRefundApplyService;
|
|
|
- private SysConfigRepo sysConfigRepo;
|
|
|
private RiderRepo riderRepo;
|
|
|
- private RiderService riderService;
|
|
|
- private MerchantSettingsService merchantSettingsService;
|
|
|
|
|
|
/*
|
|
|
用户下单
|
|
|
@@ -101,11 +98,12 @@ public class OrderInfoService {
|
|
|
orderInfo.setOrderTime(now);
|
|
|
orderInfo.setEnabled(true);
|
|
|
|
|
|
- //如果未设置预计到达为30分钟
|
|
|
+ //如果未设置预计到达为15分钟
|
|
|
if (ObjectUtil.isEmpty(merchantSettings.getPreparationTime())) {
|
|
|
- merchantSettings.setPreparationTime(30L);
|
|
|
+ merchantSettings.setPreparationTime(15L);
|
|
|
}
|
|
|
//预计送达时间
|
|
|
+ //商家准备时间 + 骑手到商家的距离(因为用户下单时,骑手不知,所以为固定时间) + 用户到商家的时间
|
|
|
orderInfo.setTimeOfArrival(LocalDateTime.now().plusMinutes(merchantSettings.getPreparationTime()));
|
|
|
|
|
|
//用户地址
|