release: 抽奖查询新增类别字段

release-2024-08-08
huangyw 4 months ago
parent c0fbb9d7a5
commit 02fdf95b38

@ -27,4 +27,7 @@ public class LotterySearchDto {
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private String createUser; private String createUser;
@ApiModelProperty(value = "抽奖类型 1-门票抽奖 1-实物抽奖")
private Integer type;
} }

@ -426,6 +426,10 @@ public class LotteryService {
criteriaBuilder.equal(root.get("createUser"), lotterySearchDto.getCreateUser())); 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()])); return criteriaBuilder.and(predicateList.toArray(new Predicate[predicateList.size()]));
}; };
} }

Loading…
Cancel
Save