From 02fdf95b387a3b36b0b0ecd1a59a549e0cac6b28 Mon Sep 17 00:00:00 2001 From: huangyw <1207046171@qq.com> Date: Mon, 5 Aug 2024 15:36:42 +0800 Subject: [PATCH] =?UTF-8?q?release:=20=E6=8A=BD=E5=A5=96=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=B1=BB=E5=88=AB=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/luoo/user/dto/point/LotterySearchDto.java | 3 +++ .../src/main/java/com/luoo/user/service/LotteryService.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/luoo_user/src/main/java/com/luoo/user/dto/point/LotterySearchDto.java b/luoo_user/src/main/java/com/luoo/user/dto/point/LotterySearchDto.java index 1360e73..53ffe26 100644 --- a/luoo_user/src/main/java/com/luoo/user/dto/point/LotterySearchDto.java +++ b/luoo_user/src/main/java/com/luoo/user/dto/point/LotterySearchDto.java @@ -27,4 +27,7 @@ public class LotterySearchDto { @ApiModelProperty(value = "创建人") private String createUser; + + @ApiModelProperty(value = "抽奖类型 1-门票抽奖 1-实物抽奖") + private Integer type; } diff --git a/luoo_user/src/main/java/com/luoo/user/service/LotteryService.java b/luoo_user/src/main/java/com/luoo/user/service/LotteryService.java index 0729901..cf40619 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/LotteryService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/LotteryService.java @@ -426,6 +426,10 @@ public class LotteryService { criteriaBuilder.equal(root.get("createUser"), lotterySearchDto.getCreateUser())); } + if (lotterySearchDto.getType() != null) { + predicateList.add(criteriaBuilder.equal(root.get("type"), lotterySearchDto.getType())); + } + return criteriaBuilder.and(predicateList.toArray(new Predicate[predicateList.size()])); }; }