From 1e91dc33009cfdc951b2642877f40280b51c3089 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期五, 28 二月 2025 15:17:01 +0800 Subject: [PATCH] zjh20250228 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjHarmTypeController.java | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjHarmTypeController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjHarmTypeController.java index 92f8fe4..724123d 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjHarmTypeController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjHarmTypeController.java @@ -4,16 +4,10 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.ltkj.common.annotation.Log; import com.ltkj.common.core.controller.BaseController; import com.ltkj.common.core.domain.AjaxResult; @@ -41,7 +35,17 @@ @GetMapping("/list") public TableDataInfo list(TjHarmType tjHarmType) { startPage(); - List<TjHarmType> list = tjHarmTypeService.list(); + LambdaQueryWrapper<TjHarmType> wq=new LambdaQueryWrapper<>(); + if (tjHarmType.getHarmCode()!=null){ + wq.like(TjHarmType::getHarmCode,tjHarmType.getHarmCode()); + } + if (tjHarmType.getHarmType()!=null){ + wq.like(TjHarmType::getHarmType,tjHarmType.getHarmType()); + } + if (tjHarmType.getHarmPinYin()!=null){ + wq.like(TjHarmType::getHarmPinYin,tjHarmType.getHarmPinYin()); + } + List<TjHarmType> list = tjHarmTypeService.list(wq); return getDataTable(list); } @@ -86,8 +90,8 @@ * 鍒犻櫎鑱屼笟鐥� */ @Log(title = "鑱屼笟鐥�", businessType = BusinessType.DELETE) - @DeleteMapping("/{aids}") - public AjaxResult remove(@PathVariable String[] aids) { + @DeleteMapping("/remove") + public AjaxResult remove(@RequestBody String[] aids) { return toAjax(tjHarmTypeService.removeByIds(Arrays.asList(aids))); } } -- Gitblit v1.8.0