use of com.diboot.core.entity.ValidList in project diboot by dibo-software.
the class BaseController method attachMoreRelatedData.
/**
* 通用的attachMore获取数据
*
* @param attachMoreDTOList
* @return
*/
protected Map<String, List<LabelValue>> attachMoreRelatedData(ValidList<AttachMoreDTO> attachMoreDTOList) {
if (V.isEmpty(attachMoreDTOList)) {
return Collections.emptyMap();
}
Map<String, List<LabelValue>> result = new HashMap<>(attachMoreDTOList.size());
for (AttachMoreDTO attachMoreDTO : attachMoreDTOList) {
// 请求参数安全检查
V.securityCheck(attachMoreDTO.getTarget(), attachMoreDTO.getValue(), attachMoreDTO.getLabel(), attachMoreDTO.getExt());
result.computeIfAbsent(S.toLowerCaseCamel(attachMoreDTO.getTarget()) + "Options", key -> V.isEmpty(attachMoreDTO.getLabel()) ? attachMoreRelatedData(attachMoreDTO.getTarget()) : attachMoreRelatedData(attachMoreDTO));
}
return result;
}
Aggregations