drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/controller/GdSupplyDemandController.java
@@ -32,6 +32,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.sxkj.gd.orderdata.entity.GdSupplyDemandEntity; import org.sxkj.gd.orderdata.param.GdSupplyDemandPageParam; import org.sxkj.gd.orderdata.vo.GdSupplyDemandVO; import org.sxkj.gd.orderdata.excel.GdSupplyDemandExcel; import org.sxkj.gd.orderdata.wrapper.GdSupplyDemandWrapper; @@ -86,7 +87,7 @@ @GetMapping("/page") @ApiOperationSupport(order = 3) @ApiOperation(value = "分页", notes = "传入gdSupplyDemand") public R<IPage<GdSupplyDemandVO>> page(GdSupplyDemandVO gdSupplyDemand, Query query) { public R<IPage<GdSupplyDemandVO>> page(GdSupplyDemandPageParam gdSupplyDemand, Query query) { IPage<GdSupplyDemandVO> pages = gdSupplyDemandService.selectGdSupplyDemandPage(Condition.getPage(query), gdSupplyDemand); return R.data(pages); } drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandMapper.java
@@ -17,6 +17,7 @@ package org.sxkj.gd.orderdata.mapper; import org.sxkj.gd.orderdata.entity.GdSupplyDemandEntity; import org.sxkj.gd.orderdata.param.GdSupplyDemandPageParam; import org.sxkj.gd.orderdata.vo.GdSupplyDemandVO; import org.sxkj.gd.orderdata.excel.GdSupplyDemandExcel; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -40,7 +41,7 @@ * @param gdSupplyDemand * @return */ List<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage page, GdSupplyDemandVO gdSupplyDemand); List<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage page, @Param("param") GdSupplyDemandPageParam gdSupplyDemand); /** drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandMapper.xml
@@ -31,7 +31,16 @@ <select id="selectGdSupplyDemandPage" resultMap="gdSupplyDemandResultMap"> select * from ja_gd_supply_demand where is_deleted = 0 select * from ja_gd_supply_demand <where> is_deleted = 0 <if test="param.demandName != null and param.demandName != ''"> AND demand_name LIKE CONCAT('%', #{param.demandName}, '%') </if> <if test="param.demandStatus != null and param.demandStatus != ''"> AND demand_status = #{param.demandStatus} </if> </where> </select> drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/param/GdSupplyDemandPageParam.java
New file @@ -0,0 +1,45 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.sxkj.gd.orderdata.param; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * 供需需求信息表 分页查询参数 * * @author lw * @since 2026-01-16 */ @Data @ApiModel(value = "GdSupplyDemandPageParam对象", description = "供需需求信息表分页查询参数") public class GdSupplyDemandPageParam { /** * 需求名称 */ @ApiModelProperty(value = "需求名称") private String demandName; /** * 需求状态 */ @ApiModelProperty(value = "需求状态") private String demandStatus; } drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/IGdSupplyDemandService.java
@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; import org.sxkj.gd.orderdata.entity.GdSupplyDemandEntity; import org.sxkj.gd.orderdata.param.GdSupplyDemandPageParam; import org.sxkj.gd.orderdata.vo.GdSupplyDemandVO; import org.sxkj.gd.orderdata.excel.GdSupplyDemandExcel; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -38,7 +39,7 @@ * @param gdSupplyDemand * @return */ IPage<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage<GdSupplyDemandVO> page, GdSupplyDemandVO gdSupplyDemand); IPage<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage<GdSupplyDemandVO> page, GdSupplyDemandPageParam gdSupplyDemand); /** drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandServiceImpl.java
@@ -17,6 +17,7 @@ package org.sxkj.gd.orderdata.service.impl; import org.sxkj.gd.orderdata.entity.GdSupplyDemandEntity; import org.sxkj.gd.orderdata.param.GdSupplyDemandPageParam; import org.sxkj.gd.orderdata.vo.GdSupplyDemandVO; import org.sxkj.gd.orderdata.excel.GdSupplyDemandExcel; import org.sxkj.gd.orderdata.mapper.GdSupplyDemandMapper; @@ -37,7 +38,7 @@ public class GdSupplyDemandServiceImpl extends BaseServiceImpl<GdSupplyDemandMapper, GdSupplyDemandEntity> implements IGdSupplyDemandService { @Override public IPage<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage<GdSupplyDemandVO> page, GdSupplyDemandVO gdSupplyDemand) { public IPage<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage<GdSupplyDemandVO> page, GdSupplyDemandPageParam gdSupplyDemand) { return page.setRecords(baseMapper.selectGdSupplyDemandPage(page, gdSupplyDemand)); }