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) {