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)); + } }