|
@@ -210,7 +210,7 @@ public class CommonRepo {
|
|
|
public List<CrowdTestProject> getProjectList(Pageable pageable, String code, String keyword) {
|
|
|
Specifications<CrowdTestProjectPO> where = Specifications.where(getCode(code, keyword));
|
|
|
//添加排序
|
|
|
- Sort sort = new Sort(Sort.Direction.ASC,"status");
|
|
|
+ Sort sort = new Sort(Sort.Direction.ASC, "status");
|
|
|
return crowdTestProjectDao.findAll(where, sort).stream().map(crowdTestProjectPO -> Converter.convert(CrowdTestProject.class, crowdTestProjectPO)).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
@@ -240,7 +240,7 @@ public class CommonRepo {
|
|
|
predicatesList.add(codePredicate);
|
|
|
}
|
|
|
if (keyword != null && keyword != "") {
|
|
|
- Predicate namePredicate = cb.like(root.get("name"), '%'+StringUtils.trim(keyword)+'%');
|
|
|
+ Predicate namePredicate = cb.like(root.get("name"), '%' + StringUtils.trim(keyword) + '%');
|
|
|
predicatesList.add(namePredicate);
|
|
|
}
|
|
|
//最终将查询条件拼好然后return
|
|
@@ -319,7 +319,7 @@ public class CommonRepo {
|
|
|
}
|
|
|
|
|
|
public Map<String, String> getConfigurationList() {
|
|
|
- Map<String, String> configurationMap = configurationDao.findAll().stream().collect(Collectors.toMap(configurationPO -> configurationPO.getName(), configurationPO -> configurationPO.getValue()));
|
|
|
- return configurationMap;
|
|
|
+ return configurationDao.findAll().stream()
|
|
|
+ .collect(Collectors.toMap(configurationPO -> configurationPO.getName(), configurationPO -> configurationPO.getValue()));
|
|
|
}
|
|
|
}
|