满减活动
This commit is contained in:
parent
6ca8e1c9b8
commit
3cf3669f37
|
|
@ -73,7 +73,7 @@ public class MkDiscountActivityServiceImpl extends ServiceImpl<MkDiscountActivit
|
|||
public MkDiscountActivityDTO getActivityByShopId(Long shopId) {
|
||||
ShopInfo shopInfo = shopInfoService.getById(shopId);
|
||||
AssertUtil.isNull(shopInfo, "店铺不存在");
|
||||
if (shopInfo.getIsEnableDiscount() == 0) {
|
||||
if (shopInfo.getIsEnableDiscount() == null || shopInfo.getIsEnableDiscount() == 0) {
|
||||
return null;
|
||||
}
|
||||
MkDiscountActivity activity = mapper.selectOneByShopId(shopId);
|
||||
|
|
|
|||
|
|
@ -334,9 +334,12 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
log.info("订单信息:{},优惠信息:{}", JSONObject.toJSONString(orderInfo), JSONObject.toJSONString(param));
|
||||
Long shopId = orderInfo.getShopId();
|
||||
AssertUtil.isNull(shopId, "生成支付订单失败,订单信息异常");
|
||||
//检查满减活动是否开启
|
||||
MkDiscountActivityDTO discountAct = discountActService.checkDiscountAct(orderInfo.getShopId(),
|
||||
CollUtil.isNotEmpty(param.getCouponList()), param.isVipPrice(), param.getPointsDiscountAmount().compareTo(BigDecimal.ZERO) > 0);
|
||||
MkDiscountActivityDTO discountAct = null;
|
||||
if (param.getDiscountActAmount().compareTo(BigDecimal.ZERO) > 0) {
|
||||
//检查满减活动是否开启
|
||||
discountAct = discountActService.checkDiscountAct(orderInfo.getShopId(),
|
||||
CollUtil.isNotEmpty(param.getCouponList()), param.isVipPrice(), param.getPointsDiscountAmount().compareTo(BigDecimal.ZERO) > 0);
|
||||
}
|
||||
orderInfo.setSeatNum(param.getSeatNum());
|
||||
if (shopInfo.getIsTableFee() != 1 && shopInfo.getTableFee().compareTo(BigDecimal.ZERO) != 0) {
|
||||
orderInfo.setSeatAmount(new BigDecimal(param.getSeatNum()).multiply(shopInfo.getTableFee()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue