update lookupdata endpoint

This commit is contained in:
harish
2024-08-28 16:39:30 +05:30
parent 3f2834ed5d
commit 5a14cb090b
5 changed files with 9 additions and 8 deletions

View File

@@ -67,11 +67,12 @@ public class LookUpDataDao {
return response;
}
public List<LookUpDataResponseBean> getLookUpDataByType(LookUpDataTypeEnum type) {
return lookUpDataRepository.findByType(type.getValue())
.stream()
public List<LookUpDataResponseBean> getLookUpDataByTypes(List<LookUpDataTypeEnum> types) {
return types.stream()
.flatMap(type -> lookUpDataRepository.findByType(type.getValue()).stream())
.map(this::convertLookUpDataEntityToResponseBean)
.collect(Collectors.toList());
}
}