Browse Source

1、字典管理添加根据类型查询

dev
mh 2 months ago
parent
commit
9a06a5a124
  1. 6
      user-service/src/main/java/com/mh/user/controller/SysDictController.java
  2. 2
      user-service/src/main/java/com/mh/user/service/SysDictService.java
  3. 5
      user-service/src/main/java/com/mh/user/service/impl/SysDictServiceImpl.java

6
user-service/src/main/java/com/mh/user/controller/SysDictController.java

@ -57,4 +57,10 @@ public class SysDictController {
return HttpResult.ok(); return HttpResult.ok();
} }
@SysLogger(value="系统字典管理",optDesc = "根据设备类型查询系统字典管理")
@GetMapping("/findByType")
public HttpResult findByType(@RequestParam String type) {
return HttpResult.ok(sysDictService.findByType(type));
}
} }

2
user-service/src/main/java/com/mh/user/service/SysDictService.java

@ -23,4 +23,6 @@ public interface SysDictService extends CurdService<SysDict> {
boolean deleteByPrimaryKey(Long id); boolean deleteByPrimaryKey(Long id);
void updateByPrimaryKey(SysDict entity); void updateByPrimaryKey(SysDict entity);
List<SysDict> findByType(String type);
} }

5
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()); entity.setLastUpdateTime(new Date());
sysDictMapper.updateById(entity); sysDictMapper.updateById(entity);
} }
@Override
public List<SysDict> findByType(String type) {
return sysDictMapper.selectList(new QueryWrapper<SysDict>().eq("type", type));
}
} }

Loading…
Cancel
Save