add - 新增批量获取字典接口
This commit is contained in:
parent
b2252789ec
commit
e380d0c942
@ -83,4 +83,7 @@ public interface SaasBasicDictApi {
|
||||
|
||||
@GetMapping("api/dict/get")
|
||||
ApiResult<BasicDictNodeResp> get(@RequestParam Long id);
|
||||
|
||||
@GetMapping("api/dict/get-by-ids")
|
||||
ApiResult<List<BasicDictNodeResp>> getByIds(@RequestParam List<Long> ids) ;
|
||||
}
|
||||
|
||||
@ -26,13 +26,13 @@ public class BasicDictQueryReq {
|
||||
/**
|
||||
* workspace
|
||||
*/
|
||||
@EnumValidator(enumClass = DictWorkSpaceTypeEnum.class, message = "枚举类型错误")
|
||||
// @EnumValidator(enumClass = DictWorkSpaceTypeEnum.class, message = "枚举类型错误")
|
||||
private DictWorkSpaceTypeEnum workspaceType;
|
||||
|
||||
/**
|
||||
* type
|
||||
*/
|
||||
@EnumValidator(enumClass = DictTypeFiledEnum.class, message = "枚举类型错误")
|
||||
// @EnumValidator(enumClass = DictTypeFiledEnum.class, message = "枚举类型错误")
|
||||
private DictTypeFiledEnum type;
|
||||
|
||||
/**
|
||||
|
||||
@ -61,4 +61,9 @@ public class SaasBasicDictController implements SaasBasicDictApi {
|
||||
public ApiResult<BasicDictNodeResp> get(Long id) {
|
||||
return saasBasicDictService.getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<List<BasicDictNodeResp>> getByIds(List<Long> ids) {
|
||||
return saasBasicDictService.getByIds(ids);
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,4 +28,6 @@ public interface SaasBasicDictService {
|
||||
ApiResult<Boolean> update(BasicDictUpdateReq req);
|
||||
|
||||
ApiResult<Boolean> updateStauts(BasicDictUpdateStatusReq req);
|
||||
|
||||
ApiResult<List<BasicDictNodeResp>> getByIds(List<Long> ids);
|
||||
}
|
||||
|
||||
@ -120,4 +120,9 @@ public class SaasBasicDictServiceImpl implements SaasBasicDictService {
|
||||
public ApiResult<BasicDictNodeResp> getById(Long id) {
|
||||
return ApiResult.ok(BeanMapper.copyBean(saasBasicDictDao.getById(id), BasicDictNodeResp.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<List<BasicDictNodeResp>> getByIds(List<Long> ids) {
|
||||
return ApiResult.ok(BeanMapper.copyList(saasBasicDictDao.listByIds(ids), BasicDictNodeResp.class));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user