diff --git a/core/src/main/java/com/dite/znpt/mapper/RegulationMapper.java b/core/src/main/java/com/dite/znpt/mapper/RegulationMapper.java index dc23993..8b5d072 100644 --- a/core/src/main/java/com/dite/znpt/mapper/RegulationMapper.java +++ b/core/src/main/java/com/dite/znpt/mapper/RegulationMapper.java @@ -19,13 +19,9 @@ public interface RegulationMapper extends BaseMapper { * @param page 分页参数 * @param status 状态 * @param type 类型 - * @param title 提案标题 - * @param proposer 提案人 * @return 分页结果 */ Page selectRegulationListWithCreator(Page page, @Param("status") String status, - @Param("type") String type, - @Param("title") String title, - @Param("proposer") String proposer); + @Param("type") String type); } \ No newline at end of file diff --git a/core/src/main/java/com/dite/znpt/mapper/RegulationTypeMapper.java b/core/src/main/java/com/dite/znpt/mapper/RegulationTypeMapper.java index 5f7cfb8..1065361 100644 --- a/core/src/main/java/com/dite/znpt/mapper/RegulationTypeMapper.java +++ b/core/src/main/java/com/dite/znpt/mapper/RegulationTypeMapper.java @@ -18,12 +18,7 @@ public interface RegulationTypeMapper extends BaseMapper { * 分页查询制度类型列表(包含创建人姓名) * @param page 分页参数 * @param typeName 类型名称 - * @param status 状态 - * @param remark 备注 * @return 分页结果 */ - Page selectRegulationTypeListWithCreator(Page page, - @Param("typeName") String typeName, - @Param("status") String status, - @Param("remark") String remark); + Page selectRegulationTypeListWithCreator(Page page, @Param("typeName") String typeName); } \ No newline at end of file diff --git a/core/src/main/java/com/dite/znpt/service/RegulationService.java b/core/src/main/java/com/dite/znpt/service/RegulationService.java index b24957f..27cfe85 100644 --- a/core/src/main/java/com/dite/znpt/service/RegulationService.java +++ b/core/src/main/java/com/dite/znpt/service/RegulationService.java @@ -17,11 +17,9 @@ public interface RegulationService extends IService { * @param pageSize 页大小 * @param status 状态 * @param type 类型 - * @param title 提案标题 - * @param proposer 提案人 * @return 结果 */ - Result getRegulationList(Integer page, Integer pageSize, String status, String type, String title, String proposer); + Result getRegulationList(Integer page, Integer pageSize, String status, String type); /** * 创建制度提案 diff --git a/core/src/main/java/com/dite/znpt/service/RegulationTypeService.java b/core/src/main/java/com/dite/znpt/service/RegulationTypeService.java index c5b8715..cba5e41 100644 --- a/core/src/main/java/com/dite/znpt/service/RegulationTypeService.java +++ b/core/src/main/java/com/dite/znpt/service/RegulationTypeService.java @@ -16,11 +16,9 @@ public interface RegulationTypeService extends IService { * @param page 页码 * @param size 页大小 * @param typeName 类型名称 - * @param status 状态 - * @param remark 备注 * @return 结果 */ - Result getRegulationTypes(Integer page, Integer size, String typeName, String status, String remark); + Result getRegulationTypes(Integer page, Integer size, String typeName); /** * 创建制度类型 diff --git a/core/src/main/java/com/dite/znpt/service/impl/RegulationServiceImpl.java b/core/src/main/java/com/dite/znpt/service/impl/RegulationServiceImpl.java index cf52e5f..bdc09c6 100644 --- a/core/src/main/java/com/dite/znpt/service/impl/RegulationServiceImpl.java +++ b/core/src/main/java/com/dite/znpt/service/impl/RegulationServiceImpl.java @@ -68,12 +68,12 @@ public class RegulationServiceImpl extends ServiceImpl pageParam = new Page<>(page, pageSize); // 使用关联查询获取创建人姓名 - Page result = this.baseMapper.selectRegulationListWithCreator(pageParam, status, type, title, proposer); + Page result = this.baseMapper.selectRegulationListWithCreator(pageParam, status, type); // 如果是获取已发布的制度,需要添加确认状态 if (status != null && "PUBLISHED".equals(status)) { diff --git a/core/src/main/java/com/dite/znpt/service/impl/RegulationTypeServiceImpl.java b/core/src/main/java/com/dite/znpt/service/impl/RegulationTypeServiceImpl.java index 1a3616e..5a7fd17 100644 --- a/core/src/main/java/com/dite/znpt/service/impl/RegulationTypeServiceImpl.java +++ b/core/src/main/java/com/dite/znpt/service/impl/RegulationTypeServiceImpl.java @@ -5,11 +5,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.dite.znpt.domain.Result; -import com.dite.znpt.domain.entity.RegulationEntity; import com.dite.znpt.domain.entity.RegulationTypeEntity; -import com.dite.znpt.mapper.RegulationMapper; +import com.dite.znpt.domain.entity.RegulationEntity; import com.dite.znpt.mapper.RegulationTypeMapper; +import com.dite.znpt.mapper.RegulationMapper; import com.dite.znpt.service.RegulationTypeService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -23,20 +24,17 @@ import java.time.LocalDateTime; @Service public class RegulationTypeServiceImpl extends ServiceImpl implements RegulationTypeService { - private final RegulationMapper regulationMapper; - - public RegulationTypeServiceImpl(RegulationMapper regulationMapper) { - this.regulationMapper = regulationMapper; - } + @Autowired + private RegulationMapper regulationMapper; @Override @Transactional(readOnly = true) - public Result getRegulationTypes(Integer page, Integer size, String typeName, String status, String remark) { + public Result getRegulationTypes(Integer page, Integer size, String typeName) { try { Page pageParam = new Page<>(page, size); // 使用连表查询获取创建人姓名 - Page result = this.baseMapper.selectRegulationTypeListWithCreator(pageParam, typeName, status, remark); + Page result = this.baseMapper.selectRegulationTypeListWithCreator(pageParam, typeName); return Result.ok(result); } catch (Exception e) { diff --git a/web/src/main/java/com/dite/znpt/web/controller/RegulationController.java b/web/src/main/java/com/dite/znpt/web/controller/RegulationController.java index c27dc10..e51639f 100644 --- a/web/src/main/java/com/dite/znpt/web/controller/RegulationController.java +++ b/web/src/main/java/com/dite/znpt/web/controller/RegulationController.java @@ -26,10 +26,8 @@ public class RegulationController { public Result getRegulationList(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size, @RequestParam(required = false) String status, - @RequestParam(required = false) String type, - @RequestParam(required = false) String title, - @RequestParam(required = false) String proposer) { - return regulationService.getRegulationList(page, size, status, type, title, proposer); + @RequestParam(required = false) String type) { + return regulationService.getRegulationList(page, size, status, type); } @ApiOperation(value = "创建制度提案", httpMethod = "POST") diff --git a/web/src/main/java/com/dite/znpt/web/controller/RegulationTypeController.java b/web/src/main/java/com/dite/znpt/web/controller/RegulationTypeController.java index 1862cad..6d1c230 100644 --- a/web/src/main/java/com/dite/znpt/web/controller/RegulationTypeController.java +++ b/web/src/main/java/com/dite/znpt/web/controller/RegulationTypeController.java @@ -25,10 +25,8 @@ public class RegulationTypeController { @GetMapping public Result getRegulationTypes(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size, - @RequestParam(required = false) String typeName, - @RequestParam(required = false) String status, - @RequestParam(required = false) String remark) { - return regulationTypeService.getRegulationTypes(page, size, typeName, status, remark); + @RequestParam(required = false) String typeName) { + return regulationTypeService.getRegulationTypes(page, size, typeName); } @ApiOperation(value = "创建制度类型", httpMethod = "POST")