From 133f0f6993c003ba79fc4e62e2a0f6ea6b88caeb Mon Sep 17 00:00:00 2001 From: chenqp <965586934@qq.com> Date: Thu, 17 Aug 2023 22:55:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8A=A5=E9=94=80=EF=BC=8C=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/common/pojo/PageParam.java | 2 +- .../controller/admin/invoice/vo/InvoicePageReqVO.java | 4 ++++ .../module/bs/dal/mysql/invoice/InvoiceMapper.java | 11 ++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java index 5738ded6..77cd4372 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageParam.java @@ -23,7 +23,7 @@ public class PageParam implements Serializable { @Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") @NotNull(message = "每页条数不能为空") @Min(value = 1, message = "每页条数最小值为 1") - @Max(value = 100, message = "每页条数最大值为 100") + @Max(value = 1000, message = "每页条数最大值为 1000") private Integer pageSize = PAGE_SIZE; } diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/invoice/vo/InvoicePageReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/invoice/vo/InvoicePageReqVO.java index d3084c2b..86a3a6a5 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/invoice/vo/InvoicePageReqVO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/invoice/vo/InvoicePageReqVO.java @@ -11,6 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; +import java.util.Set; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @@ -67,4 +68,7 @@ public class InvoicePageReqVO extends PageParam { @Schema(description = "备注", example = "随便") private String remark; + private Set inIds; + private Set notInIds; + } diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/invoice/InvoiceMapper.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/invoice/InvoiceMapper.java index 26506c25..8884ac05 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/invoice/InvoiceMapper.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/invoice/InvoiceMapper.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bs.dal.mysql.invoice; +import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; @@ -19,8 +20,8 @@ import java.util.List; public interface InvoiceMapper extends BaseMapperX { default PageResult selectPage(InvoicePageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .eqIfPresent(InvoiceDO::getFiles, reqVO.getFiles()) + LambdaQueryWrapperX queryWrapper = new LambdaQueryWrapperX() + .inIfPresent(InvoiceDO::getId, reqVO.getInIds()) .betweenIfPresent(InvoiceDO::getCreateTime, reqVO.getCreateTime()) .eqIfPresent(InvoiceDO::getInvoiceType, reqVO.getInvoiceType()) .eqIfPresent(InvoiceDO::getInvoiceCode, reqVO.getInvoiceCode()) @@ -33,7 +34,11 @@ public interface InvoiceMapper extends BaseMapperX { .eqIfPresent(InvoiceDO::getDeptId, reqVO.getDeptId()) .likeIfPresent(InvoiceDO::getDeptName, reqVO.getDeptName()) .eqIfPresent(InvoiceDO::getRemark, reqVO.getRemark()) - .orderByDesc(InvoiceDO::getId)); + .orderByDesc(InvoiceDO::getId); + if (CollUtil.isNotEmpty(reqVO.getNotInIds())) { + queryWrapper.notIn(InvoiceDO::getId, reqVO.getNotInIds()); + } + return selectPage(reqVO, queryWrapper); } default List selectList(InvoiceExportReqVO reqVO) {