git преди 5 години
родител
ревизия
9d497ddbe6
променени са 17 файла, в които са добавени 131 реда и са изтрити 75 реда
  1. 14 0
      core/src/main/java/com/mooctest/crowd/domain/exception/UserTaskCountNoExistException.java
  2. 0 15
      core/src/main/java/com/mooctest/crowd/domain/repository/ApplicationTypeRepo.java
  3. 3 0
      core/src/main/java/com/mooctest/crowd/domain/repository/IUserRepo.java
  4. 14 1
      core/src/main/java/com/mooctest/crowd/domain/repository/UserRepo.java
  5. 2 0
      site/src/main/java/com/mooctest/crowd/site/constants/CommonConstant.java
  6. 1 1
      site/src/main/java/com/mooctest/crowd/site/controller/AgencyController.java
  7. 0 0
      site/src/main/java/com/mooctest/crowd/site/controller/CommonController.java
  8. 5 5
      site/src/main/java/com/mooctest/crowd/site/controller/UserController.java
  9. 2 0
      site/src/main/java/com/mooctest/crowd/site/controller/advice/ExceptionAdvice.java
  10. 2 1
      site/src/main/java/com/mooctest/crowd/site/mediator/ViewMediator.java
  11. 41 7
      site/src/main/java/com/mooctest/crowd/site/mediator/impl/WebMediatorImpl.java
  12. 1 1
      site/src/main/java/com/mooctest/crowd/site/service/CommonService.java
  13. 1 4
      site/src/main/java/com/mooctest/crowd/site/service/ResidentAgencyService.java
  14. 14 14
      site/src/main/java/com/mooctest/crowd/site/service/impl/AgencyServiceImpl.java
  15. 19 2
      site/src/main/java/com/mooctest/crowd/site/service/impl/CommonServiceImpl.java
  16. 12 24
      site/src/main/java/com/mooctest/crowd/site/service/impl/ResidentServiceImpl.java
  17. 0 0
      site/src/main/java/com/mooctest/crowd/site/service/impl/UserServiceImpl.java

+ 14 - 0
core/src/main/java/com/mooctest/crowd/domain/exception/UserTaskCountNoExistException.java

@@ -0,0 +1,14 @@
+package com.mooctest.crowd.domain.exception;
+
+import lombok.NoArgsConstructor;
+
+/**
+ * @Author: xuexb
+ * @Date: 2019.7.5 14:36
+ */
+@NoArgsConstructor
+public class UserTaskCountNoExistException extends BaseException {
+    public UserTaskCountNoExistException(String msg){
+        super(msg);
+    }
+}

+ 0 - 15
core/src/main/java/com/mooctest/crowd/domain/repository/ApplicationTypeRepo.java

@@ -28,23 +28,8 @@ public class ApplicationTypeRepo implements IApplicationTypeRepo{
     @Autowired
     private ApplicationTypeDao applicationTypeDao;
 
-    @Autowired
-    private CrowdTestProjectDao projectDao;
-
-    @Autowired
-    private CommonRepo commonRepo;
-
     @Override
     public Page<ApplicationType> getHotTesting(Pageable pageable,String keyword) {
-
-//        //获取热门众测
-//        List<ApplicationTypeVO> applicationTypeRank = projectDao.findTotalCountOfApplicationType(pageable).stream().map(rankInfos -> {
-//            ApplicationType applicationType = commonRepo.getApplicationTypeByAppCode(rankInfos.getCode());
-//            ApplicationTypeVO applicationTypeVO = new ApplicationTypeVO(applicationType);
-//            applicationTypeVO.setCount(rankInfos.getCount());
-//            return applicationTypeVO;
-//        }).filter(Objects::nonNull).collect(Collectors.toList());
-
         Specifications<ApplicationTypePO> where =  Specifications.where(getArticlesByIsNotDeleted(keyword));
         return applicationTypeDao.findAll(where,pageable).map(ApplicationTypePO->Converter.convert(ApplicationType.class, ApplicationTypePO));
     }

+ 3 - 0
core/src/main/java/com/mooctest/crowd/domain/repository/IUserRepo.java

@@ -1,6 +1,7 @@
 package com.mooctest.crowd.domain.repository;
 
 import com.mooctest.crowd.domain.domainobject.User;
+import com.mooctest.crowd.domain.domainobject.UserTaskCount;
 import com.mooctest.crowd.domain.exception.UserNotExistException;
 import com.mooctest.crowd.domain.model.UserPO;
 
@@ -26,6 +27,8 @@ public interface IUserRepo {
 
     ArrayList<UserPO> getAllUserInfo() throws RoleNotFoundException;
 
+    UserTaskCount getUserTaskCountByUserId(Long userId);
+
 //    User getByEvaluationAgencyByUserId(Long userId) throws UserNotExistException, com.mooctest.crowd.domain.exception.RoleNotFoundException;
 
     void removeUser(User user);

+ 14 - 1
core/src/main/java/com/mooctest/crowd/domain/repository/UserRepo.java

@@ -6,13 +6,13 @@ import com.mooctest.crowd.domain.domainobject.*;
 import com.mooctest.crowd.domain.exception.PermissionNotFoundException;
 import com.mooctest.crowd.domain.exception.RoleNotFoundException;
 import com.mooctest.crowd.domain.exception.UserNotExistException;
+import com.mooctest.crowd.domain.exception.UserTaskCountNoExistException;
 import com.mooctest.crowd.domain.model.*;
 import com.mooctest.crowd.domain.util.Converter;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import javax.security.auth.login.Configuration;
 import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.List;
@@ -41,6 +41,9 @@ public class UserRepo implements IUserRepo {
     private UserToRoleDao userToRoleDao;
 
     @Autowired
+    private UserTaskCountDao userTaskCountDao;
+
+    @Autowired
     private RoleToPermissionDao roleToPermissionDao;
 
     @Autowired
@@ -139,6 +142,16 @@ public class UserRepo implements IUserRepo {
         return userPOArrayList;
     }
 
+    @Override
+    public UserTaskCount getUserTaskCountByUserId(Long userId){
+        Optional<UserTaskCountPO> userTaskCountPO = userTaskCountDao.findByUserId(userId);
+        if(!userTaskCountPO.isPresent()){
+            throw new UserTaskCountNoExistException();
+        }else{
+            return Converter.convert(UserTaskCount.class, userTaskCountPO.get());
+        }
+    }
+
 
     //add
 //    @Override

+ 2 - 0
site/src/main/java/com/mooctest/crowd/site/constants/CommonConstant.java

@@ -12,6 +12,8 @@ public class CommonConstant {
 
     public static final Integer SQUARE_ROWS_ON_PAGE = 9;
 
+    public static final Integer HOT_CROWD_ROWS_ON_PAGE = 10;
+
     public static final Integer SQUARE_ROWS_ON_PAGE_MODIFY = 12;
 
     public static final Integer TECHNOLOGY_ROWS_ON_PAGE = 5;

+ 1 - 1
site/src/main/java/com/mooctest/crowd/site/controller/AgencyController.java

@@ -159,7 +159,7 @@ public class AgencyController extends BaseSearchController {
     @RequestMapping(value = "resident/agency/more", method = RequestMethod.POST)
     public ResponseVO getMoreResidentList(@RequestBody SearchConditionVO searchConditionVO) {
         Pageable pageable = this.getPageable(searchConditionVO);
-        return new ResponseVO(ServerCode.SUCCESS, residentAgencyService.findAll(pageable));
+        return new ResponseVO(ServerCode.SUCCESS, residentAgencyService.findAll(pageable, searchConditionVO.getKeyword()));
     }
 
     @RequestMapping(value = "agency/{agencyId}", method = RequestMethod.GET)

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/controller/CommonController.java


+ 5 - 5
site/src/main/java/com/mooctest/crowd/site/controller/UserController.java

@@ -146,11 +146,11 @@ public class UserController extends BaseController{
     public PersonalAuthVO applyPersonalAuthentication(@PathVariable("userId") Long userId,
                                                       @Validated @RequestBody ApplyPersonalAuthCommand command,
                                                       BindingResult result, HttpSession session) {
-        if (!userId.equals(Long.parseLong((String) session.getAttribute("userId"))))
-            throw new UnauthorizedException("没有权限对他人账号进行操作!");
-        LOG.info("当前用户申请的认证信息为" + command);
-        if (result.hasErrors())
-            throw new BaseException(result.getFieldError().getDefaultMessage());
+//        if (!userId.equals(Long.parseLong((String) session.getAttribute("userId"))))
+//            throw new UnauthorizedException("没有权限对他人账号进行操作!");
+//        LOG.info("当前用户申请的认证信息为" + command);
+//        if (result.hasErrors())
+//            throw new BaseException(result.getFieldError().getDefaultMessage());
         return userService.applyPersonalAuth(userId, command);
     }
 

+ 2 - 0
site/src/main/java/com/mooctest/crowd/site/controller/advice/ExceptionAdvice.java

@@ -47,6 +47,8 @@ public class ExceptionAdvice {
             return "领域不存在";
         } else if (e instanceof ResourceNoExistException){
             return "资源不存在";
+        } else if (e instanceof UserTaskCountNoExistException) {
+            return "当前用户没有参与接包";
         } else
             return e.getMessage();
     }

+ 2 - 1
site/src/main/java/com/mooctest/crowd/site/mediator/ViewMediator.java

@@ -5,6 +5,7 @@ import com.mooctest.crowd.domain.domainobject.User;
 import com.mooctest.crowd.domain.exception.AccountNotExistException;
 import com.mooctest.crowd.domain.exception.BadRequestException;
 import com.mooctest.crowd.domain.exception.PasswordErrorException;
+import com.mooctest.crowd.site.command.ApplyEnterpriseAuthCommand;
 import com.mooctest.crowd.site.command.ApplyPersonalAuthCommand;
 import com.mooctest.crowd.site.command.LoginCommand;
 import com.mooctest.crowd.site.command.RegisterCommand;
@@ -22,7 +23,7 @@ import java.util.List;
  */
 public interface ViewMediator {
 
-
+    void     saveEnterpriseRole(User user, ApplyEnterpriseAuthCommand applyEnterpriseAuthCommand);
     void    saveUserRole(User user, ApplyPersonalAuthCommand command);
 
     List<UserVO> renderMoreUser(Pageable pageable,String keyword);

+ 41 - 7
site/src/main/java/com/mooctest/crowd/site/mediator/impl/WebMediatorImpl.java

@@ -1,4 +1,5 @@
 package com.mooctest.crowd.site.mediator.impl;
+
 import com.alibaba.fastjson.JSONArray;
 import com.mooctest.crowd.domain.dao.*;
 import com.mooctest.crowd.domain.domainobject.*;
@@ -10,6 +11,7 @@ import com.mooctest.crowd.domain.repository.CrowdTestProjectRepo;
 import com.mooctest.crowd.domain.repository.EvaluationAgencyRepo;
 import com.mooctest.crowd.domain.repository.UserRepo;
 import com.mooctest.crowd.domain.util.Converter;
+import com.mooctest.crowd.site.command.ApplyEnterpriseAuthCommand;
 import com.mooctest.crowd.site.command.ApplyPersonalAuthCommand;
 import com.mooctest.crowd.site.command.LoginCommand;
 import com.mooctest.crowd.site.command.RegisterCommand;
@@ -21,6 +23,8 @@ import com.mooctest.crowd.site.data.vo.*;
 import com.mooctest.crowd.site.mediator.ViewMediator;
 import lombok.extern.slf4j.Slf4j;
 import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.jetbrains.annotations.NotNull;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -118,6 +122,30 @@ public class WebMediatorImpl implements ViewMediator {
     private UserToRoleDao userToRoleDao;
 
     @Override
+    public void saveEnterpriseRole(User user, ApplyEnterpriseAuthCommand applyEnterpriseAuthCommand) {
+        UserPO userPO = userDao.save(Converter.convert(UserPO.class, user));
+        //如果是研发机构那么能发包
+        if(applyEnterpriseAuthCommand.getIsDaOrEa().equals("研发机构")){
+            UserToRolePO u2r = new UserToRolePO();
+            u2r.setUserId(userPO.getId());
+            u2r.setRoleId(8L);
+            userToRoleDao.save(u2r);
+
+        }
+        if(applyEnterpriseAuthCommand.getIsDaOrEa().equals("测评机构")){
+            UserToRolePO u2r = new UserToRolePO();
+            u2r.setUserId(userPO.getId());
+            u2r.setRoleId(2L);
+            userToRoleDao.save(u2r);
+        }
+
+
+
+
+
+    }
+
+    @Override
     public void saveUserRole(User user, ApplyPersonalAuthCommand command) {
         if (command.getRoleList().size() == 0 || command.getRoleList() == null) {
             throw new BaseException("请选择成为发包或者接包用户");
@@ -151,6 +179,7 @@ public class WebMediatorImpl implements ViewMediator {
         }
 
 
+
     }
 
     @Override
@@ -319,13 +348,7 @@ public class WebMediatorImpl implements ViewMediator {
         IndexInfoDTO indexInfoDTO = new IndexInfoDTO();
         Pageable pageable = PageRequest.of(0, 3);
         int top = 3;
-        //获取热门众测
-        List<ApplicationTypeVO> applicationTypeRank = projectDao.findTotalCountOfApplicationType(pageable).stream().map(rankInfos -> {
-            ApplicationType applicationType = commonRepo.getApplicationTypeByAppCode(rankInfos.getCode());
-            ApplicationTypeVO applicationTypeVO = new ApplicationTypeVO(applicationType);
-            applicationTypeVO.setCount(rankInfos.getCount());
-            return applicationTypeVO;
-        }).filter(Objects::nonNull).collect(Collectors.toList());
+        List<ApplicationTypeVO> applicationTypeRank = getApplicationTypeRankVOS(pageable);
         List<ApplicationTypeVO> applicationTypeRanks = new ArrayList<>();
         if (applicationTypeRanks.size() > top) {
             for (int i = 0; i < top; i++) {
@@ -418,6 +441,17 @@ public class WebMediatorImpl implements ViewMediator {
         return indexInfoDTO;
     }
 
+    @NotNull
+    public List<ApplicationTypeVO> getApplicationTypeRankVOS(Pageable pageable) {
+        //获取热门众测
+        return projectDao.findTotalCountOfApplicationType(pageable).stream().map(rankInfos -> {
+            ApplicationType applicationType = commonRepo.getApplicationTypeByAppCode(rankInfos.getCode());
+            ApplicationTypeVO applicationTypeVO = new ApplicationTypeVO(applicationType);
+            applicationTypeVO.setCount(rankInfos.getCount());
+            return applicationTypeVO;
+        }).filter(Objects::nonNull).collect(Collectors.toList());
+    }
+
     @Override
     public IndexDTO renderIndex() {
         Pageable pageable = PageRequest.of(0, 10);

+ 1 - 1
site/src/main/java/com/mooctest/crowd/site/service/CommonService.java

@@ -32,7 +32,7 @@ public interface CommonService {
 
     Page<CrowdTaskVO> getTaskinfo(Pageable pageable, String keyword, int deletedStatus);
 
-    Page<ApplicationTypeVO> getHotTesting(Pageable pageable,String keyword);
+    List<ApplicationTypeVO> getHotTesting(String keyword);
 
     Page<CompetitionVO> getCompetition(Pageable pageable,String keyword);
 

+ 1 - 4
site/src/main/java/com/mooctest/crowd/site/service/ResidentAgencyService.java

@@ -1,16 +1,13 @@
 package com.mooctest.crowd.site.service;
 
 
-import com.mooctest.crowd.domain.model.ResidentAgencyPO;
 import com.mooctest.crowd.site.data.vo.ResidentAgencyVO;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 
-import java.awt.*;
-
 public interface ResidentAgencyService {
 
-    Page<ResidentAgencyVO> findAll(Pageable pageable);
+    Page<ResidentAgencyVO> findAll(Pageable pageable, String keyword);
 
 
 }

+ 14 - 14
site/src/main/java/com/mooctest/crowd/site/service/impl/AgencyServiceImpl.java

@@ -91,8 +91,13 @@ public class AgencyServiceImpl implements AgencyService {
         return agencyVO;
     }
 
+    /**
+     * 获取首页机构 more模糊查询
+     * @param keyword
+     * @return
+     */
     @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 +111,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());
 
+            return list.stream().filter(evaluationAgencyVO-> evaluationAgencyVO.getEvaluationAgencyName().contains(keyword)).collect(Collectors.toList());
+        }
 
+    }
     @Override
     public UserDTO applyAgency(Long userId, ApplyAgencyAuthCommand command) {
         EvaluationAgency agency = command.toAgency();
@@ -208,17 +218,7 @@ public class AgencyServiceImpl implements AgencyService {
         if (agency == null)
             throw new EvaluationAgencyNotExistException("当前用户未申请机构认证");
         AgencyVO agencyVO = new AgencyVO(user.getEvaluationAgency());
-
-        List<RankCountInfo> rankCountInfoList = taskToUserDao.findTotalCountOfUser();
-        long ids[] = new long[rankCountInfoList.size()];
-        for (int i = 0; i < ids.length; i++) {
-            ids[i] = rankCountInfoList.get(i).getEntityId();
-            if (ids[i] == agencyVO.getUserId()) {
-                agencyVO.setTaskCount(rankCountInfoList.get(i).getCount());
-            }
-        }
+        agencyVO.setTaskCount(userRepo.getUserTaskCountByUserId(userId).getCount());
         return agencyVO;
     }
-
-
 }

+ 19 - 2
site/src/main/java/com/mooctest/crowd/site/service/impl/CommonServiceImpl.java

@@ -1,5 +1,6 @@
 package com.mooctest.crowd.site.service.impl;
 
+import com.mooctest.crowd.domain.dao.CrowdTestProjectDao;
 import com.mooctest.crowd.domain.domainobject.CrowdTestProject;
 import com.mooctest.crowd.domain.repository.*;
 import com.mooctest.crowd.site.constants.CommonConstant;
@@ -10,6 +11,7 @@ import com.mooctest.crowd.site.data.response.ResponseVO;
 import com.mooctest.crowd.site.data.response.ServerCode;
 import com.mooctest.crowd.site.data.vo.*;
 import com.mooctest.crowd.site.mediator.ViewMediator;
+import com.mooctest.crowd.site.mediator.impl.WebMediatorImpl;
 import com.mooctest.crowd.site.service.CommonService;
 import com.mooctest.crowd.site.util.DataUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,11 +46,17 @@ public class CommonServiceImpl implements CommonService {
     private EvaluationAgencyRepo agencyRepo;
 
     @Autowired
+    private CrowdTestProjectDao projectDao;
+
+    @Autowired
     private CommonRepo commonRepo;
 
     @Autowired
     private ApplicationTypeRepo applicationTypeRepo;
 
+    @Autowired
+    private WebMediatorImpl webMediator;
+
 //    @Autowired
 //    private CacheUtil cacheUtil;
 
@@ -114,8 +122,17 @@ public class CommonServiceImpl implements CommonService {
     }
 
     @Override
-    public Page<ApplicationTypeVO> getHotTesting(Pageable pageable,String keyword) {
-        return applicationTypeRepo.getHotTesting(pageable,keyword).map(applicationType -> new ApplicationTypeVO(applicationType));
+    public List<ApplicationTypeVO> getHotTesting(String keyword) {
+
+        Pageable pageable = PageRequest.of(0, CommonConstant.HOT_CROWD_ROWS_ON_PAGE);
+        //获取热门众测
+        List<ApplicationTypeVO> applicationTypeRank = webMediator.getApplicationTypeRankVOS(pageable);
+
+        if (keyword != null && keyword.trim() != "") {
+            return applicationTypeRank.stream().filter(applicationTypeVO -> applicationTypeVO.getName().contains(keyword)).collect(Collectors.toList());
+        }else{
+            return applicationTypeRank;
+        }
     }
 
     @Override

+ 12 - 24
site/src/main/java/com/mooctest/crowd/site/service/impl/ResidentServiceImpl.java

@@ -5,9 +5,6 @@ import com.mooctest.crowd.domain.dao.ResidentAgencyDao;
 import com.mooctest.crowd.domain.dao.TaskToUserDao;
 import com.mooctest.crowd.domain.dao.UserDao;
 import com.mooctest.crowd.domain.model.EvaluationAgencyPO;
-import com.mooctest.crowd.domain.model.RankCountInfo;
-import com.mooctest.crowd.domain.model.ResidentAgencyPO;
-import com.mooctest.crowd.domain.model.UserPO;
 import com.mooctest.crowd.site.data.vo.ResidentAgencyVO;
 import com.mooctest.crowd.site.service.ResidentAgencyService;
 import com.mooctest.crowd.site.util.DataUtils;
@@ -17,9 +14,8 @@ import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
 import java.util.List;
-import java.util.Optional;
+import java.util.stream.Collectors;
 
 /**
  * @author:xx
@@ -40,30 +36,22 @@ public class ResidentServiceImpl implements ResidentAgencyService {
 
 
     @Override
-    public Page<ResidentAgencyVO> findAll(Pageable pageable) {
-        List<ResidentAgencyVO> list = new ArrayList<>();
-        List<RankCountInfo> totalCountOfUser = taskToUserDao.findTotalCountOfUser();
-        long ids[] = new long[totalCountOfUser.size()];
-        List<ResidentAgencyPO> residentAgencyPOS = residentAgencyDao.findAll();
-        //获取品牌机构的用户id
-        long resagency[] = new long[residentAgencyPOS.size()];
-        for (int i = 0; i < residentAgencyPOS.size(); i++) {
+    public Page<ResidentAgencyVO> findAll(Pageable pageable, String keyword) {
+        List<ResidentAgencyVO> residentAgencyVOList = residentAgencyDao.findAll().stream().map(residentAgencyPO -> {
             ResidentAgencyVO residentAgencyVO = new ResidentAgencyVO();
-            Optional<UserPO> userPO = userDao.findById(residentAgencyPOS.get(i).getUserId());
-            resagency[i] = residentAgencyPOS.get(i).getUserId();
-            EvaluationAgencyPO evaluationAgencyPO = agencyDao.findByUserId(resagency[i]);
+            EvaluationAgencyPO evaluationAgencyPO = agencyDao.findByUserId(residentAgencyPO.getUserId());
             residentAgencyVO.setName(evaluationAgencyPO.getEvaluationAgencyName());
             residentAgencyVO.setAgencyPhoto(evaluationAgencyPO.getAgencyPhoto());
-            residentAgencyVO.setTaskCount(totalCountOfUser.get(i).getCount());
             residentAgencyVO.setAddress(evaluationAgencyPO.getAddress());
-            residentAgencyVO.setAgencyId(residentAgencyPOS.get(i).getAgencyId());
-            residentAgencyVO.setId(residentAgencyPOS.get(i).getId());
-            residentAgencyVO.setUserId(residentAgencyPOS.get(i).getUserId());
-            list.add(residentAgencyVO);
+            residentAgencyVO.setAgencyId(evaluationAgencyPO.getId());
+            residentAgencyVO.setId(residentAgencyPO.getId());
+            residentAgencyVO.setUserId(residentAgencyPO.getUserId());
+            return residentAgencyVO;
+        }).collect(Collectors.toList());
+        if(keyword != null && keyword != ""){
+            residentAgencyVOList = residentAgencyVOList.stream().filter(residentAgencyVO -> residentAgencyVO.getName().contains(keyword)).collect(Collectors.toList());
         }
-
-
-        Page<ResidentAgencyVO> page = DataUtils.listToPage(list, pageable);
+        Page<ResidentAgencyVO> page = DataUtils.listToPage(residentAgencyVOList, pageable);
         return page;
     }
 }

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/service/impl/UserServiceImpl.java


Някои файлове не бяха показани, защото твърде много файлове са промени