|
@@ -92,7 +92,7 @@ public class AgencyServiceImpl implements AgencyService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<EvaluationAgencyVO> findMoreAgencyVO(String keyword) {
|
|
|
+ public List<EvaluationAgencyVO> findMoreAgencyVO(String keyword){
|
|
|
List<EvaluationAgencyVO> list = userTaskCountDao.findByType(RoleType.AGENCY.getId())
|
|
|
.stream().sorted(Comparator.comparing(UserTaskCountPO::getCount)).collect(Collectors.toList())
|
|
|
.stream().map(userTaskCountPO -> {
|
|
@@ -106,10 +106,15 @@ public class AgencyServiceImpl implements AgencyService {
|
|
|
agencyVO.setAddress(agency.getAddress());
|
|
|
return agencyVO;
|
|
|
}).collect(Collectors.toList());
|
|
|
- return list.stream().sorted(Comparator.comparing(EvaluationAgencyVO::getTaskCount).reversed()).collect(Collectors.toList());
|
|
|
- }
|
|
|
-
|
|
|
+ if (keyword == null) {
|
|
|
+ return list.stream().sorted(Comparator.comparing(EvaluationAgencyVO::getTaskCount).reversed()).collect(Collectors.toList());
|
|
|
+ } else {
|
|
|
+ list=list.stream().sorted(Comparator.comparing(EvaluationAgencyVO::getTaskCount).reversed()).collect(Collectors.toList());
|
|
|
+ System.out.println(list+"heiheiheiheihehiheihei");
|
|
|
+ return list.stream().filter(evaluationAgencyVO-> evaluationAgencyVO.getEvaluationAgencyName().contains(keyword)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
@Override
|
|
|
public UserDTO applyAgency(Long userId, ApplyAgencyAuthCommand command) {
|
|
|
EvaluationAgency agency = command.toAgency();
|