【代码优化】MALL: 售后订单增加 userId 检索条件

This commit is contained in:
puhui999 2024-08-19 11:32:53 +08:00
parent 7288e6c980
commit c7ccb8286a
2 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,9 @@ public class AfterSalePageReqVO extends PageParam {
@Schema(description = "售后流水号", example = "202211190847450020500077")
private String no;
@Schema(description = "用户编号", example = "1024")
private Long userId;
@Schema(description = "售后状态", example = "10")
@InEnum(value = AfterSaleStatusEnum.class, message = "售后状态必须是 {value}")
private Integer status;

View File

@ -17,6 +17,7 @@ public interface AfterSaleMapper extends BaseMapperX<AfterSaleDO> {
default PageResult<AfterSaleDO> selectPage(AfterSalePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<AfterSaleDO>()
.likeIfPresent(AfterSaleDO::getNo, reqVO.getNo())
.eqIfPresent(AfterSaleDO::getUserId, reqVO.getUserId())
.eqIfPresent(AfterSaleDO::getStatus, reqVO.getStatus())
.eqIfPresent(AfterSaleDO::getType, reqVO.getType())
.eqIfPresent(AfterSaleDO::getWay, reqVO.getWay())