From 9a06a5a124cbb4287150b40781240f396a3ba771 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 26 Sep 2024 17:40:39 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=AD=97=E5=85=B8=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=B9=E6=8D=AE=E7=B1=BB=E5=9E=8B=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mh/user/controller/SysDictController.java | 6 ++++++ .../src/main/java/com/mh/user/service/SysDictService.java | 2 ++ .../java/com/mh/user/service/impl/SysDictServiceImpl.java | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/user-service/src/main/java/com/mh/user/controller/SysDictController.java b/user-service/src/main/java/com/mh/user/controller/SysDictController.java index b9aba31..6bfae38 100644 --- a/user-service/src/main/java/com/mh/user/controller/SysDictController.java +++ b/user-service/src/main/java/com/mh/user/controller/SysDictController.java @@ -57,4 +57,10 @@ public class SysDictController { return HttpResult.ok(); } + @SysLogger(value="系统字典管理",optDesc = "根据设备类型查询系统字典管理") + @GetMapping("/findByType") + public HttpResult findByType(@RequestParam String type) { + return HttpResult.ok(sysDictService.findByType(type)); + } + } diff --git a/user-service/src/main/java/com/mh/user/service/SysDictService.java b/user-service/src/main/java/com/mh/user/service/SysDictService.java index 43274f9..248ba1a 100644 --- a/user-service/src/main/java/com/mh/user/service/SysDictService.java +++ b/user-service/src/main/java/com/mh/user/service/SysDictService.java @@ -23,4 +23,6 @@ public interface SysDictService extends CurdService { boolean deleteByPrimaryKey(Long id); void updateByPrimaryKey(SysDict entity); + + List findByType(String type); } diff --git a/user-service/src/main/java/com/mh/user/service/impl/SysDictServiceImpl.java b/user-service/src/main/java/com/mh/user/service/impl/SysDictServiceImpl.java index 7391f8a..371d74e 100644 --- a/user-service/src/main/java/com/mh/user/service/impl/SysDictServiceImpl.java +++ b/user-service/src/main/java/com/mh/user/service/impl/SysDictServiceImpl.java @@ -84,4 +84,9 @@ public class SysDictServiceImpl implements SysDictService { entity.setLastUpdateTime(new Date()); sysDictMapper.updateById(entity); } + + @Override + public List findByType(String type) { + return sysDictMapper.selectList(new QueryWrapper().eq("type", type)); + } }