From cafeb1f20f4a949956863d6f9fcb18b6ae89b9f8 Mon Sep 17 00:00:00 2001 From: paulGao Date: Mon, 13 Dec 2021 14:49:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E6=8B=BC?= =?UTF-8?q?=E5=9B=A2=E8=AE=A2=E5=8D=95=E6=97=B6=EF=BC=8C=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E9=BB=98=E8=AE=A4=E9=94=81=E5=AE=9A=E4=BA=86?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E4=BC=9A=E5=91=98id=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/order/order/entity/dto/OrderSearchParams.java | 4 ++-- .../entity/vos/kanjia/KanjiaActivityGoodsParams.java | 4 ++-- .../modules/promotion/serviceimpl/PintuanServiceImpl.java | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/order/order/entity/dto/OrderSearchParams.java b/framework/src/main/java/cn/lili/modules/order/order/entity/dto/OrderSearchParams.java index 4c8b0e6e..c3a4950a 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/entity/dto/OrderSearchParams.java +++ b/framework/src/main/java/cn/lili/modules/order/order/entity/dto/OrderSearchParams.java @@ -129,7 +129,7 @@ public class OrderSearchParams extends PageVO { && CharSequenceUtil.isNotEmpty(storeId), "o.store_id", storeId); //按买家查询 - wrapper.eq(CharSequenceUtil.equals(currentUser.getRole().name(), UserEnums.MEMBER.name()), "o.member_id", currentUser.getId()); + wrapper.eq(CharSequenceUtil.equals(currentUser.getRole().name(), UserEnums.MEMBER.name()) && CharSequenceUtil.isEmpty(memberId), "o.member_id", currentUser.getId()); } //按照买家查询 @@ -203,7 +203,7 @@ public class OrderSearchParams extends PageVO { } // 依赖订单 - wrapper.eq(CharSequenceUtil.isNotEmpty(parentOrderSn), "o.parent_order_sn", parentOrderSn); + wrapper.eq(parentOrderSn != null, "o.parent_order_sn", parentOrderSn); // 促销活动id wrapper.eq(CharSequenceUtil.isNotEmpty(promotionId), "o.promotion_id", promotionId); diff --git a/framework/src/main/java/cn/lili/modules/promotion/entity/vos/kanjia/KanjiaActivityGoodsParams.java b/framework/src/main/java/cn/lili/modules/promotion/entity/vos/kanjia/KanjiaActivityGoodsParams.java index 10fc4233..932b1c8c 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/entity/vos/kanjia/KanjiaActivityGoodsParams.java +++ b/framework/src/main/java/cn/lili/modules/promotion/entity/vos/kanjia/KanjiaActivityGoodsParams.java @@ -5,6 +5,7 @@ import cn.hutool.core.text.CharSequenceUtil; import cn.lili.common.security.context.UserContext; import cn.lili.common.security.enums.UserEnums; import cn.lili.modules.promotion.entity.enums.PromotionsStatusEnum; +import cn.lili.modules.promotion.tools.PromotionTools; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -48,7 +49,7 @@ public class KanjiaActivityGoodsParams implements Serializable { queryWrapper.like("goods_name", goodsName); } if (promotionStatus != null) { - queryWrapper.eq("promotion_status", promotionStatus); + queryWrapper.and(PromotionTools.queryPromotionStatus(PromotionsStatusEnum.valueOf(promotionStatus))); } if (startTime != null) { queryWrapper.le("start_time", new Date(startTime)); @@ -57,7 +58,6 @@ public class KanjiaActivityGoodsParams implements Serializable { queryWrapper.ge("end_time", new Date(endTime)); } if (UserContext.getCurrentUser() != null && UserContext.getCurrentUser().getRole().equals(UserEnums.MEMBER)) { - queryWrapper.gt("stock", 0); } queryWrapper.eq("delete_flag", false); diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PintuanServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PintuanServiceImpl.java index 136ad57e..a8feb217 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PintuanServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PintuanServiceImpl.java @@ -87,6 +87,7 @@ public class PintuanServiceImpl extends AbstractPromotionsServiceImpl orders = orderService.queryListByParams(searchParams); //遍历订单状态为已支付,为团长的拼团订单 for (Order order : orders) {