@ -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));
@ -23,4 +23,6 @@ public interface SysDictService extends CurdService<SysDict> {
boolean deleteByPrimaryKey(Long id);
void updateByPrimaryKey(SysDict entity);
List<SysDict> findByType(String type);
@ -84,4 +84,9 @@ public class SysDictServiceImpl implements SysDictService {
entity.setLastUpdateTime(new Date());
sysDictMapper.updateById(entity);
@Override
public List<SysDict> findByType(String type) {
return sysDictMapper.selectList(new QueryWrapper<SysDict>().eq("type", type));