guo00guo 5 jaren geleden
bovenliggende
commit
49f1b9ab6b

+ 17 - 37
core/src/main/java/com/mooctest/crowd/domain/domainobject/EvaluationAgency.java

@@ -2,7 +2,9 @@ package com.mooctest.crowd.domain.domainobject;
 
 import com.mooctest.crowd.domain.exception.BaseException;
 import com.mooctest.crowd.domain.model.EvaluationAgencyPO;
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 import org.springframework.beans.BeanUtils;
 
 import java.sql.Timestamp;
@@ -13,6 +15,8 @@ import java.util.List;
  * @date 2019/7/12 1:32
  */
 @Data
+@AllArgsConstructor
+@NoArgsConstructor
 public class EvaluationAgency {
     private Long id;
     private Long userId;
@@ -30,45 +34,21 @@ public class EvaluationAgency {
     private Timestamp checkTime;
     private Timestamp applyTime;
 
-    @Override
-    public String toString() {
-        return "EvaluationAgency{" +
-                "id=" + id +
-                ", userId=" + userId +
-                ", evaluationAgencyName='" + evaluationAgencyName + '\'' +
-                ", bankAccount='" + bankAccount + '\'' +
-                ", address='" + address + '\'' +
-                ", evaluationAgencyAbilityList=" + evaluationAgencyAbilityList +
-                ", evaluationAgencyResourceList=" + evaluationAgencyResourceList +
-                ", agencyPhoto='" + agencyPhoto + '\'' +
-                ", isAuthentication=" + isAuthentication +
-                ", explain='" + explain + '\'' +
-                ", isDeleted=" + isDeleted +
-                ", updateTime=" + updateTime +
-                ", expireTime=" + expireTime +
-                ", applyTime=" + applyTime +
-                ", checkTime=" + checkTime +
-                '}';
+//    public EvaluationAgency(EvaluationAgencyPO evaluationAgencyPO) {
+//        BeanUtils.copyProperties(evaluationAgencyPO, this,"evaluationAgencyResourceList", "evaluationAgencyAbilityList");
+//    }
+
+    public EvaluationAgency(EvaluationAgencyPO evaluationAgencyPO){
+        id = evaluationAgencyPO.getId();
+        agencyPhoto = evaluationAgencyPO.getAgencyPhoto();
+        evaluationAgencyName = evaluationAgencyPO.getEvaluationAgencyName();
+        userId = evaluationAgencyPO.getUserId();
+        updateTime=evaluationAgencyPO.getUpdateTime();
+        expireTime=evaluationAgencyPO.getExpireTime();
+        checkTime=evaluationAgencyPO.getCheckTime();
+        applyTime=evaluationAgencyPO.getApplyTime();
     }
 
-    public EvaluationAgency() {
-
-    }
-
-
-    public EvaluationAgency(EvaluationAgencyPO evaluationAgencyPO) {
-        BeanUtils.copyProperties(evaluationAgencyPO, this);
-
-
-    }
-
-
-    public EvaluationAgency EvaluationAgency(EvaluationAgencyPO evaluationAgencyPO) {
-        BeanUtils.copyProperties(evaluationAgencyPO, this);
-        return this;
-    }
-
-
     public EvaluationAgency applyAuthentication(Long userId) {
         this.setUserId(userId);
         this.setIsAuthentication(AuthenticationStatus.isAuthenIng);

+ 10 - 0
core/src/main/java/com/mooctest/crowd/domain/repository/CommonRepo.java

@@ -3,6 +3,7 @@ package com.mooctest.crowd.domain.repository;
 import com.mooctest.crowd.domain.dao.*;
 import com.mooctest.crowd.domain.domainobject.*;
 import com.mooctest.crowd.domain.exception.ApplicationTypeNoExistException;
+import com.mooctest.crowd.domain.exception.BadRequestException;
 import com.mooctest.crowd.domain.exception.FieldNoExistException;
 import com.mooctest.crowd.domain.exception.TestTypeNoExistException;
 import com.mooctest.crowd.domain.model.*;
@@ -182,6 +183,15 @@ public class CommonRepo {
         return expertDao.findAll(where, pageable).map(expertPO -> Converter.convert(Expert.class, expertPO));
     }
 
+    public Expert findExpertById(Long id){
+        Optional<ExpertPO> expertPOOptional = expertDao.findById(id);
+        if(!expertPOOptional.isPresent()){
+            throw new BadRequestException("专家信息不存在!");
+        }else{
+            return Converter.convert(Expert.class, expertPOOptional.get());
+        }
+    }
+
     private Specification<ExpertPO> getExpert(String keyword) {
         return new Specification<ExpertPO>() {
             @Override

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

@@ -11,7 +11,7 @@ import com.mooctest.crowd.site.data.dto.UserDTO;
 import com.mooctest.crowd.site.data.response.ResponseVO;
 import com.mooctest.crowd.site.data.response.ServerCode;
 import com.mooctest.crowd.site.data.vo.AgencyVO;
-import com.mooctest.crowd.site.data.vo.EvolutionAgencyVO;
+import com.mooctest.crowd.site.data.vo.EvaluationAgencyVO;
 import com.mooctest.crowd.site.data.vo.SearchConditionVO;
 import com.mooctest.crowd.site.service.AgencyService;
 import com.mooctest.crowd.site.service.ResidentAgencyService;
@@ -141,7 +141,7 @@ public class AgencyController extends BaseSearchController {
     }
 
     @RequestMapping(value = "/agency/list", method = RequestMethod.GET)
-    public List<EvolutionAgencyVO> getAgencyList() {
+    public List<EvaluationAgencyVO> getAgencyList() {
         return agencyService.getAgencyList();
     }
 
@@ -150,8 +150,8 @@ public class AgencyController extends BaseSearchController {
     public ResponseVO getMoreAgencyList(@RequestBody SearchConditionVO searchConditionVO) {
         Pageable pageable = this.getPageable(searchConditionVO);
         String keyword = searchConditionVO.getKeyword();
-        List<EvolutionAgencyVO> list = agencyService.findMoreAgencyVO(keyword);
-        Page<EvolutionAgencyVO> page = DataUtils.listToPage(list, pageable);
+        List<EvaluationAgencyVO> list = agencyService.findMoreAgencyVO(keyword);
+        Page<EvaluationAgencyVO> page = DataUtils.listToPage(list, pageable);
         return new ResponseVO(ServerCode.SUCCESS, page);
     }
 
@@ -165,7 +165,7 @@ public class AgencyController extends BaseSearchController {
     @RequestMapping(value = "agency/{agencyId}", method = RequestMethod.GET)
     public ResponseVO getAgencyDetails(@PathVariable("agencyId") long agencyId) {
 
-        EvolutionAgencyVO agencyVO = agencyService.getDetailById(agencyId);
+        EvaluationAgencyVO agencyVO = agencyService.getDetailById(agencyId);
         return new ResponseVO(ServerCode.SUCCESS, agencyVO);
     }
 

File diff suppressed because it is too large
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/controller/CommonController.java


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

@@ -12,6 +12,7 @@ import com.mooctest.crowd.site.data.response.ServerCode;
 import com.mooctest.crowd.site.data.vo.BaseAuthVO;
 import com.mooctest.crowd.site.data.vo.EnterpriseAuthVO;
 import com.mooctest.crowd.site.data.vo.PersonalAuthVO;
+import com.mooctest.crowd.site.data.vo.UserVO;
 import com.mooctest.crowd.site.service.EnterpriseAuthService;
 import com.mooctest.crowd.site.service.PersonalAuthService;
 import com.mooctest.crowd.site.service.UserService;
@@ -26,7 +27,6 @@ import javax.servlet.http.HttpSession;
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.InvocationTargetException;
 import java.util.List;
-import java.util.Map;
 
 /**
  * @author: Diors.Po
@@ -79,6 +79,11 @@ public class UserController extends BaseController {
         return userService.loginByMobileAndPwd(loginCommand);
     }
 
+    @RequestMapping(value = "/user/detail/{userId}", method = RequestMethod.GET)
+    public ResponseVO<UserVO> getUserDetail(@PathVariable Long userId) {
+        return new ResponseVO<>(ServerCode.SUCCESS, userService.getUserDetail(userId));
+    }
+
     /**
      * 修改密码
      */

+ 2 - 2
site/src/main/java/com/mooctest/crowd/site/data/dto/IndexDTO.java

@@ -1,6 +1,6 @@
 package com.mooctest.crowd.site.data.dto;
 
-import com.mooctest.crowd.site.data.vo.EvolutionAgencyVO;
+import com.mooctest.crowd.site.data.vo.EvaluationAgencyVO;
 import com.mooctest.crowd.site.data.vo.CrowdTaskVO;
 import com.mooctest.crowd.site.data.vo.PieChartDataVO;
 import com.mooctest.crowd.site.data.vo.UserVO;
@@ -16,7 +16,7 @@ import java.util.List;
 public class IndexDTO{
     private List<String> imgList;
     private List<CrowdTaskVO> hotTaskList;
-    private List<EvolutionAgencyVO> agencyRank;
+    private List<EvaluationAgencyVO> agencyRank;
     private List<UserVO> userRank;
     private List<PieChartDataVO> systemStatistics;
 }

+ 2 - 2
site/src/main/java/com/mooctest/crowd/site/data/dto/IndexInfoDTO.java

@@ -15,11 +15,11 @@ public class IndexInfoDTO implements Serializable {
     private List<TestTypeVO> testTypeList;
     private List<ApplicationTypeVO> applicationTypeList;
     private List<ApplicationTypeVO> applicationTypeRank;
-    private List<EvolutionAgencyVO> agencyRank;
+    private List<EvaluationAgencyVO> agencyRank;
     private List<UserVO> userRank;
     private List<FieldVO> fieldList;
     private List<CompetitionVO> competitionList;
     private List<ResourceVO> resourceList;
-    private List<EvolutionAgencyVO> residentAgencyList;
+    private List<EvaluationAgencyVO> residentAgencyList;
     private List<PartnerVO> partnerList;
 }

+ 2 - 4
site/src/main/java/com/mooctest/crowd/site/data/vo/EvolutionAgencyVO.java → site/src/main/java/com/mooctest/crowd/site/data/vo/EvaluationAgencyVO.java

@@ -15,7 +15,7 @@ import java.sql.Timestamp;
 @Data
 @NoArgsConstructor
 @AllArgsConstructor
-public class EvolutionAgencyVO implements Serializable {
+public class EvaluationAgencyVO implements Serializable {
 
     private Long id;
     private Long userId;
@@ -29,9 +29,7 @@ public class EvolutionAgencyVO implements Serializable {
     private Timestamp checkTime;
     private Timestamp applyTime;
 
-
-
-    public EvolutionAgencyVO(EvaluationAgency evaluationAgency){
+    public EvaluationAgencyVO(EvaluationAgency evaluationAgency){
         id = evaluationAgency.getId();
         agencyPhoto = evaluationAgency.getAgencyPhoto();
         evaluationAgencyName = evaluationAgency.getEvaluationAgencyName();

+ 4 - 12
site/src/main/java/com/mooctest/crowd/site/mediator/ViewMediator.java

@@ -5,22 +5,14 @@ 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.domain.model.EvaluationAgencyPO;
-import com.mooctest.crowd.domain.model.PersonalAuthenticationPO;
-import com.mooctest.crowd.site.data.vo.*;
-import org.codehaus.jettison.json.JSONException;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
 import com.mooctest.crowd.site.command.LoginCommand;
 import com.mooctest.crowd.site.command.RegisterCommand;
 import com.mooctest.crowd.site.data.dto.*;
-import com.mooctest.crowd.site.data.vo.BaseAuthVO;
-import com.mooctest.crowd.site.data.vo.EvolutionAgencyVO;
-import com.mooctest.crowd.site.data.vo.RegionalManagerVO;
-
+import com.mooctest.crowd.site.data.vo.*;
+import org.codehaus.jettison.json.JSONException;
+import org.springframework.data.domain.Pageable;
 
 import java.util.List;
-import java.util.Optional;
 
 /**
  * @Author: xuexb
@@ -62,7 +54,7 @@ public interface ViewMediator {
 
     List<RegionalManagerVO> renderRegionManagerList();
 
-    List<EvolutionAgencyVO> renderAgencyList();
+    List<EvaluationAgencyVO> renderAgencyList();
 
     List<BaseAuthVO> renderAuthingList();
 

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

@@ -214,10 +214,10 @@ public class WebMediatorImpl implements ViewMediator {
 
         //获取机构排名
         String agencyName = agencyDao.findById(Long.parseLong(agencyId)).get().getEvaluationAgencyName();
-        List<EvolutionAgencyVO> agencyRank = taskToUserDao.findTotalCountOfUser().stream().map(rankInfo -> {
+        List<EvaluationAgencyVO> agencyRank = taskToUserDao.findTotalCountOfUser().stream().map(rankInfo -> {
             EvaluationAgencyPO agency = agencyDao.findByUserId(rankInfo.getEntityId());
             if (agency != null && !agency.getEvaluationAgencyName().equals(agencyName)) {
-                EvolutionAgencyVO agencyVO = new EvolutionAgencyVO();
+                EvaluationAgencyVO agencyVO = new EvaluationAgencyVO();
                 agencyVO.setEvaluationAgencyName(agency.getEvaluationAgencyName());
                 agencyVO.setAgencyPhoto(agency.getAgencyPhoto());
                 agencyVO.setTaskCount(rankInfo.getCount());
@@ -227,7 +227,7 @@ public class WebMediatorImpl implements ViewMediator {
             }
             return null;
         }).filter(Objects::nonNull).collect(Collectors.toList());
-        List<EvolutionAgencyVO> agencyRanks = new ArrayList<>();
+        List<EvaluationAgencyVO> agencyRanks = new ArrayList<>();
         if (agencyRank.size() > top) {
             for (int i = 0; i < top; i++) {
                 agencyRanks.add(agencyRank.get(i));
@@ -315,10 +315,10 @@ public class WebMediatorImpl implements ViewMediator {
 
         // 获取合作机构
         List<ResidentAgency> allResidentAgency = commonRepo.getAllResidentAgency();
-        List<EvolutionAgencyVO> agencyVOS = allResidentAgency.stream().map(residentAgency -> {
+        List<EvaluationAgencyVO> agencyVOS = allResidentAgency.stream().map(residentAgency -> {
             EvaluationAgency agency = evaluationAgencyRepo.findAgencyById(residentAgency.getAgencyId());
-            EvolutionAgencyVO evolutionAgencyVO = new EvolutionAgencyVO(agency);
-            return evolutionAgencyVO;
+            EvaluationAgencyVO evalutionAgencyVO = new EvaluationAgencyVO(agency);
+            return evalutionAgencyVO;
         }).collect(Collectors.toList());
 
         indexInfoDTO.setApplicationTypeRank(applicationTypeRanks);
@@ -351,10 +351,10 @@ public class WebMediatorImpl implements ViewMediator {
             return null;
         }).filter(Objects::nonNull).collect(Collectors.toList());
         //获取机构排名
-        List<EvolutionAgencyVO> agencyRanks = taskToUserDao.findTotalPriceOfAgency(pageable).stream().map(rankInfo -> {
+        List<EvaluationAgencyVO> agencyRanks = taskToUserDao.findTotalPriceOfAgency(pageable).stream().map(rankInfo -> {
             EvaluationAgencyPO agency = agencyDao.findByUserId(rankInfo.getEntityId());
             if (agency != null) {
-                EvolutionAgencyVO agencyVO = new EvolutionAgencyVO();
+                EvaluationAgencyVO agencyVO = new EvaluationAgencyVO();
                 agencyVO.setEvaluationAgencyName(agency.getEvaluationAgencyName());
                 agencyVO.setAgencyPhoto(agency.getAgencyPhoto());
                 agencyVO.setAllTaskPrice(rankInfo.getTotalPrice());
@@ -775,11 +775,11 @@ public class WebMediatorImpl implements ViewMediator {
     }
 
     @Override
-    public List<EvolutionAgencyVO> renderAgencyList() {
-        List<EvolutionAgencyVO> agencyList = new ArrayList<>();
+    public List<EvaluationAgencyVO> renderAgencyList() {
+        List<EvaluationAgencyVO> agencyList = new ArrayList<>();
         EvaluationAgency agencyTemplate = evaluationAgencyRepo.findAgencyById(Long.parseLong(agencyId));
         agencyDao.findAll().forEach(evaluationAgencyPO -> {
-            EvolutionAgencyVO agencyVO = new EvolutionAgencyVO();
+            EvaluationAgencyVO agencyVO = new EvaluationAgencyVO();
             agencyVO.setId(evaluationAgencyPO.getUserId());
             agencyVO.setEvaluationAgencyName(evaluationAgencyPO.getEvaluationAgencyName());
             agencyList.add(agencyVO);

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

@@ -5,7 +5,7 @@ import com.mooctest.crowd.site.command.ApplyAgencyAuthCommand;
 import com.mooctest.crowd.site.command.GenerateAgencyCommand;
 import com.mooctest.crowd.site.data.dto.UserDTO;
 import com.mooctest.crowd.site.data.vo.AgencyVO;
-import com.mooctest.crowd.site.data.vo.EvolutionAgencyVO;
+import com.mooctest.crowd.site.data.vo.EvaluationAgencyVO;
 
 import java.util.List;
 
@@ -16,9 +16,9 @@ import java.util.List;
  */
 public interface AgencyService {
 
-    EvolutionAgencyVO   getDetailById(long agencyId);
+    EvaluationAgencyVO   getDetailById(long agencyId);
 
-    List<EvolutionAgencyVO> findMoreAgencyVO(String keyword);
+    List<EvaluationAgencyVO> findMoreAgencyVO(String keyword);
 
     UserDTO applyAgency(Long userId, ApplyAgencyAuthCommand command);
 
@@ -30,7 +30,7 @@ public interface AgencyService {
 
     AgencyVO upadteResourceAndAbility(Long userId, AgencyResourceAbilityUpdateCommand command);
 
-    List<EvolutionAgencyVO> getAgencyList();
+    List<EvaluationAgencyVO> getAgencyList();
 
     AgencyVO passAuth(Long userId);
 

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

@@ -43,4 +43,5 @@ public interface CommonService {
 
     ResponseVO findByNameLike(SearchConditionVO searchConditionVO);
 
+    ExpertVO getExpert(Long id);
 }

File diff suppressed because it is too large
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/service/UserService.java


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

@@ -6,6 +6,7 @@ import com.mooctest.crowd.domain.dao.UserDao;
 import com.mooctest.crowd.domain.domainobject.*;
 import com.mooctest.crowd.domain.exception.BaseException;
 import com.mooctest.crowd.domain.exception.EvaluationAgencyNotExistException;
+import com.mooctest.crowd.domain.exception.HttpBadRequestException;
 import com.mooctest.crowd.domain.exception.UserNotExistException;
 import com.mooctest.crowd.domain.model.EvaluationAgencyPO;
 import com.mooctest.crowd.domain.model.RankCountInfo;
@@ -19,12 +20,11 @@ import com.mooctest.crowd.site.command.ApplyAgencyAuthCommand;
 import com.mooctest.crowd.site.command.GenerateAgencyCommand;
 import com.mooctest.crowd.site.data.dto.UserDTO;
 import com.mooctest.crowd.site.data.vo.AgencyVO;
-import com.mooctest.crowd.site.data.vo.EvolutionAgencyVO;
+import com.mooctest.crowd.site.data.vo.EvaluationAgencyVO;
 import com.mooctest.crowd.site.data.vo.UserVO;
 import com.mooctest.crowd.site.mediator.ViewMediator;
 import com.mooctest.crowd.site.service.AgencyService;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -66,28 +66,30 @@ public class AgencyServiceImpl implements AgencyService {
     private String agencyId;
 
     @Override
-    public EvolutionAgencyVO getDetailById(long agencyId) {
+    public EvaluationAgencyVO getDetailById(long agencyId) {
         /*
         先根据机构id查询出机构信息,再从task-to-user表里面找到这个机构的接的任务的数量。
          */
-        EvaluationAgencyPO agencyPO = agencyDao.findByUserId(agencyId);
-        EvolutionAgencyVO agencyVO = new EvolutionAgencyVO();
+        Optional<EvaluationAgencyPO> agencyPO = agencyDao.findById(agencyId);
+        if(!agencyPO.isPresent()){
+            throw new HttpBadRequestException("机构不存在!");
+        }
+        EvaluationAgency evaluationAgency = new EvaluationAgency(agencyPO.get());
+        EvaluationAgencyVO agencyVO = new EvaluationAgencyVO(evaluationAgency);
         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] == agencyId) {
+            if (ids[i] == agencyVO.getUserId()) {
                 agencyVO.setTaskCount(rankCountInfoList.get(i).getCount());
             }
         }
-        BeanUtils.copyProperties(agencyPO, agencyVO);
-
         return agencyVO;
     }
 
     @Override
-    public List<EvolutionAgencyVO> findMoreAgencyVO(String keyword) {
-        List<EvolutionAgencyVO> list = new ArrayList<EvolutionAgencyVO>();//机构列表
+    public List<EvaluationAgencyVO> findMoreAgencyVO(String keyword) {
+        List<EvaluationAgencyVO> list = new ArrayList<EvaluationAgencyVO>();//机构列表
         List<RankCountInfo> rankInfos = taskToUserDao.findTotalCountOfUser();//用户接包信息
         String agencyName = agencyDao.findById(Long.parseLong(agencyId)).get().getEvaluationAgencyName();
         for (int i = 0; i < rankInfos.size(); i++) {
@@ -100,13 +102,13 @@ public class AgencyServiceImpl implements AgencyService {
                     }
                 }
                 EvaluationAgency evaluationAgency = new EvaluationAgency(evaluationAgencyPO);
-                EvolutionAgencyVO evolutionAgencyVO = new EvolutionAgencyVO(evaluationAgency);
-                evolutionAgencyVO.setTaskCount(rankInfos.get(i).getCount());
-                evolutionAgencyVO.setAddress((user.get().getProvince() + user.get().getCity()).replaceAll("null", ""));
-                list.add(evolutionAgencyVO);
+                EvaluationAgencyVO evalutionAgencyVO = new EvaluationAgencyVO(evaluationAgency);
+                evalutionAgencyVO.setTaskCount(rankInfos.get(i).getCount());
+                evalutionAgencyVO.setAddress((user.get().getProvince() + user.get().getCity()).replaceAll("null", ""));
+                list.add(evalutionAgencyVO);
             }
         }
-        return list.stream().sorted(Comparator.comparing(EvolutionAgencyVO::getTaskCount).reversed()).collect(Collectors.toList());
+        return list.stream().sorted(Comparator.comparing(EvaluationAgencyVO::getTaskCount).reversed()).collect(Collectors.toList());
     }
 
 
@@ -178,7 +180,7 @@ public class AgencyServiceImpl implements AgencyService {
     }
 
     @Override
-    public List<EvolutionAgencyVO> getAgencyList() {
+    public List<EvaluationAgencyVO> getAgencyList() {
         return mediator.renderAgencyList();
     }
 

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

@@ -23,8 +23,6 @@ import org.springframework.data.domain.Pageable;
 import org.springframework.data.domain.Sort;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -137,6 +135,11 @@ public class CommonServiceImpl implements CommonService {
         return new ResponseVO<>(ServerCode.SUCCESS, resourcePage);
     }
 
+    @Override
+    public ExpertVO getExpert(Long id) {
+        return new ExpertVO(commonRepo.findExpertById(id));
+    }
+
     Pageable getPageable(SearchConditionVO searchConditionVO) {
         int activePage = searchConditionVO.getActivePage() == 0 ? 1 : searchConditionVO.getActivePage();
         Sort sort = new Sort(Sort.Direction.DESC, "id");

File diff suppressed because it is too large
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/service/impl/UserServiceImpl.java


+ 1 - 1
site/src/main/resources/application.yml

@@ -56,7 +56,7 @@ oss:
 
 cache:
   expire:
-    duration: 7200
+    duration: 72000
 
 agency: 7
 

Some files were not shown because too many files changed in this diff