删除预约订单无用代码
This commit is contained in:
parent
a3fa5a3fa8
commit
ac3b9216d8
@ -1580,25 +1580,6 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl<ShopOrderBaseMappe
|
||||
cartData.put("gb_id", gbId); // 拼团ID, 为0,在创建拼团
|
||||
}
|
||||
|
||||
// 判断是否砍价购买
|
||||
Integer acId = getParameter("ac_id", Integer.class);
|
||||
// 判断是否为砍价活动
|
||||
Boolean isCutPriceActivity = shopStoreActivityBaseService.isCutPriceActivity(activityId);
|
||||
if (CheckUtil.isNotEmpty(acId) && isCutPriceActivity) {
|
||||
cartData.put("ac_id", acId); // shop_activity_cutprice 活动参与记录的自增id
|
||||
|
||||
// 判断砍价商品库存是否已售罄?
|
||||
if (shopStoreActivityBaseService.isActProdSoldOut(activityId)) {
|
||||
throw new ApiException(I18nUtil._("砍价商品已售罄,请选择其他商品。"));
|
||||
}
|
||||
|
||||
// 校验砍价活动,用户是否可以立即购买了?
|
||||
Pair<Boolean, String> canDoOrderCutPriceActivity = shopActivityCutpriceService.canDoOrderCutPriceActivity(acId, userId);
|
||||
if (!canDoOrderCutPriceActivity.getFirst()) {
|
||||
logger.error(canDoOrderCutPriceActivity.getSecond());
|
||||
throw new ApiException(I18nUtil._("砍价活动未达标,请继续努力,再提交订单。"));
|
||||
}
|
||||
}
|
||||
|
||||
// 注:(重要)邮费检测和计算
|
||||
dealWithCalFee(calFreight, cartData, chainId, isEdu);
|
||||
@ -1626,22 +1607,6 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl<ShopOrderBaseMappe
|
||||
}
|
||||
}
|
||||
|
||||
// // 预约订单检测
|
||||
// Integer bookingState = Convert.toInt(getParameter("booking_state"));
|
||||
// if (CheckUtil.isNotEmpty(bookingState) && CommonConstant.Order_Booking_State_YY.equals(bookingState)) {
|
||||
// String bookingBeginTime = getParameter("booking_begin_time");
|
||||
// String bookingEndTime = getParameter("booking_end_time");
|
||||
// Long bookingAt = getParameter("booking_at", 0L);
|
||||
// Pair<Boolean, String> pair = shopOrderInfoService.checkBookingOrderArgs(checkedStore, bookingState, bookingBeginTime, bookingEndTime);
|
||||
// if (!pair.getFirst()) {
|
||||
// throw new ApiException(I18nUtil._(pair.getSecond()));
|
||||
// }
|
||||
//
|
||||
// cartData.put("booking_state", bookingState);
|
||||
// cartData.put("booking_begin_time", bookingBeginTime);
|
||||
// cartData.put("booking_end_time", bookingEndTime);
|
||||
// cartData.put("booking_at", bookingAt);
|
||||
// }
|
||||
|
||||
// 添加保存订单(关键方法)
|
||||
List<String> orderIdRow = addOrder(cartData, true, false, null);
|
||||
@ -1667,6 +1632,26 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl<ShopOrderBaseMappe
|
||||
// cartData.put("packing_fee", packingFee);
|
||||
// }
|
||||
|
||||
// 判断是否砍价购买
|
||||
Integer acId = getParameter("ac_id", Integer.class);
|
||||
// 判断是否为砍价活动
|
||||
Boolean isCutPriceActivity = shopStoreActivityBaseService.isCutPriceActivity(activityId);
|
||||
if (CheckUtil.isNotEmpty(acId) && isCutPriceActivity) {
|
||||
cartData.put("ac_id", acId); // shop_activity_cutprice 活动参与记录的自增id
|
||||
|
||||
// 判断砍价商品库存是否已售罄?
|
||||
if (shopStoreActivityBaseService.isActProdSoldOut(activityId)) {
|
||||
throw new ApiException(I18nUtil._("砍价商品已售罄,请选择其他商品。"));
|
||||
}
|
||||
|
||||
// 校验砍价活动,用户是否可以立即购买了?
|
||||
Pair<Boolean, String> canDoOrderCutPriceActivity = shopActivityCutpriceService.canDoOrderCutPriceActivity(acId, userId);
|
||||
if (!canDoOrderCutPriceActivity.getFirst()) {
|
||||
logger.error(canDoOrderCutPriceActivity.getSecond());
|
||||
throw new ApiException(I18nUtil._("砍价活动未达标,请继续努力,再提交订单。"));
|
||||
}
|
||||
}
|
||||
|
||||
// 判断是否拼团购买
|
||||
if (gbId != null) {
|
||||
QueryWrapper<ShopActivityGroupbookingHistory> historyQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user