ソースを参照

Merge branch 'Test' into 'master'

Test

See merge request crowd-2019/crowd-test-service-backend!112
郭超 5 年 前
コミット
363aecc952
100 ファイル変更2241 行追加771 行削除
  1. 5 1
      core/pom.xml
  2. 2 7
      core/src/main/java/com/mooctest/crowd/domain/IpAddress/AddressUtils.java
  3. 5 7
      core/src/main/java/com/mooctest/crowd/domain/IpAddress/Area.java
  4. 1 0
      core/src/main/java/com/mooctest/crowd/domain/command/CrowdTestTaskCommand.java
  5. 0 0
      core/src/main/java/com/mooctest/crowd/domain/controller/TestUserController.java
  6. 6 0
      core/src/main/java/com/mooctest/crowd/domain/dao/BankLogoDao.java
  7. 20 12
      core/src/main/java/com/mooctest/crowd/domain/dao/CrowdTestProjectDao.java
  8. 24 13
      core/src/main/java/com/mooctest/crowd/domain/dao/CrowdTestTaskDao.java
  9. 1 0
      core/src/main/java/com/mooctest/crowd/domain/dao/UserDao.java
  10. 31 0
      core/src/main/java/com/mooctest/crowd/domain/dao/UserTaskCountDao.java
  11. 1 0
      core/src/main/java/com/mooctest/crowd/domain/domainobject/ApplicationType.java
  12. 17 0
      core/src/main/java/com/mooctest/crowd/domain/domainobject/CrowdTestProject.java
  13. 1 0
      core/src/main/java/com/mooctest/crowd/domain/domainobject/CrowdTestReport.java
  14. 43 32
      core/src/main/java/com/mooctest/crowd/domain/domainobject/CrowdTestTask.java
  15. 12 24
      core/src/main/java/com/mooctest/crowd/domain/domainobject/EnterpriseAuthentication.java
  16. 30 36
      core/src/main/java/com/mooctest/crowd/domain/domainobject/EvaluationAgency.java
  17. 1 1
      core/src/main/java/com/mooctest/crowd/domain/domainobject/Expert.java
  18. 1 0
      core/src/main/java/com/mooctest/crowd/domain/domainobject/Field.java
  19. 29 28
      core/src/main/java/com/mooctest/crowd/domain/domainobject/PersonalAuthentication.java
  20. 1 1
      core/src/main/java/com/mooctest/crowd/domain/domainobject/ResourceStatus.java
  21. 1 0
      core/src/main/java/com/mooctest/crowd/domain/domainobject/TestType.java
  22. 10 4
      core/src/main/java/com/mooctest/crowd/domain/domainobject/User.java
  23. 25 0
      core/src/main/java/com/mooctest/crowd/domain/domainobject/UserTaskCount.java
  24. 14 0
      core/src/main/java/com/mooctest/crowd/domain/exception/HaveNotAgencyAuthException.java
  25. 14 0
      core/src/main/java/com/mooctest/crowd/domain/exception/HaveNotPartAuthException.java
  26. 14 0
      core/src/main/java/com/mooctest/crowd/domain/exception/UserTaskCountNoExistException.java
  27. 3 0
      core/src/main/java/com/mooctest/crowd/domain/model/ApplicationTypePO.java
  28. 22 14
      core/src/main/java/com/mooctest/crowd/domain/model/EnterpriseAuthenticationPO.java
  29. 26 1
      core/src/main/java/com/mooctest/crowd/domain/model/EvaluationAgencyPO.java
  30. 3 0
      core/src/main/java/com/mooctest/crowd/domain/model/ExpertPO.java
  31. 3 0
      core/src/main/java/com/mooctest/crowd/domain/model/FieldPO.java
  32. 10 8
      core/src/main/java/com/mooctest/crowd/domain/model/PersonalAuthenticationPO.java
  33. 0 1
      core/src/main/java/com/mooctest/crowd/domain/model/QualificationPO.java
  34. 3 0
      core/src/main/java/com/mooctest/crowd/domain/model/TestTypePO.java
  35. 27 0
      core/src/main/java/com/mooctest/crowd/domain/model/UserTaskCountPO.java
  36. 1 0
      core/src/main/java/com/mooctest/crowd/domain/repository/ApplicationTypeRepo.java
  37. 95 43
      core/src/main/java/com/mooctest/crowd/domain/repository/CommonRepo.java
  38. 22 1
      core/src/main/java/com/mooctest/crowd/domain/repository/CrowdTestProjectRepo.java
  39. 12 3
      core/src/main/java/com/mooctest/crowd/domain/repository/CrowdTestTaskRepo.java
  40. 6 6
      core/src/main/java/com/mooctest/crowd/domain/repository/EvaluationAgencyRepo.java
  41. 2 1
      core/src/main/java/com/mooctest/crowd/domain/repository/ICrowdTaskRepo.java
  42. 2 0
      core/src/main/java/com/mooctest/crowd/domain/repository/IEvaluationAgencyRepo.java
  43. 11 0
      core/src/main/java/com/mooctest/crowd/domain/repository/IUserRepo.java
  44. 170 65
      core/src/main/java/com/mooctest/crowd/domain/repository/UserRepo.java
  45. 416 0
      core/src/main/java/com/mooctest/crowd/domain/util/MD5Base64Util.java
  46. 1 1
      core/src/test/java/com/mooctest/crowd/domain/domainobject/UserTest.java
  47. 0 1
      site/pom.xml
  48. 2 1
      site/src/main/java/com/mooctest/crowd/site/SiteApplication.java
  49. 43 11
      site/src/main/java/com/mooctest/crowd/site/command/ApplyAgencyAuthCommand.java
  50. 20 9
      site/src/main/java/com/mooctest/crowd/site/command/ApplyEnterpriseAuthCommand.java
  51. 25 16
      site/src/main/java/com/mooctest/crowd/site/command/ApplyPersonalAuthCommand.java
  52. 1 1
      site/src/main/java/com/mooctest/crowd/site/command/CrowdTestProjectCommand.java
  53. 2 0
      site/src/main/java/com/mooctest/crowd/site/command/CrowdTestTaskCommand.java
  54. 16 0
      site/src/main/java/com/mooctest/crowd/site/command/TestCommand.java
  55. 6 0
      site/src/main/java/com/mooctest/crowd/site/constants/CommonConstant.java
  56. 23 14
      site/src/main/java/com/mooctest/crowd/site/controller/AgencyController.java
  57. 0 0
      site/src/main/java/com/mooctest/crowd/site/controller/CommonController.java
  58. 17 19
      site/src/main/java/com/mooctest/crowd/site/controller/CrowTestSquareController.java
  59. 13 5
      site/src/main/java/com/mooctest/crowd/site/controller/CrowdProjectController.java
  60. 4 4
      site/src/main/java/com/mooctest/crowd/site/controller/CrowdTaskController.java
  61. 10 1
      site/src/main/java/com/mooctest/crowd/site/controller/PersonalDataController.java
  62. 1 1
      site/src/main/java/com/mooctest/crowd/site/controller/TechnicalArticlesController.java
  63. 26 23
      site/src/main/java/com/mooctest/crowd/site/controller/UserController.java
  64. 7 1
      site/src/main/java/com/mooctest/crowd/site/controller/advice/ExceptionAdvice.java
  65. 2 0
      site/src/main/java/com/mooctest/crowd/site/data/dto/BankCardDTO.java
  66. 0 23
      site/src/main/java/com/mooctest/crowd/site/data/dto/CrowdTestSquareIndexDTO.java
  67. 16 0
      site/src/main/java/com/mooctest/crowd/site/data/dto/DataDTO.java
  68. 2 2
      site/src/main/java/com/mooctest/crowd/site/data/dto/IndexDTO.java
  69. 2 2
      site/src/main/java/com/mooctest/crowd/site/data/dto/IndexInfoDTO.java
  70. 1 1
      site/src/main/java/com/mooctest/crowd/site/data/dto/MyCrowdDTO.java
  71. 0 1
      site/src/main/java/com/mooctest/crowd/site/data/dto/QualificationDTO.java
  72. 20 0
      site/src/main/java/com/mooctest/crowd/site/data/dto/UserDataDTO.java
  73. 7 5
      site/src/main/java/com/mooctest/crowd/site/data/enums/RoleType.java
  74. 34 0
      site/src/main/java/com/mooctest/crowd/site/data/vo/AgencyDetailVO.java
  75. 16 1
      site/src/main/java/com/mooctest/crowd/site/data/vo/AgencyVO.java
  76. 4 2
      site/src/main/java/com/mooctest/crowd/site/data/vo/ApplicationTypeVO.java
  77. 0 1
      site/src/main/java/com/mooctest/crowd/site/data/vo/BankCardVO.java
  78. 1 7
      site/src/main/java/com/mooctest/crowd/site/data/vo/BankLogoVO.java
  79. 26 0
      site/src/main/java/com/mooctest/crowd/site/data/vo/CrowdProjectDataVO.java
  80. 2 1
      site/src/main/java/com/mooctest/crowd/site/data/vo/CrowdProjectVO.java
  81. 3 0
      site/src/main/java/com/mooctest/crowd/site/data/vo/CrowdReportVO.java
  82. 0 2
      site/src/main/java/com/mooctest/crowd/site/data/vo/CrowdTestProjectVO.java
  83. 15 9
      site/src/main/java/com/mooctest/crowd/site/data/vo/EnterpriseAuthVO.java
  84. 73 0
      site/src/main/java/com/mooctest/crowd/site/data/vo/EvaluationAgencyVO.java
  85. 0 44
      site/src/main/java/com/mooctest/crowd/site/data/vo/EvolutionAgencyVO.java
  86. 2 0
      site/src/main/java/com/mooctest/crowd/site/data/vo/ExpertVO.java
  87. 2 0
      site/src/main/java/com/mooctest/crowd/site/data/vo/FieldVO.java
  88. 1 1
      site/src/main/java/com/mooctest/crowd/site/data/vo/FullStatusVO.java
  89. 16 13
      site/src/main/java/com/mooctest/crowd/site/data/vo/PersonalAuthVO.java
  90. 6 10
      site/src/main/java/com/mooctest/crowd/site/data/vo/ResidentAgencyVO.java
  91. 12 2
      site/src/main/java/com/mooctest/crowd/site/data/vo/ResourceVO.java
  92. 1 1
      site/src/main/java/com/mooctest/crowd/site/data/vo/StatusVO.java
  93. 2 0
      site/src/main/java/com/mooctest/crowd/site/data/vo/TestTypeVO.java
  94. 19 0
      site/src/main/java/com/mooctest/crowd/site/data/vo/UserTaskCountVO.java
  95. 4 7
      site/src/main/java/com/mooctest/crowd/site/data/vo/UserVO.java
  96. 46 25
      site/src/main/java/com/mooctest/crowd/site/mediator/ViewMediator.java
  97. 19 2
      site/src/main/java/com/mooctest/crowd/site/mediator/impl/OperationMediatorImpl.java
  98. 509 188
      site/src/main/java/com/mooctest/crowd/site/mediator/impl/WebMediatorImpl.java
  99. 7 4
      site/src/main/java/com/mooctest/crowd/site/service/AgencyService.java
  100. 11 0
      site/src/main/java/com/mooctest/crowd/site/service/AuthCheckService.java

+ 5 - 1
core/pom.xml

@@ -148,7 +148,11 @@
         <artifactId>fastjson</artifactId>
         <version>1.2.58</version>
     </dependency>
-
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.58</version>
+        </dependency>
 
 
     </dependencies>

+ 2 - 7
core/src/main/java/com/mooctest/crowd/domain/IpAddress/AddressUtils.java

@@ -188,13 +188,8 @@ public class AddressUtils {
         log.info("返回数据================="+returnStr);
         JSONObject jsonObject = JSONObject.parseObject(returnStr);
         String  address=jsonObject.getString("addr");
-        Area  area=new Area(jsonObject.getString("pro"),jsonObject.getString("city"));
-        return  area;
-
-
-
-
-
+        Area area=new Area(jsonObject.getString("pro"),jsonObject.getString("city"));
+        return area;
     }
 
     // 这里我们举的例子是获取所在地省份名称,也可以改变上边getAddress的返回值,获取具体的市县名

+ 5 - 7
core/src/main/java/com/mooctest/crowd/domain/IpAddress/Area.java

@@ -11,14 +11,12 @@ import lombok.Data;
 @Data
 public class Area {
 
-    private  String pro;//省
-    private  String city;
+    private String pro;//省
+    private String city;
 
-
-
-    public  Area(String pro,String city){
-        this.pro=pro;
-        this.city=city;
+    public Area(String pro, String city) {
+        this.pro = pro;
+        this.city = city;
     }
 
 }

+ 1 - 0
core/src/main/java/com/mooctest/crowd/domain/command/CrowdTestTaskCommand.java

@@ -13,6 +13,7 @@ public class CrowdTestTaskCommand {
     private Long crowdTestProjectId;
     private Long evaluationAgencyId;
     private String type;
+    private String resource; // 可见性 0-定向 2-广场
     private String description;
     private String requirementFile;
     private Double price;

ファイルの差分が大きいため隠しています
+ 0 - 0
core/src/main/java/com/mooctest/crowd/domain/controller/TestUserController.java


+ 6 - 0
core/src/main/java/com/mooctest/crowd/domain/dao/BankLogoDao.java

@@ -1,13 +1,19 @@
 package com.mooctest.crowd.domain.dao;
 
 import com.mooctest.crowd.domain.model.BankLogoPO;
+import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.CrudRepository;
 
 import javax.transaction.Transactional;
+import java.util.List;
 import java.util.Optional;
 
 @Transactional
 public interface BankLogoDao extends CrudRepository<BankLogoPO, Long>{
 
     Optional<BankLogoPO> findByCode(String code);
+
+    List<BankLogoPO> findAll();
+
+    Optional<BankLogoPO> findByName(String name);
 }

+ 20 - 12
core/src/main/java/com/mooctest/crowd/domain/dao/CrowdTestProjectDao.java

@@ -3,14 +3,14 @@ package com.mooctest.crowd.domain.dao;
 import com.mooctest.crowd.domain.model.CrowdTestProjectPO;
 import com.mooctest.crowd.domain.model.RankInfo;
 import com.mooctest.crowd.domain.model.RankInfos;
-import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
-import org.springframework.data.jpa.domain.Specification;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.CrudRepository;
 import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.data.repository.query.Param;
 
 import javax.transaction.Transactional;
 import java.util.List;
@@ -25,22 +25,26 @@ public interface CrowdTestProjectDao extends CrudRepository<CrowdTestProjectPO,
     //    @Override
 //    Optional<CrowdTestProjectPO> findById(Long id);
 
-    List<CrowdTestProjectPO> findByNameLike(String name);
+    List<CrowdTestProjectPO> findByNameLikeAndIsDeleted(String name, int isDeleted);
 
-    @Query(value = "SELECT CTP_ID,CTP_CODE,CTP_NAME," +
-            "CTP_U_ID,CTP_RM_ID,CTP_PDT_ID,CTP_FIELD_TYPE,CTP_PLATFORM,CTP_TYPE,CTP_LINK_MAN," +
-            "CTP_Link_MAN_MOBILE,CTP_TYPE,CTP_DESCRIPTION,CTP_PROJECT_FILE,CTP_REQUIREMENT_FILE,CTP_DISTRIBUTION_TYPE,CTP_DISTRIBUTION_PROVINCE,CTP_DISTRIBUTION_CITY," +
-            "CTP_QUOTED_PRICE,CTP_REST_PRICE,CTP_FIXED_PRICE,CTP_STATUS,CTP_DEAD_LINE,CTP_END_TIME,CTP_IS_DELETED,CTP_JOIN_COUNT,CTP_CREATE_TIME FROM crowd_test_project ORDER BY CTP_CREATE_TIME DESC", nativeQuery = true)
+    @Query(value = "SELECT * FROM crowd_test_project where CTP_IS_DELETED = 0 ORDER BY CTP_CREATE_TIME DESC", nativeQuery = true)
     List<CrowdTestProjectPO> findMoreHotProjects();
 
 
-    @Query(value = "SELECT CTP_ID,CTP_CODE,CTP_NAME," +
-            "CTP_U_ID,CTP_RM_ID,CTP_PDT_ID,CTP_FIELD_TYPE,CTP_PLATFORM,CTP_TYPE,CTP_LINK_MAN," +
-            "CTP_Link_MAN_MOBILE,CTP_TYPE,CTP_DESCRIPTION,CTP_PROJECT_FILE,CTP_REQUIREMENT_FILE,CTP_DISTRIBUTION_TYPE,CTP_DISTRIBUTION_PROVINCE,CTP_DISTRIBUTION_CITY," +
-            "CTP_QUOTED_PRICE,CTP_REST_PRICE,CTP_FIXED_PRICE,CTP_STATUS,CTP_DEAD_LINE,CTP_END_TIME,CTP_IS_DELETED,CTP_JOIN_COUNT,CTP_CREATE_TIME FROM crowd_test_project p WHERE CTP_STATUS !=4 ORDER BY CTP_CREATE_TIME DESC", nativeQuery = true)
+    @Query(value = "SELECT * FROM crowd_test_project p WHERE CTP_STATUS = 1 and CTP_PDT_ID = 2 and CTP_IS_DELETED = 0 ORDER BY CTP_CREATE_TIME DESC", nativeQuery = true)
     List<CrowdTestProjectPO> findAll();
 
-    Page<CrowdTestProjectPO> findAll(Specification<CrowdTestProjectPO> spec, Pageable pageable);
+    //这个指定了查询条数 适用于众测广场首页 这样性能会高一点。
+    @Query(value = "SELECT * FROM crowd_test_project p WHERE CTP_STATUS =1 and CTP_PDT_ID = 2 and CTP_IS_DELETED = 0 ORDER BY CTP_JOIN_COUNT DESC ,CTP_CREATE_TIME LIMIT 6; ", nativeQuery = true)
+    List<CrowdTestProjectPO> findindexProject();
+
+
+    @Query(value = "SELECT * FROM crowd_test_project p WHERE CTP_STATUS !=4 and CTP_STATUS !=5 and CTP_IS_DELETED = 0 ORDER BY CTP_JOIN_COUNT DESC ,CTP_CREATE_TIME; ", nativeQuery = true)
+    List<CrowdTestProjectPO> findAllHotProject();
+
+    //这个指定了查询条数 适用于众测广场首页 这样性能会高一点对应热门项目
+    @Query(value = "SELECT * FROM crowd_test_project p WHERE CTP_STATUS !=4 and CTP_STATUS !=5 and CTP_IS_DELETED = 0 ORDER BY CTP_JOIN_COUNT DESC ,CTP_CREATE_TIME LIMIT 7; ", nativeQuery = true)
+    List<CrowdTestProjectPO> findall();
 
     CrowdTestProjectPO findByIdAndIsDeleted(Long id, int isDeleted);
 
@@ -75,4 +79,8 @@ public interface CrowdTestProjectDao extends CrudRepository<CrowdTestProjectPO,
     @Override
     <S extends CrowdTestProjectPO> S save(S s);
 
+
+    @Modifying
+    @Query(nativeQuery = true,value="update crowd_test_project set CTP_STATUS= ?1 where CTP_CODE=?2")
+    void updateStatusById(@Param("status") int status, @Param("code") String code);
 }

+ 24 - 13
core/src/main/java/com/mooctest/crowd/domain/dao/CrowdTestTaskDao.java

@@ -5,9 +5,12 @@ import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.CrudRepository;
 import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.data.repository.query.Param;
+
 import javax.transaction.Transactional;
 import java.util.List;
 
@@ -20,23 +23,29 @@ import java.util.List;
 public interface CrowdTestTaskDao extends CrudRepository<CrowdTestTaskPO, Long>, JpaRepository<CrowdTestTaskPO, Long>, PagingAndSortingRepository<CrowdTestTaskPO, Long> {
 
 
- @Query(value = "select CTT_ID,CTT_CODE,CTT_NAME,CTT_CTP_CODE,CTT_EA_ID," +
-         "CTT_TYPE,CTT_DISTRIBUTION_TYPE,CTT_DISTRIBUTION_PROVINCE,CTT_DISTRIBUTION_CITY," +
-         "CTT_REQUIREMENT_FILE,CTT_DESCRIPTION,CTT_QUOTED_PRICE,CTT_FIXED_PRICE," +
-         "CTT_STATUS,CTT_FULL_STATUS,CTT_DEAD_LINE,CTT_IS_DELETED,CTT_PARTICIPANT_COUNT,CTT_ACCEPTED_COUNT,CTT_PARTICIPANT_HAS_COMMITTED_COUNT,CTT_CREATE_TIME,CTT_END_TIME FROM  crowd_test_task t where CTT_STATUS=1 or CTT_STATUS=2 ORDER BY CTT_CREATE_TIME DESC",nativeQuery = true)
-  List<CrowdTestTaskPO> findAll();
+    @Query(value = "select CTT_ID,CTT_CODE,CTT_NAME,CTT_CTP_CODE,CTT_EA_ID," +
+            "CTT_TYPE,CTT_DISTRIBUTION_TYPE,CTT_DISTRIBUTION_PROVINCE,CTT_DISTRIBUTION_CITY," +
+            "CTT_REQUIREMENT_FILE,CTT_DESCRIPTION,CTT_QUOTED_PRICE,CTT_FIXED_PRICE," +
+            "CTT_STATUS,CTT_FULL_STATUS,CTT_DEAD_LINE,CTT_IS_DELETED,CTT_PARTICIPANT_COUNT,CTT_ACCEPTED_COUNT,CTT_PARTICIPANT_HAS_COMMITTED_COUNT,CTT_CREATE_TIME,CTT_END_TIME FROM  crowd_test_task t where CTT_STATUS=1 or CTT_STATUS=2  and CTT_IS_DELETED = 0 ORDER BY CTT_CREATE_TIME DESC", nativeQuery = true)
+    List<CrowdTestTaskPO> findAll();
 
+    @Query(value = "select * FROM crowd_test_task WHERE (CTT_STATUS =1 or (CTT_STATUS =2 and CTT_FULL_STATUS = 0)) and CTT_DISTRIBUTION_TYPE = 2 and CTT_IS_DELETED = 0  ORDER BY CTT_CREATE_TIME DESC LIMIT 6 ", nativeQuery = true)
+    List<CrowdTestTaskPO> findindexTask();
 
 
+    //热门任务
+    @Query(value = "select * FROM crowd_test_task WHERE (CTT_STATUS =1 or (CTT_STATUS =2 and CTT_FULL_STATUS = 0)) and CTT_DISTRIBUTION_TYPE = 2 and CTT_IS_DELETED = 0 ORDER BY CTT_ACCEPTED_COUNT DESC,CTT_CREATE_TIME", nativeQuery = true)
+    List<CrowdTestTaskPO> findCanAcceptTask();
 
+    //热门任务
+    @Query(value = "select * FROM  crowd_test_task WHERE CTT_STATUS !=4 and CTT_STATUS !=5 and CTT_IS_DELETED = 0  ORDER BY CTT_ACCEPTED_COUNT DESC,CTT_CREATE_TIME DESC LIMIT 7", nativeQuery = true)
+    List<CrowdTestTaskPO> findMoreHotTasks();
 
- @Query(value = "select CTT_ID,CTT_CODE,CTT_NAME,CTT_CTP_CODE,CTT_EA_ID," +
-         "CTT_TYPE,CTT_DISTRIBUTION_TYPE,CTT_DISTRIBUTION_PROVINCE,CTT_DISTRIBUTION_CITY," +
-         "CTT_REQUIREMENT_FILE,CTT_DESCRIPTION,CTT_QUOTED_PRICE,CTT_FIXED_PRICE," +
-         "CTT_STATUS,CTT_FULL_STATUS,CTT_DEAD_LINE,CTT_IS_DELETED,CTT_PARTICIPANT_COUNT,CTT_ACCEPTED_COUNT,CTT_PARTICIPANT_HAS_COMMITTED_COUNT,CTT_CREATE_TIME,CTT_END_TIME FROM  crowd_test_task t ORDER BY CTT_CREATE_TIME DESC",nativeQuery = true)
-   List<CrowdTestTaskPO> findMoreHotTasks();
+    //热门任务
+    @Query(value = "select * FROM  crowd_test_task WHERE CTT_STATUS !=4 and CTT_STATUS !=5 and CTT_IS_DELETED = 0  ORDER BY CTT_ACCEPTED_COUNT DESC,CTT_CREATE_TIME", nativeQuery = true)
+    List<CrowdTestTaskPO> findMoreHotTasksList();
 
-   List<CrowdTestTaskPO>  findByNameLike(String name);
+    List<CrowdTestTaskPO> findByNameLike(String name);
 
     Page<CrowdTestTaskPO> findAll(Specification specification, Pageable pageable);
 
@@ -53,7 +62,7 @@ public interface CrowdTestTaskDao extends CrudRepository<CrowdTestTaskPO, Long>,
 //    @Query(value = "SELECT new com.mooctest.crowd.domain.model.RankInfo(SUM(p.quotedPrice), p.evaluationAgencyId) FROM CrowdTestTaskPO p where p.evaluationAgencyId is not null and p.status>1 GROUP BY p.evaluationAgencyId ORDER BY SUM(p.quotedPrice) DESC")
 //    List<RankInfo> findTotalPriceOfAgency(Pageable pageable);
 
-    @Query(nativeQuery = true, value = "select * from crowd_test_task where CTT_STATUS=1 and CTT_DISTRIBUTION_TYPE=2 order by CTT_QUOTED_PRICE DESC LIMIT 4")
+    @Query(nativeQuery = true, value = "select * from crowd_test_task where CTT_STATUS=1 and CTT_DISTRIBUTION_TYPE=2 and CTT_IS_DELETED = 0  order by CTT_QUOTED_PRICE DESC LIMIT 4")
     List<CrowdTestTaskPO> findHotTask();
 
     @Override
@@ -65,5 +74,7 @@ public interface CrowdTestTaskDao extends CrudRepository<CrowdTestTaskPO, Long>,
     @Override
     <S extends CrowdTestTaskPO> S save(S s);
 
-
+    @Modifying
+    @Query(nativeQuery = true, value = "update crowd_test_task set CTT_STATUS= ?1 where CTT_CODE=?2")
+    void updateStatusById(@Param("status") int status, @Param("code") String code);
 }

+ 1 - 0
core/src/main/java/com/mooctest/crowd/domain/dao/UserDao.java

@@ -6,6 +6,7 @@ import org.springframework.data.repository.CrudRepository;
 import org.springframework.data.repository.PagingAndSortingRepository;
 
 import javax.transaction.Transactional;
+import java.util.List;
 import java.util.Optional;
 
 @Transactional

+ 31 - 0
core/src/main/java/com/mooctest/crowd/domain/dao/UserTaskCountDao.java

@@ -0,0 +1,31 @@
+package com.mooctest.crowd.domain.dao;
+
+import com.mooctest.crowd.domain.model.UserTaskCountPO;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.repository.query.Param;
+
+import javax.transaction.Transactional;
+import java.util.List;
+import java.util.Optional;
+
+@Transactional
+public interface UserTaskCountDao extends CrudRepository<UserTaskCountPO, Long>, JpaSpecificationExecutor<UserTaskCountPO> {
+
+    Optional<UserTaskCountPO> findByUserId(Long userId);
+
+    List<UserTaskCountPO> findByType(Long type);
+
+    Optional<UserTaskCountPO> findById(Long id);
+
+    List<UserTaskCountPO> findAll();
+
+    @Modifying
+    @Query(nativeQuery = true,value="UPDATE user_task_count SET UTC_COUNT=?1 WHERE UTC_USER_ID=?2")
+    void updateCount(@Param("userId") long userId,@Param("count") long count);
+
+    @Override
+    <S extends UserTaskCountPO> S save(S s);
+}

+ 1 - 0
core/src/main/java/com/mooctest/crowd/domain/domainobject/ApplicationType.java

@@ -15,5 +15,6 @@ public class ApplicationType {
     private String name;
     private String image;
     private List<TestType> testTypeList;
+    private String introduction;
     private Long count;
 }

+ 17 - 0
core/src/main/java/com/mooctest/crowd/domain/domainobject/CrowdTestProject.java

@@ -2,7 +2,10 @@ package com.mooctest.crowd.domain.domainobject;
 
 import com.google.gson.Gson;
 import com.mooctest.crowd.domain.exception.*;
+import com.mooctest.crowd.domain.model.CrowdTestProjectPO;
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
 import java.sql.Timestamp;
 import java.util.ArrayList;
@@ -14,7 +17,16 @@ import java.util.Optional;
  * @date 2019/7/6 18:27
  */
 @Data
+@NoArgsConstructor
+@AllArgsConstructor
 public class CrowdTestProject {
+    public static final int HAS_REJECTED = -1; //项目被拒
+    public static final int HAS_CREATED = 0;  //创建项目
+    public static final int HAS_RELEASED = 1; //发布项目
+    public static final int HAS_RECEIVED = 2; //接收项目
+    public static final int HAS_COMMITED = 3; //提交项目
+    public static final int HAS_FINISHED = 4; //结束项目
+    public static final int HAS_TIME_OUT = 5; //时间截止
     private Long id;
     private String name;
     private String code;
@@ -51,6 +63,11 @@ public class CrowdTestProject {
 //        return crowdTestProject;
 //    }
 
+    public CrowdTestProject(CrowdTestProjectPO crowdTestProjectPO){
+        this.code = crowdTestProjectPO.getCode();
+        this.name = crowdTestProjectPO.getName();
+    }
+
     /**
      * 更新项目信息
      *

+ 1 - 0
core/src/main/java/com/mooctest/crowd/domain/domainobject/CrowdTestReport.java

@@ -25,6 +25,7 @@ public class CrowdTestReport {
     private String conclusion;
     private int isDeleted;
     private Timestamp createTime;
+    private boolean Updated;//是否能被修改
 
     @Override
     public String toString() {

+ 43 - 32
core/src/main/java/com/mooctest/crowd/domain/domainobject/CrowdTestTask.java

@@ -1,7 +1,6 @@
 package com.mooctest.crowd.domain.domainobject;
 
 import com.mooctest.crowd.domain.exception.CrowdTestTaskException;
-import com.mooctest.crowd.domain.exception.UnauthorizedException;
 import lombok.Data;
 
 import java.sql.Timestamp;
@@ -16,6 +15,13 @@ import java.util.stream.Collectors;
  */
 @Data
 public class CrowdTestTask {
+    public static final int HAS_REJECTED = -1;  //定向发布被拒
+    public static final int HAS_CREATED = 0;    //创建任务
+    public static final int HAS_RELEASED = 1;   //发布任务
+    public static final int HAS_RECEIVED = 2;   //接受任务
+    public static final int HAS_COMMITED = 3;   //区域管理员提交任务
+    public static final int HAS_FINISHED = 4;   //结束任务
+    public static final int HAS_TIME_OUT = 5; //时间截止
     private Long id;
     private String name;
     private String code;
@@ -80,20 +86,16 @@ public class CrowdTestTask {
 
     /**
      * 接收任务(测评机构)
+     *
      * @return
      */
     public void receive(User user) {
-        //判断是否为测评机构
-        EvaluationAgency evaluationAgency = user.getEvaluationAgency();
-        if(evaluationAgency == null){
-            throw new UnauthorizedException("当前用户不是测评机构,没有权限接收任务");
-        }
         //任务当前状态
-        if(this.getStatus() == CrowdTestTaskStatus.HAS_RECEIVED){
-            if(this.getFullStatus() == CrowdTestTaskAcceptStatus.HAS_FULL)
+        if (this.getStatus() == CrowdTestTaskStatus.HAS_RECEIVED) {
+            if (this.getFullStatus() == CrowdTestTaskAcceptStatus.HAS_FULL)
                 throw new CrowdTestTaskException("当前任务满员!:");
-        }else if (this.getStatus()!=CrowdTestTaskStatus.HAS_RELEASED)
-            throw new CrowdTestTaskException("任务当前状态不能被接收,当前状态为:"+this.getStatus());
+        } else if (this.getStatus() != CrowdTestTaskStatus.HAS_RELEASED && this.getStatus() != CrowdTestTaskStatus.HAS_REJECTED)
+            throw new CrowdTestTaskException("任务当前状态不能被接收,当前状态为:" + this.getStatus());
         //定向发布类型
 //        if (this.getDistributionType() == 0) {
 //            if (!this.getEvaluationAgencyId().equals(user.getId()))
@@ -102,7 +104,7 @@ public class CrowdTestTask {
 //        this.setEvaluationAgencyId(user.getId());
 
         // 判断人数是否满员
-        if (this.getAcceptedCount() >= this.getParticipantCount()){
+        if (this.getAcceptedCount() >= this.getParticipantCount()) {
             throw new CrowdTestTaskException("当前任务已经满员!");
         }
         // 新增接收者信息
@@ -114,41 +116,42 @@ public class CrowdTestTask {
 //        }else if(this.getDistributionType().equals(DistributeType.SQUARE.getId())){
 //            // 广场发布类型
 //        }
-        if (this.getDistributionType() == DistributeType.DIRECT.getId()){
+        if (this.getDistributionType() == DistributeType.DIRECT.getId()) {
             this.getAcceptedUserList().stream().map(taskToUser -> {
                 taskToUser.setIsAccepted(1);
                 taskToUser.setAcceptTime(new Timestamp(System.currentTimeMillis()));
                 return taskToUser;
             }).collect(Collectors.toList());
-        }else{
+        } else {
             TaskToUser taskToUser = new TaskToUser();
-            taskToUser.setValue(this.code, user.getId(), this.quotedPrice,0, this.getDistributionType(), 1, new Timestamp(System.currentTimeMillis()));
+            taskToUser.setValue(this.code, user.getId(), this.quotedPrice, 0, this.getDistributionType(), 1, new Timestamp(System.currentTimeMillis()));
             this.getAcceptedUserList().add(taskToUser);
         }
         this.setAcceptedUserList(acceptedUserList);
-        this.setAcceptedCount(this.acceptedCount+1);
-        if (this.getAcceptedCount() == this.getParticipantCount()){
+        this.setAcceptedCount(this.acceptedCount + 1);
+        if (this.getAcceptedCount() == this.getParticipantCount()) {
             this.setFullStatus(CrowdTestTaskAcceptStatus.HAS_FULL);
-        }else{
+        } else {
             this.setFullStatus(CrowdTestTaskAcceptStatus.NOT_FULL);
         }
         this.setStatus(CrowdTestTaskStatus.HAS_RECEIVED);
     }
 
 
-    public void reject(Long userId){
-        if (this.getDistributionType()!=0 || this.getStatus()!=CrowdTestTaskStatus.HAS_RELEASED || !this.getEvaluationAgencyId().equals(userId)){
+    public void reject(Long userId) {
+        if (this.getDistributionType() != 0 || this.getStatus() != CrowdTestTaskStatus.HAS_RELEASED || !this.getEvaluationAgencyId().equals(userId)) {
             throw new CrowdTestTaskException("非法操作!");
         }
         this.setStatus(CrowdTestTaskStatus.HAS_REJECTED);
     }
 
+
     public void removeCrowdTestTask() {
         this.isDeleted = DeletedStatus.isDeleted;
     }
 
     public void commitByRegionalManager() {
-        if (this.getStatus()!=CrowdTestTaskStatus.HAS_RECEIVED || this.getParticipantHasCommittedCount() < this.getAcceptedCount()){
+        if (this.getStatus() != CrowdTestTaskStatus.HAS_RECEIVED || this.getParticipantHasCommittedCount() < this.getAcceptedCount()) {
             throw new CrowdTestTaskException("当前状态不能提交任务");
         }
         this.setStatus(CrowdTestTaskStatus.HAS_COMMITED);
@@ -156,36 +159,36 @@ public class CrowdTestTask {
     }
 
     public void commitByAgency(String taskCode, Long userId) {
-        if (this.getStatus()!= CrowdTestTaskStatus.HAS_RECEIVED){
+        if (this.getStatus() != CrowdTestTaskStatus.HAS_RECEIVED) {
             throw new CrowdTestTaskException("当前状态不能提交任务");
         }
 
         Optional<TaskToUser> taskToUserOptional = this.getAcceptedUserList().stream().filter(taskToUser -> taskToUser.getTaskCode().equals(taskCode)
                 && taskToUser.getUserId().equals(userId) && taskToUser.getDistributionType().equals(this.distributionType)).findFirst();
-        if(!taskToUserOptional.isPresent()){
+        if (!taskToUserOptional.isPresent()) {
             throw new CrowdTestTaskException("当前用户无权对此任务进行操作");
-        }else{
+        } else {
             TaskToUser taskToUser = taskToUserOptional.get();
-            if (taskToUser.getIsAccepted() == 0){
+            if (taskToUser.getIsAccepted() == 0) {
                 throw new CrowdTestTaskException("当前用户未接受此任务");
-            }else if(taskToUser.getHasReport() == 0){
+            } else if (taskToUser.getHasReport() == 0) {
                 throw new CrowdTestTaskException("当前用户未提交报告");
-            }else{
+            } else {
                 taskToUser.setIsCommitted(1);
                 taskToUser.setCommitTaskTime(new Timestamp(System.currentTimeMillis()));
             }
         }
-        this.setParticipantHasCommittedCount(this.getParticipantHasCommittedCount()+1);
-        if(this.getParticipantCount() == this.getParticipantHasCommittedCount()){
+        this.setParticipantHasCommittedCount(this.getParticipantHasCommittedCount() + 1);
+        if (this.getParticipantCount() == this.getParticipantHasCommittedCount()) {
             this.setStatus(CrowdTestTaskStatus.HAS_COMMITED);
         }
     }
 
     public void confirmFinish() {
-        if ((this.getParticipantHasCommittedCount() == this.getAcceptedCount() && this.getStatus() == CrowdTestTaskStatus.HAS_RECEIVED)|| (this.getParticipantHasCommittedCount() == this.getParticipantCount() && this.getStatus() == CrowdTestTaskStatus.HAS_COMMITED)) {
+        if ((this.getParticipantHasCommittedCount() == this.getAcceptedCount() && this.getStatus() == CrowdTestTaskStatus.HAS_RECEIVED) || (this.getParticipantHasCommittedCount() == this.getParticipantCount() && this.getStatus() == CrowdTestTaskStatus.HAS_COMMITED)) {
             this.setStatus(CrowdTestTaskStatus.HAS_FINISHED);
             this.setEndTime(new Timestamp(System.currentTimeMillis()));
-        }else {
+        } else {
             throw new CrowdTestTaskException("评测机构未提请结束任务,无法确认结束!");
         }
 
@@ -194,10 +197,18 @@ public class CrowdTestTask {
     public void create(String taskCode) {
         this.setCode(taskCode);
         this.setStatus(CrowdTestTaskStatus.HAS_RELEASED);
-        if (this.getDistributionType() == DistributeType.DIRECT.getId()){
+        this.directTask();
+    }
+
+    public void update() {
+        this.directTask();
+    }
+
+    private void directTask(){
+        if (this.getDistributionType() == DistributeType.DIRECT.getId()) {
             this.setParticipantCount(1);
             TaskToUser taskToUser = new TaskToUser();
-            taskToUser.setValue(this.code, this.getEvaluationAgencyId(), this.quotedPrice,0, this.getDistributionType(), 0, null);
+            taskToUser.setValue(this.code, this.getEvaluationAgencyId(), this.quotedPrice, 0, this.getDistributionType(), 0, null);
             this.getAcceptedUserList().add(taskToUser);
             this.setAcceptedUserList(acceptedUserList);
         }

+ 12 - 24
core/src/main/java/com/mooctest/crowd/domain/domainobject/EnterpriseAuthentication.java

@@ -5,6 +5,7 @@ import com.mooctest.crowd.domain.model.EnterpriseAuthenticationPO;
 import lombok.Data;
 import org.springframework.beans.BeanUtils;
 
+import java.sql.Date;
 import java.sql.Timestamp;
 
 /**
@@ -13,46 +14,33 @@ import java.sql.Timestamp;
  */
 @Data
 public class EnterpriseAuthentication {
+    private String isDaOrEa;//是研发机构还是评测机构
+    private String enterpriseName;
     private Long id;
     private Long userId;
-    private String IDCardNum;//身份证号码
+    private String idCardNum;//身份证号码
     private String legalPersonName;
     private String businessLicensePhoto;
     private String unifiedSocialCreditCode;
-    private String sex;//2.0新加性别
-    private String IDcardPositivePhoto;//身份证正面照
-    private String IDCardBackPhoto;//身份证反面照
+    private String gender;//2.0新加性别
+    private String idCardPositivePhoto;//身份证正面照
+    private String idCardBackPhoto;//身份证反面照
+    private String address;
     private int isDeleted;
     private int isAuthentication;
     private String explain;
     private Timestamp applyTime;
     private Timestamp checkTime;
-    private Timestamp IDCardDeadTime;//身份证过期时间
+    private Date idCardDeadTime;//身份证过期时间
+    private String type;
 
-    @Override
-    public String toString() {
-        return "CompanyAuth{" +
-                "id=" + id +
-                ", userId=" + userId +
-                ", legalPersonName='" + legalPersonName + '\'' +
-                ", businessLicensePhoto='" + businessLicensePhoto + '\'' +
-                ", unifiedSocialCreditCode='" + unifiedSocialCreditCode + '\'' +
-                ", isDeleted=" + isDeleted +
-                ", isAuthentication=" + isAuthentication +
-                ", explain=" + explain +
-                ", applyTime='" + applyTime + '\'' +
-                ", checkTime='" + checkTime + '\'' +
-                '}';
-    }
 
     public EnterpriseAuthentication getByPo(EnterpriseAuthenticationPO enterpriseAuthenticationPO) {
         this.applyTime = enterpriseAuthenticationPO.getApplyTime();
         this.businessLicensePhoto = enterpriseAuthenticationPO.getBusinessLicensePhoto();
-
         this.legalPersonName = enterpriseAuthenticationPO.getLegalPersonName();
-
-         return this;
-
+        BeanUtils.copyProperties(enterpriseAuthenticationPO, this);
+        return this;
     }
 
 

+ 30 - 36
core/src/main/java/com/mooctest/crowd/domain/domainobject/EvaluationAgency.java

@@ -2,9 +2,12 @@ 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.Date;
 import java.sql.Timestamp;
 import java.util.List;
 
@@ -13,15 +16,25 @@ import java.util.List;
  * @date 2019/7/12 1:32
  */
 @Data
+@AllArgsConstructor
+@NoArgsConstructor
 public class EvaluationAgency {
-    private Long id;
-    private Long userId;
+
     private String evaluationAgencyName;
-    private String bankAccount;
+    private String businessLicensePhoto;
     private String address;
+    private String agencyPhoto;
+    private String legalPersonName;
+    private String IdCardNum;
+    private String gender;
+    private String idCardPositivePhoto;//身份证正面照
+    private String idCardBackPhoto;//身份证反面照
+    private Date idCardDeadTime;
+
+    private Long id;
+    private Long userId;
     private List<EvaluationAgencyAbility> evaluationAgencyAbilityList;
     private List<EvaluationAgencyResource> evaluationAgencyResourceList;
-    private String agencyPhoto;
     private int isAuthentication;
     private String explain;
     private int isDeleted;
@@ -29,46 +42,27 @@ public class EvaluationAgency {
     private Timestamp expireTime;
     private Timestamp checkTime;
     private Timestamp applyTime;
+    private String type;
 
-    @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() {
-
-    }
 
+//    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();
+        address = evaluationAgencyPO.getAddress();
+        updateTime = evaluationAgencyPO.getUpdateTime();
+        expireTime = evaluationAgencyPO.getExpireTime();
+        checkTime = evaluationAgencyPO.getCheckTime();
+        applyTime = evaluationAgencyPO.getApplyTime();
         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);

+ 1 - 1
core/src/main/java/com/mooctest/crowd/domain/domainobject/Expert.java

@@ -12,5 +12,5 @@ public class Expert {
     private String name;
     private String photo;
     private String introduction;
-
+    private String title;
 }

+ 1 - 0
core/src/main/java/com/mooctest/crowd/domain/domainobject/Field.java

@@ -11,4 +11,5 @@ public class Field {
     private Long id;
     private String code;
     private String name;
+    private String introduction;
 }

+ 29 - 28
core/src/main/java/com/mooctest/crowd/domain/domainobject/PersonalAuthentication.java

@@ -5,6 +5,7 @@ import com.mooctest.crowd.domain.model.PersonalAuthenticationPO;
 import lombok.Data;
 import org.springframework.beans.BeanUtils;
 
+import java.sql.Date;
 import java.sql.Timestamp;
 
 /**
@@ -12,43 +13,43 @@ import java.sql.Timestamp;
  * @date 2019-08-19 15:47
  */
 @Data
-public class PersonalAuthentication{
-
+public class PersonalAuthentication {
     private Long id;
     private Long userId;
     private String realName;
-    private String IDCard;
-    private String IDCardPositivePhoto;//身份证正面照片
-    private String IDCardBackPhoto;//身份证反面照片
-    private String sex;
-    private String bankAccount;
+    private String idCard;
+    private String idCardPhoto;
+    private String idCardPositivePhoto;//身份证正面照片
+    private String idCardBackPhoto;//身份证反面照片
+    private String gender;
     private String address;
     private int isDeleted;
     private int isAuthentication;
     private String explain;
     private Timestamp applyTime;
     private Timestamp checkTime;
-    private Timestamp IDCardDeadTime;//身份证过期时间
+    private Date idCardDeadTime;//身份证过期时间
+    private String type;
 
     /**
      * 转换类型
+     *
      * @param authenticationPO
      * @return
      */
-
-    public  PersonalAuthentication  getByPo(PersonalAuthenticationPO authenticationPO){
-          this.realName=authenticationPO.getRealName();
-          this.address=authenticationPO.getAddress();
-          this.applyTime=authenticationPO.getApplyTime();
-          this.IDCard=authenticationPO.getIDCard();
-          this.IDCardBackPhoto=authenticationPO.getIDCardPhoto();
-          return this;
+    public PersonalAuthentication getByPo(PersonalAuthenticationPO authenticationPO) {
+        BeanUtils.copyProperties(authenticationPO, this);
+        return this;
+//        this.realName = authenticationPO.getRealName();
+//        this.address = authenticationPO.getAddress();
+//        this.applyTime = authenticationPO.getApplyTime();
+//        this.idCard = authenticationPO.getidCard();
+//        this.idCardBackPhoto = authenticationPO.getidCardPhoto();
+//        this.type = authenticationPO.getType();
 
     }
 
-
-
-    public PersonalAuthentication applyAuthentication(Long userId){
+    public PersonalAuthentication applyAuthentication(Long userId) {
         this.setUserId(userId);
         this.setIsAuthentication(AuthenticationStatus.isAuthenIng);
         this.setIsDeleted(DeletedStatus.isNotDeleted);
@@ -59,11 +60,11 @@ public class PersonalAuthentication{
     }
 
     public PersonalAuthentication passAuthentication() {
-        if(this.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated){
+        if (this.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated) {
             throw new BaseException("当前是未通过认证状态,不可通过认证,需对认证信息进行修改后再提交认证申请");
-        }else if(this.getIsAuthentication() == AuthenticationStatus.isAuthenticated){
+        } else if (this.getIsAuthentication() == AuthenticationStatus.isAuthenticated) {
             throw new BaseException("当前已通过认证,请勿重复操作");
-        }else{
+        } else {
             this.setIsAuthentication(AuthenticationStatus.isAuthenticated);
             this.setCheckTime(new Timestamp(System.currentTimeMillis()));
             this.setExplain("");
@@ -73,14 +74,14 @@ public class PersonalAuthentication{
     }
 
     public PersonalAuthentication rejectAuthentication(String explain) {
-        if(this.getIsDeleted() == DeletedStatus.isDeleted){
+        if (this.getIsDeleted() == DeletedStatus.isDeleted) {
             throw new BaseException("当前认证信息已被删除,不可做认证状态改变操作");
-        }else {
-            if(this.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated){
+        } else {
+            if (this.getIsAuthentication() == AuthenticationStatus.isNotAuthenticated) {
                 throw new BaseException("当前已是未通过认证状态,不可再次拒绝认证");
-            }else if(this.getIsAuthentication() == AuthenticationStatus.isAuthenticated){
+            } else if (this.getIsAuthentication() == AuthenticationStatus.isAuthenticated) {
                 throw new BaseException("当前已通过认证,不可拒绝认证");
-            }else {
+            } else {
                 this.setIsAuthentication(AuthenticationStatus.isNotAuthenticated);
                 this.setExplain(explain);
                 this.setCheckTime(new Timestamp(System.currentTimeMillis()));
@@ -92,7 +93,7 @@ public class PersonalAuthentication{
     public PersonalAuthentication updateAuthInfo(PersonalAuthentication modifyAuth) {
         modifyAuth.userId = this.userId;
         modifyAuth.id = this.id;
-        BeanUtils.copyProperties(modifyAuth,this);
+        BeanUtils.copyProperties(modifyAuth, this);
         this.setIsAuthentication(AuthenticationStatus.isAuthenIng);
         this.setIsDeleted(DeletedStatus.isNotDeleted);
         this.setApplyTime(new Timestamp(System.currentTimeMillis()));

+ 1 - 1
core/src/main/java/com/mooctest/crowd/domain/domainobject/ResourceStatus.java

@@ -5,5 +5,5 @@ public class ResourceStatus {
     public static final int R_FREE = 0;  //空闲
     public static final int R_OCCUPY = 1; //占用
     public static final int R_USABLE = 2; //可用
-    public static final int R_FAULT = 4; //故障
+    public static final int R_FAULT = 3; //故障
 }

+ 1 - 0
core/src/main/java/com/mooctest/crowd/domain/domainobject/TestType.java

@@ -11,4 +11,5 @@ public class TestType {
     private Long id;
     private String code;
     private String name;
+    private String introduction;
 }

+ 10 - 4
core/src/main/java/com/mooctest/crowd/domain/domainobject/User.java

@@ -3,11 +3,10 @@ package com.mooctest.crowd.domain.domainobject;
 import com.mooctest.crowd.domain.exception.BaseException;
 import com.mooctest.crowd.domain.exception.SystemAdministratorException;
 import com.mooctest.crowd.domain.model.UserPO;
-import lombok.AllArgsConstructor;
 import lombok.Data;
-import lombok.NoArgsConstructor;
 import org.springframework.beans.BeanUtils;
 
+import java.sql.Date;
 import java.sql.Timestamp;
 import java.util.List;
 
@@ -31,13 +30,20 @@ public class User {
     private int isAvailable;
     private int isDeleted;
     private Timestamp createTime;
+    private Date birthday;
+    private String personalCompetence;
+    private String unit;
+    private String county;
+    private List<Role> roleList;
+    private List<String> personAbilities;
+
+
 
     private RegionalManager regionalManager;
     private EvaluationAgency evaluationAgency;
     private PersonalAuthentication personalAuthentication;
     private EnterpriseAuthentication enterpriseAuthentication;
     private SystemAdministratorToUser systemAdministratorToUser;
-    private List<Role> roleList;
 
 
     public User() {
@@ -81,7 +87,7 @@ public class User {
      * @return
      */
     public User applyAgencyAuthentication(EvaluationAgency evaluationAgency) {
-        if (this.getPersonalAuthentication()!=null || this.getEnterpriseAuthentication()!=null || this.getPersonalAuthentication() != null)
+        if (this.getPersonalAuthentication()!=null || this.getEnterpriseAuthentication()!=null)
             throw new BaseException("已有认证信息,不可再次认证");
         this.setEvaluationAgency(evaluationAgency.applyAuthentication(this.id));
         return this;

+ 25 - 0
core/src/main/java/com/mooctest/crowd/domain/domainobject/UserTaskCount.java

@@ -0,0 +1,25 @@
+package com.mooctest.crowd.domain.domainobject;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author guochao
+ * @date 2019/7/6 17:54
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class UserTaskCount {
+    private Long id;
+    private Long userId;
+    private Long count;
+    private Long type;
+
+    public UserTaskCount(Long userId, Long count, Long type) {
+        this.userId = userId;
+        this.count = count;
+        this.type = type;
+    }
+}

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

@@ -0,0 +1,14 @@
+package com.mooctest.crowd.domain.exception;
+
+import lombok.NoArgsConstructor;
+
+/**
+ * @author guochao
+ * @date 2019-07-30 09:15
+ */
+@NoArgsConstructor
+public class HaveNotAgencyAuthException extends BaseException {
+    public HaveNotAgencyAuthException(String msg){
+        super(msg);
+    }
+}

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

@@ -0,0 +1,14 @@
+package com.mooctest.crowd.domain.exception;
+
+import lombok.NoArgsConstructor;
+
+/**
+ * @author guochao
+ * @date 2019-07-30 09:15
+ */
+@NoArgsConstructor
+public class HaveNotPartAuthException extends BaseException {
+    public HaveNotPartAuthException(String msg){
+        super(msg);
+    }
+}

+ 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);
+    }
+}

+ 3 - 0
core/src/main/java/com/mooctest/crowd/domain/model/ApplicationTypePO.java

@@ -25,6 +25,9 @@ public class ApplicationTypePO {
     @Column(name = "AT_IMAGE")
     private String image;
 
+    @Column(name="AT_INTRODUCTION")
+    private String introduction;
+
     @Column(name="AT_COUNT")
     private Long count;
 }

+ 22 - 14
core/src/main/java/com/mooctest/crowd/domain/model/EnterpriseAuthenticationPO.java

@@ -11,49 +11,57 @@ import java.sql.Timestamp;
  */
 @Data
 @Entity
-@Table(name = "enterprise_authentication")
+@Table(name = "develop_authentication")
 public class EnterpriseAuthenticationPO {
 
     @Id
-    @Column(name = "EA_ID")
+    @Column(name = "DA_ID")
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     private Long id;
 
-    @Column(name = "EA_USER_ID")
+    @Column(name = "DA_USER_ID")
     private Long userId;
 
-    @Column(name = "EA_ENTERPRISE_NAME")
+    @Column(name = "DA_NAME")
     private String enterpriseName;
 
-    @Column(name = "EA_LEGAL_PERSON_NAME")
+    @Column(name = "DA_LEGAL_PERSON_NAME")
     private String legalPersonName;
 
-    @Column(name = "EA_BUSINESS_LICENSE_PHOTO")
+    @Column(name = "DA_BUSINESS_LICENSE_PHOTO")
     private String businessLicensePhoto;
 
-    @Column(name = "EA_UNIFIED_SOCIAL_CREDIT_CODE")
+    @Column(name = "DA_UNIFIED_SOCIAL_CREDIT_CODE")
     private String unifiedSocialCreditCode;
 
-    @Column(name = "EA_BANK_ACCOUNT")
+    @Column(name = "DA_BANK_ACCOUNT")
     private String bankAccount;
 
-    @Column(name = "EA_ADDRESS")
+    @Column(name = "DA_ADDRESS")
     private String address;
 
-    @Column(name = "EA_IS_DELETED")
+    @Column(name = "DA_IS_DELETED")
     private int isDeleted;
 
-    @Column(name = "EA_IS_AUTHENTICATION")
+    @Column(name = "DA_IS_AUTHENTICATION")
     private int isAuthentication;
 
-    @Column(name = "EA_NOT_PASS_EXPLAIN")
+    @Column(name = "DA_NOT_PASS_EXPLAIN")
     private String explain;
 
-    @Column(name = "EA_CHECK_TIME")
+    @Column(name = "DA_CHECK_TIME")
     private Timestamp checkTime;
 
-    @Column(name = "EA_APPLY_TIME")
+    @Column(name = "DA_APPLY_TIME")
     private Timestamp applyTime;
 
+    @Column(name = "DA_ID_CARD_BACK_PHOTO")
+    private String idCardBackPhoto;
+
+    @Column(name = "DA_ID_CARD_POS_PHOTO")
+    private String idCardPositivePhoto;
+
+    @Column(name = "DA_TYPE")
+    private String type;
 
 }

+ 26 - 1
core/src/main/java/com/mooctest/crowd/domain/model/EvaluationAgencyPO.java

@@ -3,6 +3,7 @@ package com.mooctest.crowd.domain.model;
 import lombok.Data;
 
 import javax.persistence.*;
+import java.sql.Date;
 import java.sql.Timestamp;
 
 /**
@@ -11,7 +12,7 @@ import java.sql.Timestamp;
  */
 @Data
 @Entity(name = "evaluation_agency")
-public class EvaluationAgencyPO{
+public class EvaluationAgencyPO {
 
     @Id
     @Column(name = "EA_ID")
@@ -33,6 +34,30 @@ public class EvaluationAgencyPO{
     @Column(name = "EA_PHOTO")
     private String agencyPhoto;
 
+    @Column(name = "EA_TYPE")
+    private String type;
+
+    @Column(name = "EA_ID_CARD_NUM")
+    private String idCardNum;
+
+    @Column(name = "EA_ID_CARD_BACK_PHOTO")
+    private String idCardBackPhoto;//身份证反面照片
+
+    @Column(name = "EA_ID_CARD_POSITIVE_PHOTO")
+    private String idCardPositivePhoto;//身份证正面照片
+
+    @Column(name = "EA_BUSINESS_LICENSE_PHOTO")
+    private String businessLicensePhoto;
+
+    @Column(name = "EA_LEGAL_PERSON_NAME")
+    private String legalPersonName;
+
+    @Column(name = "EA_GENDER")
+    private String gender;
+
+    @Column(name = "EA_ID_CARD_DEAD_TIME")
+    private Date idCardDeadTime;
+
     @Column(name = "EA_UPDATE_TIME")
     private Timestamp updateTime;
 

+ 3 - 0
core/src/main/java/com/mooctest/crowd/domain/model/ExpertPO.java

@@ -22,6 +22,9 @@ public class ExpertPO {
     @Column(name = "E_PHOTO")
     private String photo;
 
+    @Column(name = "E_TITLE")
+    private String title;
+
     @Column(name = "E_INTRODUCTION")
     private String introduction;
     

+ 3 - 0
core/src/main/java/com/mooctest/crowd/domain/model/FieldPO.java

@@ -21,4 +21,7 @@ public class FieldPO {
 
     @Column(name = "F_NAME")
     private String name;
+
+    @Column(name = "F_INTRODUCTION")
+    private String introduction;
 }

+ 10 - 8
core/src/main/java/com/mooctest/crowd/domain/model/PersonalAuthenticationPO.java

@@ -3,6 +3,7 @@ package com.mooctest.crowd.domain.model;
 import lombok.Data;
 
 import javax.persistence.*;
+import java.sql.Date;
 import java.sql.Timestamp;
 
 /**
@@ -26,10 +27,10 @@ public class PersonalAuthenticationPO {
     private String realName;
 
     @Column(name = "PA_ID_CARD")
-    private String IDCard;
+    private String idCard;
 
     @Column(name = "PA_ID_CARD_PHOTO")
-    private String IDCardPhoto;
+    private String idCardPhoto;
 
     @Column(name = "PA_BANK_ACCOUNT")
     private String bankAccount;
@@ -53,16 +54,17 @@ public class PersonalAuthenticationPO {
     private Timestamp checkTime;
 
     @Column(name = "PA_ID_CARD_POS_PHOTO")
-    private String  idCardPositivePhoto;//身份证正面照片
-
+    private String idCardPositivePhoto;//身份证正面照片
 
     @Column(name = "PA_ID_CARD_BACK_PHOTO")
-    private String  idCardBackPhoto;//身份证正面照片
-
+    private String idCardBackPhoto;//身份证正面照片
 
     @Column(name = "PA_EXPIRE_TIME")
-    private Timestamp  IDCardDeadTime;
-
+    private Date idCardDeadTime;
 
+    @Column(name = "PA_GENDER")
+    private String gender;
 
+    @Column(name = "PA_TYPE")
+    private String type;
 }

+ 0 - 1
core/src/main/java/com/mooctest/crowd/domain/model/QualificationPO.java

@@ -4,7 +4,6 @@ import lombok.Data;
 
 import javax.persistence.*;
 import java.sql.Date;
-import java.sql.Timestamp;
 
 
 @Data

+ 3 - 0
core/src/main/java/com/mooctest/crowd/domain/model/TestTypePO.java

@@ -21,4 +21,7 @@ public class TestTypePO {
 
     @Column(name = "TT_NAME")
     private String name;
+
+    @Column(name = "TT_INTRODUCTION")
+    private String introduction;
 }

+ 27 - 0
core/src/main/java/com/mooctest/crowd/domain/model/UserTaskCountPO.java

@@ -0,0 +1,27 @@
+package com.mooctest.crowd.domain.model;
+
+import lombok.Data;
+
+import javax.persistence.*;
+
+/**
+ * @author guochao
+ * @date 2019/7/6 17:54
+ */
+@Data
+@Entity(name = "user_task_count")
+public class UserTaskCountPO {
+    @Id
+    @Column(name = "UTC_ID")
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Long id;
+
+    @Column(name = "UTC_USER_ID")
+    private Long userId;
+
+    @Column(name = "UTC_COUNT")
+    private Long count;
+
+    @Column(name = "UTC_TYPE")
+    private Long type;
+}

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

@@ -1,6 +1,7 @@
 package com.mooctest.crowd.domain.repository;
 
 import com.mooctest.crowd.domain.dao.ApplicationTypeDao;
+import com.mooctest.crowd.domain.dao.CrowdTestProjectDao;
 import com.mooctest.crowd.domain.domainobject.ApplicationType;
 import com.mooctest.crowd.domain.model.ApplicationTypePO;
 import com.mooctest.crowd.domain.util.Converter;

+ 95 - 43
core/src/main/java/com/mooctest/crowd/domain/repository/CommonRepo.java

@@ -2,9 +2,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.FieldNoExistException;
-import com.mooctest.crowd.domain.exception.TestTypeNoExistException;
+import com.mooctest.crowd.domain.exception.*;
 import com.mooctest.crowd.domain.model.*;
 import com.mooctest.crowd.domain.util.Converter;
 import org.apache.commons.lang3.StringUtils;
@@ -57,43 +55,44 @@ public class CommonRepo {
     private ExpertDao expertDao;
 
     @Autowired
-    private  CompetitionsDao competitionsDao;
+    private CompetitionsDao competitionsDao;
 
     @Autowired
     private CrowdTestProjectDao crowdTestProjectDao;
 
-    public List<TestType> getAllTestType(){
+    public List<TestType> getAllTestType() {
         return testTypeDao.findAll().stream().map(testTypePO -> Converter.convert(TestType.class, testTypePO)).collect(Collectors.toList());
     }
 
-    public List<ApplicationType> getAllApplicationType(){
+    public List<ApplicationType> getAllApplicationType() {
         return applicationTypeDao.findAll().stream().map(applicationTypePO -> Converter.convert(ApplicationType.class, applicationTypePO)).collect(Collectors.toList());
     }
 
-    public List<Field> getAllFieldType(){
+    public List<Field> getAllFieldType() {
         return fieldDao.findAll().stream().map(fieldPO -> Converter.convert(Field.class, fieldPO)).collect(Collectors.toList());
     }
 
-    public List<Resource> getAllResource(){
+    public List<Resource> getAllResource() {
         return resourceDao.findAll().stream().map(resourcePO -> Converter.convert(Resource.class, resourcePO)).collect(Collectors.toList());
     }
 
-    public List<Competition> getAllCompetition(){
+    public List<Competition> getAllCompetition() {
         return competitionDao.findAll().stream()
                 .map(competitionPO -> Converter.convert(Competition.class, competitionPO))
                 .filter(competition -> competition.getIsDeleted() == DeletedStatus.isNotDeleted).collect(Collectors.toList());
     }
 
-    public Page<Competition> findAllCompetition(Pageable pageable,String keyword) {
-        Specifications<CompetitionPO> where =  Specifications.where(getArticlesByIsNotDeleted(keyword));
-        return  competitionsDao.findAll(where,pageable).map(CompetitionPO -> Converter.convert(Competition.class, CompetitionPO));
+    public Page<Competition> findAllCompetition(Pageable pageable, String keyword) {
+        Specifications<CompetitionPO> where = Specifications.where(getArticlesByIsNotDeleted(keyword));
+        return competitionsDao.findAll(where, pageable).map(CompetitionPO -> Converter.convert(Competition.class, CompetitionPO));
     }
+
     private Specification<CompetitionPO> getArticlesByIsNotDeleted(String keyword) {
         return new Specification<CompetitionPO>() {
             @Override
             public Predicate toPredicate(Root<CompetitionPO> a, CriteriaQuery<?> q, CriteriaBuilder cb) {
                 Predicate predicate = cb.conjunction();
-                if(keyword != null) {
+                if (keyword != null) {
                     predicate.getExpressions().add(
                             cb.like(a.<String>get("name"), "%" + StringUtils.trim(keyword) + "%")
                     );
@@ -102,53 +101,47 @@ public class CommonRepo {
             }
         };
     }
-    public List<Competition> getAllCompetitionTop3(Pageable pageable){
+
+    public List<Competition> getAllCompetitionTop3(Pageable pageable) {
         List<CompetitionPO> competitionPOS = competitionDao.findAll(pageable);
         return competitionPOS.stream().map(competitionPO -> Converter.convert(Competition.class, competitionPO))
                 .filter(competition -> competition.getIsDeleted() == DeletedStatus.isNotDeleted).collect(Collectors.toList());
     }
-    public List<Partner> getAllPartner(){
+
+    public List<Partner> getAllPartner() {
         return partnerDao.findAll().stream().map(partnerPO -> Converter.convert(Partner.class, partnerPO)).collect(Collectors.toList());
     }
 
-    public List<ResidentAgency> getAllResidentAgency(){
+    public List<ResidentAgency> getAllResidentAgency() {
         return residentAgencyDao.findAll().stream().map(residentAgencyPO -> Converter.convert(ResidentAgency.class, residentAgencyPO)).collect(Collectors.toList());
     }
 
-    public ApplicationType getApplicationTypeByAppCode(String appCode){
+    public ApplicationType getApplicationTypeByAppCode(String appCode) {
         Optional<ApplicationTypePO> applicationTypePO = applicationTypeDao.findByCode(appCode);
-        if(!applicationTypePO.isPresent()){
+        if (!applicationTypePO.isPresent()) {
             throw new ApplicationTypeNoExistException();
-        }else {
+        } else {
             return Converter.convert(ApplicationType.class, applicationTypePO.get());
         }
 
     }
 
-    public TestType getTestTypeByAppCode(String typeCode){
+    public TestType getTestTypeByAppCode(String typeCode) {
         Optional<TestTypePO> testTypePO = testTypeDao.findByCode(typeCode);
-        if(!testTypePO.isPresent()){
+        if (!testTypePO.isPresent()) {
             throw new TestTypeNoExistException();
-        }else {
+        } else {
             return Converter.convert(TestType.class, testTypePO.get());
         }
     }
 
-    public Field getFieldByFieldCode(String code){
-        Optional<FieldPO> fieldPO = fieldDao.findByCode(code);
-        if(!fieldPO.isPresent()){
-            throw new FieldNoExistException();
-        }else {
-            return Converter.convert(Field.class, fieldPO.get());
-        }
-    }
 
-    public List<ApplicationTypeToTestType> getAppToTypeByAppCode(String appCode){
+    public List<ApplicationTypeToTestType> getAppToTypeByAppCode(String appCode) {
         List<ApplicationTypeToTestTypePO> appToTypeList = applicationTypeToTestTypeDao.findByApplicationTypeCode(appCode);
         return appToTypeList.stream().map(applicationTypeToTestTypePO -> Converter.convert(ApplicationTypeToTestType.class, applicationTypeToTestTypePO)).collect(Collectors.toList());
     }
 
-    public List<TestType> getTestTypeListByAppCode(String appTypeCode){
+    public List<TestType> getTestTypeListByAppCode(String appTypeCode) {
         List<ApplicationTypeToTestType> appToTypeList = getAppToTypeByAppCode(appTypeCode);
         List<TestType> testTypeList = appToTypeList.stream().map(applicationTypeToTestType -> {
             TestType testTypeByAppCode = getTestTypeByAppCode(applicationTypeToTestType.getTestTypeCode());
@@ -157,8 +150,8 @@ public class CommonRepo {
         return testTypeList;
     }
 
-    public Page<Resource> findAllResourceByPage(Pageable pageable, String keyword){
-        Specifications<ResourcePO> where =  Specifications.where(getResource(keyword));
+    public Page<Resource> findAllResourceByPage(Pageable pageable, String keyword) {
+        Specifications<ResourcePO> where = Specifications.where(getResource(keyword));
         return resourceDao.findAll(where, pageable).map(resourcePO -> Converter.convert(Resource.class, resourcePO));
     }
 
@@ -167,7 +160,7 @@ public class CommonRepo {
             @Override
             public Predicate toPredicate(Root<ResourcePO> a, CriteriaQuery<?> q, CriteriaBuilder cb) {
                 Predicate predicate = cb.conjunction();
-                if(keyword != null) {
+                if (keyword != null) {
                     predicate.getExpressions().add(
                             cb.like(a.<String>get("name"), "%" + StringUtils.trim(keyword) + "%")
                     );
@@ -177,17 +170,26 @@ public class CommonRepo {
         };
     }
 
-    public Page<Expert> findAllExpertByPage(Pageable pageable, String keyword){
-        Specifications<ExpertPO> where =  Specifications.where(getExpert(keyword));
+    public Page<Expert> findAllExpertByPage(Pageable pageable, String keyword) {
+        Specifications<ExpertPO> where = Specifications.where(getExpert(keyword));
         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
             public Predicate toPredicate(Root<ExpertPO> a, CriteriaQuery<?> q, CriteriaBuilder cb) {
                 Predicate predicate = cb.conjunction();
-                if(keyword != null) {
+                if (keyword != null) {
                     predicate.getExpressions().add(
                             cb.like(a.<String>get("name"), "%" + StringUtils.trim(keyword) + "%")
                     );
@@ -197,22 +199,72 @@ public class CommonRepo {
         };
     }
 
-    public Page<CrowdTestProject> getProjectList(Pageable pageable, String code){
-        Specifications<CrowdTestProjectPO> where =  Specifications.where(getCode(code));
+    public Page<CrowdTestProject> getProjectList(Pageable pageable, String code, String keyword) {
+        System.out.println("code " + code);
+        Specifications<CrowdTestProjectPO> where = Specifications.where(getCode(code, keyword));
         return crowdTestProjectDao.findAll(where, pageable).map(crowdTestProjectPO -> Converter.convert(CrowdTestProject.class, crowdTestProjectPO));
     }
-    private Specification<CrowdTestProjectPO> getCode(String code) {
+
+    private Specification<CrowdTestProjectPO> getCode(String code, String keyword) {
         return new Specification<CrowdTestProjectPO>() {
             @Override
             public Predicate toPredicate(Root<CrowdTestProjectPO> a, CriteriaQuery<?> q, CriteriaBuilder cb) {
                 Predicate predicate = cb.conjunction();
-                if(code != null) {
+                if (code != null) {
+                    predicate.getExpressions().add(cb.equal(a.get("applicationType"), code));
+                }
+                if (keyword != null && keyword != "") {
                     predicate.getExpressions().add(
-                            cb.equal(a.get("applicationType"), code)
+                            cb.like(a.<String>get("name"), "%" + StringUtils.trim(keyword) + "%")
                     );
                 }
+//                q.orderBy(cb.desc(a.get("status").as(Integer.class)));
                 return predicate;
             }
         };
     }
+
+    public String getTypeNameByCode(String code) {
+        // 测试类型的转换
+        Optional<TestTypePO> testTypePO = testTypeDao.findByCode(code);
+        if (!testTypePO.isPresent()) {
+            throw new HttpBadRequestException("测试类型有误");
+        }
+        return testTypePO.get().getName();
+    }
+
+    public String getApplicationNameByCode(String code) {
+        Optional<ApplicationTypePO> applicationTypePO = applicationTypeDao.findByCode(code);
+        if (!applicationTypePO.isPresent()) {
+            throw new HttpBadRequestException("应用类型有误");
+        }
+        return applicationTypePO.get().getName();
+    }
+
+    public String getFieldCodeByFieldName(String name) {
+        Optional<FieldPO> fieldPO = fieldDao.findByName(name);
+        if (!fieldPO.isPresent()) {
+            throw new HttpBadRequestException("领域类型有误");
+        } else {
+            return fieldPO.get().getCode();
+        }
+    }
+
+    public String getApplicationCodeByName(String name) {
+        Optional<ApplicationTypePO> applicationTypePO = applicationTypeDao.findByName(name);
+        if (!applicationTypePO.isPresent()) {
+            throw new HttpBadRequestException("应用类型有误");
+        }
+        return applicationTypePO.get().getCode();
+    }
+
+
+    public String getTypeCodeByName(String name) {
+        // 测试类型的转换
+        Optional<TestTypePO> testTypePO = testTypeDao.findByName(name);
+        if (!testTypePO.isPresent()) {
+            throw new HttpBadRequestException("测试类型有误");
+        }
+        return testTypePO.get().getCode();
+    }
 }

+ 22 - 1
core/src/main/java/com/mooctest/crowd/domain/repository/CrowdTestProjectRepo.java

@@ -62,7 +62,7 @@ public class CrowdTestProjectRepo implements ICrowdTestProjectRepo {
 
     @Override
     public List<CrowdTestProjectPO> findByNameLike(String name) {
-        return     crowdTestProjectDao.findByNameLike("%" + name + "%");
+        return     crowdTestProjectDao.findByNameLikeAndIsDeleted("%" + name + "%", DeletedStatus.isNotDeleted);
     }
 
     @Override
@@ -296,6 +296,27 @@ public class CrowdTestProjectRepo implements ICrowdTestProjectRepo {
         return crowdTestProjectResult;
     }
 
+    public CrowdTestTask getTaskDetail(CrowdTestTask crowdTestTask, Long userId){
+        // 检索任务中的所有已接收任务的人员信息
+        List<TaskToUserPO> taskToUserPOList = taskToUserDao.findByTaskCode(crowdTestTask.getCode()).stream().filter(taskToUserPO -> taskToUserPO.getUserId().equals(userId)).collect(Collectors.toList());
+        List<TaskToUser> taskToUserList = taskToUserPOList.stream().map(taskToUserPO -> {
+            TaskToUser taskToUser = Converter.convert(TaskToUser.class, taskToUserPO);
+            // 获取人员详细信息
+            Optional<UserPO> userPOOptional = userDao.findById(taskToUser.getUserId());
+            if (userPOOptional.isPresent()) {
+                taskToUser.setUser(Converter.convert(User.class, userPOOptional.get()));
+            } else {
+                throw new HttpBadRequestException("无此人员的信息");
+            }
+            // 获取每个人员的报告信息
+            List<CrowdTestReport> crowdTestReportListResult = getReportByTaskCodeAndUserId(crowdTestTask.getCode(), taskToUser.getUserId());
+            taskToUser.setCrowdTestReportList(crowdTestReportListResult);
+            return taskToUser;
+        }).collect(Collectors.toList());
+        crowdTestTask.setAcceptedUserList(taskToUserList);
+        return crowdTestTask;
+    }
+
     /**
      * 通过任务code和人员id获取报告列表
      *

+ 12 - 3
core/src/main/java/com/mooctest/crowd/domain/repository/CrowdTestTaskRepo.java

@@ -1,10 +1,11 @@
 package com.mooctest.crowd.domain.repository;
 
 import com.mooctest.crowd.domain.dao.CrowdTestTaskDao;
-import com.mooctest.crowd.domain.domainobject.CrowdTestProject;
+import com.mooctest.crowd.domain.dao.TaskToUserDao;
 import com.mooctest.crowd.domain.domainobject.CrowdTestTask;
+import com.mooctest.crowd.domain.domainobject.TaskToUser;
 import com.mooctest.crowd.domain.model.CrowdTestProjectPO;
-import com.mooctest.crowd.domain.model.CrowdTestTaskPO;
+import com.mooctest.crowd.domain.model.TaskToUserPO;
 import com.mooctest.crowd.domain.util.Converter;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -32,13 +33,16 @@ public class CrowdTestTaskRepo  implements  ICrowdTaskRepo{
     @Autowired
     private CrowdTestTaskDao taskDao;
 
-
+    @Autowired
+    private TaskToUserDao taskToUserDao;
 
     @Override
     public Page<CrowdTestTask> findAllByPage(Pageable pageable, String keyword, int deletedStatus){
         Specifications<CrowdTestProjectPO> where =  Specifications.where(getProjectByIsNotDeleted(keyword, deletedStatus));
         return  taskDao.findAll(where, pageable).map(crowdTestTaskPO -> Converter.convert(CrowdTestTask.class,crowdTestTaskPO));
     }
+
+
     private Specification<CrowdTestProjectPO> getProjectByIsNotDeleted(String keyword, int deletedStatus) {
         return new Specification<CrowdTestProjectPO>() {
             @Override
@@ -54,4 +58,9 @@ public class CrowdTestTaskRepo  implements  ICrowdTaskRepo{
             }
         };
     }
+
+    public void deleteTaskToUser(TaskToUser taskToUser){
+        taskToUserDao.delete(Converter.convert(TaskToUserPO.class, taskToUser));
+    }
+
 }

+ 6 - 6
core/src/main/java/com/mooctest/crowd/domain/repository/EvaluationAgencyRepo.java

@@ -11,7 +11,6 @@ import com.mooctest.crowd.domain.model.EvaluationAgencyResourcePO;
 import com.mooctest.crowd.domain.util.Converter;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.domain.Specification;
@@ -41,9 +40,6 @@ public class EvaluationAgencyRepo implements IEvaluationAgencyRepo {
     @Autowired
     private EvaluationAgencyDao evaluationAgencyDao;
 
-    @Value("${agency}")
-    private String agencyId;
-
     @Override
     public EvaluationAgency findAgencyById(Long id){
         Optional<EvaluationAgencyPO> evaluationAgencyPO = evaluationAgencyDao.findById(id);
@@ -55,6 +51,12 @@ public class EvaluationAgencyRepo implements IEvaluationAgencyRepo {
     }
 
     @Override
+    public EvaluationAgency findAgencyByUserId(Long userId){
+        EvaluationAgencyPO evaluationAgencyPO = evaluationAgencyDao.findByUserIdAndIsDeleted(userId, DeletedStatus.isNotDeleted);
+        return Converter.convert(EvaluationAgency.class, evaluationAgencyPO);
+    }
+
+    @Override
     public EvaluationAgencyResource findById(Long id){
         Optional<EvaluationAgencyResourcePO> evaluationAgencyResourcePOOptional = agencyResourceDao.findById(id);
         if(!evaluationAgencyResourcePOOptional.isPresent()){
@@ -133,8 +135,6 @@ public class EvaluationAgencyRepo implements IEvaluationAgencyRepo {
                             cb.like(a.<String>get("evaluationAgencyName"), "%" + StringUtils.trim(keyword) + "%")
                     );
                 }
-                EvaluationAgency agencyById = findAgencyById(Long.parseLong(agencyId));
-                predicate.getExpressions().add(cb.notEqual(a.get("evaluationAgencyName"), agencyById.getEvaluationAgencyName()));
                 predicate.getExpressions().add(cb.equal(a.get("isDeleted"), deletedStatus));
                 predicate.getExpressions().add(cb.equal(a.get("isAuthentication"), AuthenticationStatus.isAuthenticated));
                 return predicate;

+ 2 - 1
core/src/main/java/com/mooctest/crowd/domain/repository/ICrowdTaskRepo.java

@@ -1,6 +1,7 @@
 package com.mooctest.crowd.domain.repository;
 
 import com.mooctest.crowd.domain.domainobject.CrowdTestTask;
+import com.mooctest.crowd.domain.domainobject.TaskToUser;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 
@@ -8,6 +9,6 @@ public interface ICrowdTaskRepo {
 
      Page<CrowdTestTask> findAllByPage(Pageable pageable, String keyword, int deletedStatus);
 
-
+     void deleteTaskToUser(TaskToUser taskToUser);
 
 }

+ 2 - 0
core/src/main/java/com/mooctest/crowd/domain/repository/IEvaluationAgencyRepo.java

@@ -16,6 +16,8 @@ public interface IEvaluationAgencyRepo {
 
     EvaluationAgency findAgencyById(Long id);
 
+    EvaluationAgency findAgencyByUserId(Long userId);
+
     EvaluationAgencyResource findById(Long id);
 
     List<EvaluationAgencyResource> findByEvaluationAgencyId(Long evaluationAgencyId);

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

@@ -1,9 +1,12 @@
 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;
 
 import javax.management.relation.RoleNotFoundException;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -16,10 +19,18 @@ public interface IUserRepo {
 
     User getByID(Long id) throws UserNotExistException, RoleNotFoundException;
 
+    User getByUserIDJustAgencyInfo(Long userId) throws UserNotExistException, RoleNotFoundException;
+
+    User getByIDJustInfo(Long userId) throws UserNotExistException, RoleNotFoundException;
+
     List<User> getByIdList(List<Long> ids) throws RoleNotFoundException;
 
     List<User> getAllUser() throws RoleNotFoundException;
 
+    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);

+ 170 - 65
core/src/main/java/com/mooctest/crowd/domain/repository/UserRepo.java

@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
 
 import java.sql.Timestamp;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Optional;
 
@@ -24,6 +25,10 @@ import java.util.Optional;
 
 @Component
 public class UserRepo implements IUserRepo {
+    @Autowired
+    private EvaluationAgencyDao agencyDao;
+    @Autowired
+    private TestTypeDao testTypeDao;
 
     @Autowired
     private UserDao userDao;
@@ -38,6 +43,9 @@ public class UserRepo implements IUserRepo {
     private UserToRoleDao userToRoleDao;
 
     @Autowired
+    private UserTaskCountDao userTaskCountDao;
+
+    @Autowired
     private RoleToPermissionDao roleToPermissionDao;
 
     @Autowired
@@ -71,18 +79,40 @@ public class UserRepo implements IUserRepo {
         Optional<UserPO> userPOOptional = userDao.findById(userId);
         if (!userPOOptional.isPresent()) {
             throw new UserNotExistException("用户不存在");
-        }else{
+        } else {
             User user = getUserAndRoleAndPermissionByUserPO(userPOOptional.get());
+
             return user;
         }
     }
 
     @Override
+    public User getByUserIDJustAgencyInfo(Long userId) throws UserNotExistException, RoleNotFoundException {
+        Optional<UserPO> userPOOptional = userDao.findById(userId);
+        if (!userPOOptional.isPresent()) {
+            throw new UserNotExistException("用户不存在");
+        } else {
+            User user = getUserAndRoleAndPermissionByUserPO(userPOOptional.get());
+            return this.getEvaluationInfo(user);
+        }
+    }
+
+    @Override
+    public User getByIDJustInfo(Long userId) throws UserNotExistException, RoleNotFoundException {
+        Optional<UserPO> userPOOptional = userDao.findById(userId);
+        if (!userPOOptional.isPresent()){
+            throw new UserNotExistException("用户不存在");
+        } else {
+            return Converter.convert(User.class, userPOOptional.get());
+        }
+    }
+
+    @Override
     public User getByMobileNum(String mobileNum) throws UserNotExistException, RoleNotFoundException {
         UserPO userPO = userDao.findByMobile(mobileNum);
         if (userPO == null) {
             throw new UserNotExistException("用户不存在");
-        }else {
+        } else {
             User user = getUserAndRoleAndPermissionByUserPO(userPO);
             return user;
         }
@@ -98,11 +128,12 @@ public class UserRepo implements IUserRepo {
 
     /**
      * 获取机构认证的申请
+     *
      * @return
      * @throws RoleNotFoundException
      */
     @Override
-    public List<User> getApplyEvaluationAgencyByIsAuthenticated(){
+    public List<User> getApplyEvaluationAgencyByIsAuthenticated() {
         List<UserPO> userPOList = new ArrayList<>();
         evaluationAgencyDao.findByIsAuthentication(AuthenticationStatus.isNotAuthenticated).forEach(evaluationAgencyPO -> {
             userPOList.add(userDao.findById(evaluationAgencyPO.getUserId()).get());
@@ -119,6 +150,23 @@ public class UserRepo implements IUserRepo {
         return userListByIds;
     }
 
+    @Override
+    public ArrayList<UserPO> getAllUserInfo() throws RoleNotFoundException {
+        Iterable<UserPO> allUserPO = userDao.findAll();
+        ArrayList<UserPO> userPOArrayList = Lists.newArrayList(allUserPO);
+        return userPOArrayList;
+    }
+
+    @Override
+    public UserTaskCount getUserTaskCountByUserId(Long userId) {
+        Optional<UserTaskCountPO> userTaskCountPO = userTaskCountDao.findByUserId(userId);
+        if (!userTaskCountPO.isPresent()) {
+            return null;
+        } else {
+            return Converter.convert(UserTaskCount.class, userTaskCountPO.get());
+        }
+    }
+
 
     //add
 //    @Override
@@ -159,6 +207,7 @@ public class UserRepo implements IUserRepo {
 
     /**
      * 注册用户时默认为普通用户,分配角色后存入数据库
+     *
      * @param user
      * @return
      */
@@ -171,7 +220,7 @@ public class UserRepo implements IUserRepo {
         // 存储从数据库中取出的User的Role数据
         List<Role> roleListResult = new ArrayList<>();
 
-        for(Role role : roleList){
+        for (Role role : roleList) {
             RolePO rolePO = roleDao.findByName(role.getName());
             Role roleConvert = Converter.convert(Role.class, rolePO);
 
@@ -190,6 +239,7 @@ public class UserRepo implements IUserRepo {
 
     /**
      * 保存用户相关的所有信息(包括测评机构信息、角色信息、权限信息)
+     *
      * @param user
      * @return
      * @throws RoleNotFoundException
@@ -202,7 +252,8 @@ public class UserRepo implements IUserRepo {
 
 
     /**
-     *保存用户信息(包括测评机构信息、角色信息、权限信息)
+     * 保存用户信息(包括测评机构信息、角色信息、权限信息)
+     *
      * @param user
      * @return
      * @throws RoleNotFoundException
@@ -210,15 +261,15 @@ public class UserRepo implements IUserRepo {
     private User saveRoleAndPermissionAndEvaluationAgencyByUser(User user) throws RoleNotFoundException {
         UserPO userPO = userDao.save(Converter.convert(UserPO.class, user));
         List<Role> roleList = user.getRoleList();
-        if (roleList==null || roleList.size()==0){
+        if (roleList == null || roleList.size() == 0) {
             UserToRolePO u2r = new UserToRolePO();
             u2r.setUserId(userPO.getId());
             u2r.setRoleId(1L);
             userToRoleDao.save(u2r);
         }
         List<UserToRolePO> userToRolePOList = userToRoleDao.findByUserId(userPO.getId());
-        if(roleList != null){
-            for(Role role : roleList){
+        if (roleList != null) {
+            for (Role role : roleList) {
                 if (userToRolePOList.stream().noneMatch(userToRolePO -> userToRolePO.getRoleId().equals(role.getId()))) {
                     UserToRolePO userToRolePO = new UserToRolePO();
                     userToRolePO.setRoleId(role.getId());
@@ -230,19 +281,24 @@ public class UserRepo implements IUserRepo {
 
         /*机构认证保存机构信息*/
         EvaluationAgency evaluationAgency = user.getEvaluationAgency();
-        if(evaluationAgency != null){
+        if (evaluationAgency != null) {
             EvaluationAgencyPO evaluationAgencyPO = Converter.convert(EvaluationAgencyPO.class, evaluationAgency);
             evaluationAgencyPO.setUserId(userPO.getId());
+            System.out.println(evaluationAgencyPO + "xxxxxxxxxxxxxxxxxxxxxxxx");
             evaluationAgencyPO = evaluationAgencyDao.save(evaluationAgencyPO);
             List<EvaluationAgencyResource> resources = evaluationAgency.getEvaluationAgencyResourceList();
             List<EvaluationAgencyAbility> abilities = evaluationAgency.getEvaluationAgencyAbilityList();
-            for (EvaluationAgencyResource resource : resources) {
-                resource.setEvaluationAgencyId(evaluationAgencyPO.getId());
-                resourceRepo.saveEvaluationAgencyResource(resource);
+            if (resources != null) {
+                for (EvaluationAgencyResource resource : resources) {
+                    resource.setEvaluationAgencyId(evaluationAgencyPO.getId());
+                    resourceRepo.saveEvaluationAgencyResource(resource);
+                }
             }
-            for (EvaluationAgencyAbility ability : abilities) {
-                ability.setEvaluationAgencyId(evaluationAgencyPO.getId());
-                resourceRepo.saveEvaluationAgencyAbility(ability);
+            if (abilities != null) {
+                for (EvaluationAgencyAbility ability : abilities) {
+                    ability.setEvaluationAgencyId(evaluationAgencyPO.getId());
+                    resourceRepo.saveEvaluationAgencyAbility(ability);
+                }
             }
 //            // save测评机构资源
 //            EvaluationAgencyResource evaluationAgencyResource = evaluationAgency.getEvaluationAgencyResource();
@@ -254,34 +310,49 @@ public class UserRepo implements IUserRepo {
         }
 
         /*实名认证保存个人信息*/
-        if(user.getPersonalAuthentication() != null){
-            personalAuthenticationDao.save(Converter.convert(PersonalAuthenticationPO.class, user.getPersonalAuthentication()));
+        if (user.getPersonalAuthentication() != null) {
+            PersonalAuthenticationPO authenticationPO = Converter.convert(PersonalAuthenticationPO.class, user.getPersonalAuthentication());
+            personalAuthenticationDao.save(authenticationPO);
         }
 
         /*企业认证保存企业信息*/
-        if(user.getEnterpriseAuthentication() != null){
-            enterpriseAuthenticationDao.save(Converter.convert(EnterpriseAuthenticationPO.class, user.getEnterpriseAuthentication()));
-        }
+//        if (user.getEnterpriseAuthentication() != null) {
+////            if (user.getEnterpriseAuthentication().getType().contains("研发机构")) {
+////                System.out.println("认证消息为===========" + user.getPersonalAuthentication());
+////                EnterpriseAuthenticationPO authenticationPO = Converter.convert(EnterpriseAuthenticationPO.class, user.getEnterpriseAuthentication());
+////                System.out.println("认证消息为PO===========" + authenticationPO);
+////                enterpriseAuthenticationDao.save(authenticationPO);
+////            }
+////            else if (user.getEnterpriseAuthentication().getIsDaOrEa().equals("评测机构")) {
+//                EvaluationAgencyPO evaluationAgencyPO = new EvaluationAgencyPO();
+//                evaluationAgencyPO.setUserId(user.getId());
+//                evaluationAgencyPO.setAddress(user.getEnterpriseAuthentication().getAddress());
+//                evaluationAgencyPO.setEvaluationAgencyName(user.getEnterpriseAuthentication().getEnterpriseName());
+//                evaluationAgencyPO.setUpdateTime(new Timestamp(System.currentTimeMillis()));
+//                agencyDao.save(evaluationAgencyPO);
+////            }
+//        }
 
         return getByID(userPO.getId());
     }
 
     /**
      * 通过角色获取角色和权限信息
+     *
      * @param roleResult
      * @return
      */
     private Role getPermissionByRole(Role roleResult) {
         List<Permission> permissionResultList = new ArrayList<>();
         List<RoleToPermissionPO> roleToPermissionPOList = roleToPermissionDao.findAllByRoleId(roleResult.getId());
-        for(RoleToPermissionPO roleToPermissionPO : roleToPermissionPOList){
+        for (RoleToPermissionPO roleToPermissionPO : roleToPermissionPOList) {
             Long permissionId = roleToPermissionPO.getPermissionId();
             Optional<PermissionPO> permissionPOOptional = permissionDao.findById(permissionId);
-            if(!permissionPOOptional.isPresent()){
+            if (!permissionPOOptional.isPresent()) {
                 throw new PermissionNotFoundException();
-            }else{
+            } else {
                 PermissionPO permissionPO = permissionPOOptional.get();
-                permissionResultList.add(Converter.convert(Permission.class,permissionPO));
+                permissionResultList.add(Converter.convert(Permission.class, permissionPO));
             }
         }
         roleResult.setPermissionList(permissionResultList);
@@ -290,13 +361,14 @@ public class UserRepo implements IUserRepo {
 
     /**
      * 通过UsePOList获取用户-角色-权限信息
+     *
      * @param userPOList
      * @return
      * @throws RoleNotFoundException
      */
     private List<User> getUserAndRoleAndPermissionListByUserPOList(List<UserPO> userPOList) throws RoleNotFoundException {
         List<User> userList = new ArrayList<>();
-        for(UserPO userPO : userPOList){
+        for (UserPO userPO : userPOList) {
             User userAndRole = getUserAndRoleAndPermissionByUserPO(userPO);
             userList.add(userAndRole);
         }
@@ -305,6 +377,7 @@ public class UserRepo implements IUserRepo {
 
     /**
      * 通过用户信息获取用户-角色-权限信息
+     *
      * @param userPO
      * @return
      * @throws RoleNotFoundException
@@ -315,66 +388,58 @@ public class UserRepo implements IUserRepo {
         List<Role> roleResultList = new ArrayList<>();
         for (UserToRolePO userToRolePO : userToRolePOList) {
             Optional<RolePO> rolePOOptional = roleDao.findById(userToRolePO.getRoleId());
-            if(rolePOOptional.isPresent()){
+            if (rolePOOptional.isPresent()) {
                 RolePO rolePO = rolePOOptional.get();
                 // 权限
                 Role roleResult = getPermissionByRole(Converter.convert(Role.class, rolePO));
                 roleResultList.add(roleResult);
-            }else{
+            } else {
                 throw new RoleNotFoundException();
             }
         }
         userResult.setRoleList(roleResultList);
 
-        /*获取测评机构信息*/
-        EvaluationAgencyPO evaluationAgencyPO = evaluationAgencyDao.findByUserIdAndIsDeleted(userPO.getId(), DeletedStatus.isNotDeleted);
-        if(evaluationAgencyPO != null){
-            EvaluationAgency evaluationAgencyResult = Converter.convert(EvaluationAgency.class, evaluationAgencyPO);
-
-            /*获取测评机构能力*/
-            List<EvaluationAgencyAbilityPO> evaluationAgencyAbilityPOList = agencyAbilityDao.findByEvaluationAgencyIdAndIsDeleted(evaluationAgencyResult.getId(), DeletedStatus.isNotDeleted);
-            List<EvaluationAgencyAbility> evaluationAgencyAbilityList = new ArrayList<>();
-            if(evaluationAgencyAbilityPOList.size() != 0){
-                for(EvaluationAgencyAbilityPO evaluationAgencyAbilityPO : evaluationAgencyAbilityPOList){
-                    EvaluationAgencyAbility evaluationAgencyAbility = Converter.convert(EvaluationAgencyAbility.class, evaluationAgencyAbilityPO);
-                    evaluationAgencyAbilityList.add(evaluationAgencyAbility);
-                }
-            }
-            evaluationAgencyResult.setEvaluationAgencyAbilityList(evaluationAgencyAbilityList);
-
-            /*获取测评机构资源*/
-            List<EvaluationAgencyResourcePO> evaluationAgencyResourcePOList = agencyResourceDao.findByEvaluationAgencyIdAndIsDeleted(evaluationAgencyResult.getId(), DeletedStatus.isNotDeleted);
-            List<EvaluationAgencyResource> evaluationAgencyResourceList = new ArrayList<>();
-            if(evaluationAgencyResourcePOList.size() != 0){
-                for(EvaluationAgencyResourcePO evaluationAgencyResourcePO : evaluationAgencyResourcePOList){
-                    EvaluationAgencyResource evaluationAgencyResource = Converter.convert(EvaluationAgencyResource.class, evaluationAgencyResourcePO);
-                    evaluationAgencyResourceList.add(evaluationAgencyResource);
-                }
-            }
-            evaluationAgencyResult.setEvaluationAgencyResourceList(evaluationAgencyResourceList);
-            userResult.setEvaluationAgency(evaluationAgencyResult);
-        }
+        /*获取机构认证的信息*/
+        userResult = getEvaluationInfo(userResult);
 
         /*获取个人认证的信息*/
         PersonalAuthenticationPO personalAuthenticationPO = personalAuthenticationDao.findByUserIdAndIsDeleted(userPO.getId(), DeletedStatus.isNotDeleted);
-        if(personalAuthenticationPO != null){
+        if (personalAuthenticationPO != null) {
             userResult.setPersonalAuthentication(Converter.convert(PersonalAuthentication.class, personalAuthenticationPO));
         }
 
         /*获取企业认证的信息*/
         EnterpriseAuthenticationPO enterpriseAuthenticationPO = enterpriseAuthenticationDao.findByUserIdAndIsDeleted(userPO.getId(), DeletedStatus.isNotDeleted);
-        if(enterpriseAuthenticationPO != null){
+        if (enterpriseAuthenticationPO != null) {
             userResult.setEnterpriseAuthentication(Converter.convert(EnterpriseAuthentication.class, enterpriseAuthenticationPO));
         }
+        //获取用户能力
+        String abilityName="";
+        List<String> codeList=new ArrayList<>();
+        List<String> abailities = new ArrayList<>();
+         if(userPO.getPersonalCompetence()!=null&&!userPO.getPersonalCompetence().trim().equals("")){
+             codeList= Arrays.asList(userPO.getPersonalCompetence().split(","));
+         }
+
+        if(abailities!=null&&!codeList.isEmpty()){
+
+            for (int i = 0; i < abailities.size(); i++) {
+                    abilityName = testTypeDao.findByCode(codeList.get(i)).get().getName();
+                    abailities.add(abilityName);
+                }
+
+            }
+
+        userResult.setPersonAbilities(abailities);
 
         /*获取区域管理员信息*/
         List<RegionalManagerToRegionalPO> regionalManagerToRegionalPOList = regionalManagerToRegionalDao.findByUserIdAndIsDeleted(userPO.getId(), DeletedStatus.isNotDeleted);
-        if(regionalManagerToRegionalPOList.size() > 0){
+        if (regionalManagerToRegionalPOList.size() > 0) {
             List<RegionalManagerToRegional> regionalList = new ArrayList<>();
             RegionalManager regionalManager = new RegionalManager();
             regionalManager.setUserId(userPO.getId());
-            for(RegionalManagerToRegionalPO regionalManagerToRegionalPO : regionalManagerToRegionalPOList){
-                if(regionalManagerToRegionalPO != null){
+            for (RegionalManagerToRegionalPO regionalManagerToRegionalPO : regionalManagerToRegionalPOList) {
+                if (regionalManagerToRegionalPO != null) {
                     regionalManager.setId(regionalManagerToRegionalPO.getId());
                     /*获取区域管理员管理的区域信息*/
                     RegionalManagerToRegional regionalResult = Converter.convert(RegionalManagerToRegional.class, regionalManagerToRegionalPO);
@@ -388,28 +453,68 @@ public class UserRepo implements IUserRepo {
 
         //获取系统管理员信息
         SystemAdministratorToUserPO systemAdministratorToUserPO = systemAdministratorToUserDao.findByUserIdAndIsDeleted(userPO.getId(), DeletedStatus.isNotDeleted);
-        if(systemAdministratorToUserPO != null){
+        if (systemAdministratorToUserPO != null) {
             userResult.setSystemAdministratorToUser(Converter.convert(SystemAdministratorToUser.class, systemAdministratorToUserPO));
         }
 
         return userResult;
     }
 
-    public Role getRole(String roleName){
+
+
+
+
+    private User getEvaluationInfo(User userResult) {
+        /*获取测评机构信息*/
+        EvaluationAgencyPO evaluationAgencyPO = evaluationAgencyDao.findByUserIdAndIsDeleted(userResult.getId(), DeletedStatus.isNotDeleted);
+        if (evaluationAgencyPO != null) {
+            EvaluationAgency evaluationAgencyResult = Converter.convert(EvaluationAgency.class, evaluationAgencyPO);
+
+            /*获取测评机构能力*/
+            List<EvaluationAgencyAbilityPO> evaluationAgencyAbilityPOList = agencyAbilityDao.findByEvaluationAgencyIdAndIsDeleted(evaluationAgencyResult.getId(), DeletedStatus.isNotDeleted);
+            List<EvaluationAgencyAbility> evaluationAgencyAbilityList = new ArrayList<>();
+            if (evaluationAgencyAbilityPOList.size() != 0) {
+                for (EvaluationAgencyAbilityPO evaluationAgencyAbilityPO : evaluationAgencyAbilityPOList) {
+                    EvaluationAgencyAbility evaluationAgencyAbility = Converter.convert(EvaluationAgencyAbility.class, evaluationAgencyAbilityPO);
+                    evaluationAgencyAbilityList.add(evaluationAgencyAbility);
+                }
+            }
+            evaluationAgencyResult.setEvaluationAgencyAbilityList(evaluationAgencyAbilityList);
+
+
+
+
+
+            /*获取测评机构资源*/
+            List<EvaluationAgencyResourcePO> evaluationAgencyResourcePOList = agencyResourceDao.findByEvaluationAgencyIdAndIsDeleted(evaluationAgencyResult.getId(), DeletedStatus.isNotDeleted);
+            List<EvaluationAgencyResource> evaluationAgencyResourceList = new ArrayList<>();
+            if (evaluationAgencyResourcePOList.size() != 0) {
+                for (EvaluationAgencyResourcePO evaluationAgencyResourcePO : evaluationAgencyResourcePOList) {
+                    EvaluationAgencyResource evaluationAgencyResource = Converter.convert(EvaluationAgencyResource.class, evaluationAgencyResourcePO);
+                    evaluationAgencyResourceList.add(evaluationAgencyResource);
+                }
+            }
+            evaluationAgencyResult.setEvaluationAgencyResourceList(evaluationAgencyResourceList);
+            userResult.setEvaluationAgency(evaluationAgencyResult);
+        }
+        return userResult;
+    }
+
+    public Role getRole(String roleName) {
         Role role = new Role();
         BeanUtils.copyProperties(roleDao.findByName(roleName), role);
         return role;
     }
 
-    public long getAllUserNum(){
+    public long getAllUserNum() {
         return userDao.count();
     }
 
-    public long getAllAgencyNum(){
+    public long getAllAgencyNum() {
         return evaluationAgencyDao.count();
     }
 
-    public long getAllResourceNum(){
+    public long getAllResourceNum() {
         return agencyResourceDao.count();
     }
 }

+ 416 - 0
core/src/main/java/com/mooctest/crowd/domain/util/MD5Base64Util.java

@@ -0,0 +1,416 @@
+package com.mooctest.crowd.domain.util;
+
+/**
+ * @author guochao
+ * @date 2020-06-21 15:16
+ */
+import java.io.ByteArrayOutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.security.MessageDigest;
+
+/**
+ 2018年3月19日
+ **/
+public class MD5Base64Util {
+
+    public static void main(String[] args)  {
+
+
+        String text ="123456";
+        System.out.println("md5:"+MD5Base64Util.EncryptionByMD5(text));
+        System.out.println("Base64:"+MD5Base64Util.EncryptionByBase64(text));
+        System.out.println("md5_Base64:"+MD5Base64Util.EncryptionByMD5AndBase64(text)+"\n");
+
+        String text2 =MD5Base64Util.EncryptionByBase64(text);//MTIzNDU2
+        System.out.println(MD5Base64Util.decryptBase64(text2)+"\n");
+
+        String text3 =MD5Base64Util.EncryptionByMD5AndBase64(text);//4QrcOUm6Wau+VuBX8g+IPg==
+        System.out.println(MD5Base64Util.decryptBase64To(text3)+"\n");
+
+        // 解密
+        String decryptText = "/OqSD3QStdp74M9CuMk3WQ==";
+        System.out.println(MD5Base64Util.decryptBase64(decryptText)+"\n");
+
+    }
+
+    private final static char hexDigits[]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
+    private static char[] base64EncodeChars = new char[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+            'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+            'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' };
+
+    private static byte[] base64DecodeChars = new byte[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55,
+            56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+            21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+            47, 48, 49, 50, 51, -1, -1, -1, -1, -1 };
+    /**
+     * MD5加密
+     * @param text
+     * @return String
+     */
+    public static String EncryptionByMD5(String text){
+        try {
+            byte[] btInput = text.getBytes();
+            // 获得MD5摘要算法的 MessageDigest 对象
+            MessageDigest mdInst = MessageDigest.getInstance("MD5");
+            // 使用指定的字节更新摘要
+            mdInst.update(btInput);
+            // 获得密文
+            byte[] md = mdInst.digest();
+            // 把密文转换成十六进制的字符串形式
+            int j = md.length;
+            char str[] = new char[j * 2];
+            int k = 0;
+            for (int i = 0; i < j; i++) {
+                byte byte0 = md[i];
+                str[k++] = hexDigits[byte0 >>> 4 & 0xf];
+                str[k++] = hexDigits[byte0 & 0xf];
+            }
+            return new String(str);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+
+    }
+    /**
+     * MD5加密
+     * @param text
+     * @return byte[]
+     */
+    public static byte[] EncryptionByMD5T(String text){
+        try {
+            byte[] btInput = text.getBytes();
+            // 获得MD5摘要算法的 MessageDigest 对象
+            MessageDigest mdInst = MessageDigest.getInstance("MD5");
+            // 使用指定的字节更新摘要
+            mdInst.update(btInput);
+            // 获得密文
+            byte[] md = mdInst.digest();
+            return md;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+
+    }
+    /**
+     * Base64加密
+     * @param text
+     * @return String
+     */
+    public static String EncryptionByBase64(String text) {
+        byte[] data=text.getBytes();
+        StringBuffer sb = new StringBuffer();
+        int len = data.length;
+        int i = 0;
+        int b1, b2, b3;
+
+        while (i < len) {
+            b1 = data[i++] & 0xff;
+            if (i == len) {
+                sb.append(base64EncodeChars[b1 >>> 2]);
+                sb.append(base64EncodeChars[(b1 & 0x3) << 4]);
+                sb.append("==");
+                break;
+            }
+            b2 = data[i++] & 0xff;
+            if (i == len) {
+                sb.append(base64EncodeChars[b1 >>> 2]);
+                sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
+                sb.append(base64EncodeChars[(b2 & 0x0f) << 2]);
+                sb.append("=");
+                break;
+            }
+            b3 = data[i++] & 0xff;
+            sb.append(base64EncodeChars[b1 >>> 2]);
+            sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
+            sb.append(base64EncodeChars[((b2 & 0x0f) << 2) | ((b3 & 0xc0) >>> 6)]);
+            sb.append(base64EncodeChars[b3 & 0x3f]);
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Base64加密
+     * @param data
+     * @return String
+     */
+    public static String EncryptionByBase64(byte[] data) {
+        StringBuffer sb = new StringBuffer();
+        int len = data.length;
+        int i = 0;
+        int b1, b2, b3;
+
+        while (i < len) {
+            b1 = data[i++] & 0xff;
+            if (i == len) {
+                sb.append(base64EncodeChars[b1 >>> 2]);
+                sb.append(base64EncodeChars[(b1 & 0x3) << 4]);
+                sb.append("==");
+                break;
+            }
+            b2 = data[i++] & 0xff;
+            if (i == len) {
+                sb.append(base64EncodeChars[b1 >>> 2]);
+                sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
+                sb.append(base64EncodeChars[(b2 & 0x0f) << 2]);
+                sb.append("=");
+                break;
+            }
+            b3 = data[i++] & 0xff;
+            sb.append(base64EncodeChars[b1 >>> 2]);
+            sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
+            sb.append(base64EncodeChars[((b2 & 0x0f) << 2) | ((b3 & 0xc0) >>> 6)]);
+            sb.append(base64EncodeChars[b3 & 0x3f]);
+        }
+        return sb.toString();
+    }
+
+
+    /**
+     * 先MD5加密,再base64加密
+     * @param text
+     * @return String
+     */
+    public static String EncryptionByMD5AndBase64(String text){
+
+        return EncryptionByBase64(EncryptionByMD5T(text));
+    }
+
+    /**
+     * Base64 解密
+     * @return String
+     */
+    public static String decryptBase64(String text) {
+        byte[] data = text.getBytes();
+        int len = data.length;
+        ByteArrayOutputStream buf = new ByteArrayOutputStream(len);
+        int i = 0;
+        int b1, b2, b3, b4;
+
+        while (i < len)
+        {
+
+            /* b1 */
+            do
+            {
+                b1 = base64DecodeChars[data[i++]];
+            }
+            while (i < len && b1 == -1);
+            if (b1 == -1)
+            {
+                break;
+            }
+
+            /* b2 */
+            do
+            {
+                b2 = base64DecodeChars[data[i++]];
+            }
+            while (i < len && b2 == -1);
+            if (b2 == -1)
+            {
+                break;
+            }
+            buf.write((int) ((b1 << 2) | ((b2 & 0x30) >>> 4)));
+
+            /* b3 */
+            do
+            {
+                b3 = data[i++];
+                if (b3 == 61)
+                {
+                    return new String(buf.toByteArray());
+                }
+                b3 = base64DecodeChars[b3];
+            }
+            while (i < len && b3 == -1);
+            if (b3 == -1)
+            {
+                break;
+            }
+            buf.write((int) (((b2 & 0x0f) << 4) | ((b3 & 0x3c) >>> 2)));
+
+            /* b4 */
+            do
+            {
+                b4 = data[i++];
+                if (b4 == 61)
+                {
+                    return new String(buf.toByteArray());
+                }
+                b4 = base64DecodeChars[b4];
+            }
+            while (i < len && b4 == -1);
+            if (b4 == -1)
+            {
+                break;
+            }
+            buf.write((int) (((b3 & 0x03) << 6) | b4));
+
+        }
+
+        return new String(buf.toByteArray());
+
+    }
+
+    /**
+     * Base64 解密到MD5
+     * @return String
+     */
+    public static String decryptBase64To(String text) {
+        byte[] data = text.getBytes();
+        int len = data.length;
+        ByteArrayOutputStream buf = new ByteArrayOutputStream(len);
+        int i = 0;
+        int b1, b2, b3, b4;
+
+        while (i < len)
+        {
+
+            /* b1 */
+            do
+            {
+                b1 = base64DecodeChars[data[i++]];
+            }
+            while (i < len && b1 == -1);
+            if (b1 == -1)
+            {
+                break;
+            }
+
+            /* b2 */
+            do
+            {
+                b2 = base64DecodeChars[data[i++]];
+            }
+            while (i < len && b2 == -1);
+            if (b2 == -1)
+            {
+                break;
+            }
+            buf.write((int) ((b1 << 2) | ((b2 & 0x30) >>> 4)));
+
+            /* b3 */
+            do
+            {
+                b3 = data[i++];
+                if (b3 == 61)
+                {
+                    byte[] br = buf.toByteArray();
+                    // 把密文转换成十六进制的字符串形式
+                    int p = br.length;
+                    char str[] = new char[p * 2];
+                    int k = 0;
+                    for (int r = 0; r < p; r++) {
+                        byte byte0 = br[r];
+                        str[k++] = hexDigits[byte0 >>> 4 & 0xf];
+                        str[k++] = hexDigits[byte0 & 0xf];
+                    }
+                    return new String(str);
+                }
+                b3 = base64DecodeChars[b3];
+            }
+            while (i < len && b3 == -1);
+            if (b3 == -1)
+            {
+                break;
+            }
+            buf.write((int) (((b2 & 0x0f) << 4) | ((b3 & 0x3c) >>> 2)));
+
+            /* b4 */
+            do
+            {
+                b4 = data[i++];
+                if (b4 == 61)
+                {
+                    byte[] br = buf.toByteArray();
+                    // 把密文转换成十六进制的字符串形式
+                    int p = br.length;
+                    char str[] = new char[p * 2];
+                    int k = 0;
+                    for (int r = 0; r < p; r++) {
+                        byte byte0 = br[r];
+                        str[k++] = hexDigits[byte0 >>> 4 & 0xf];
+                        str[k++] = hexDigits[byte0 & 0xf];
+                    }
+                    return new String(str);
+                }
+                b4 = base64DecodeChars[b4];
+            }
+            while (i < len && b4 == -1);
+            if (b4 == -1)
+            {
+                break;
+            }
+            buf.write((int) (((b3 & 0x03) << 6) | b4));
+
+        }
+        byte[] br = buf.toByteArray();
+        // 把密文转换成十六进制的字符串形式
+        int p = br.length;
+        char str[] = new char[p * 2];
+        int k = 0;
+        for (int r = 0; r < p; r++) {
+            byte byte0 = br[r];
+            str[k++] = hexDigits[byte0 >>> 4 & 0xf];
+            str[k++] = hexDigits[byte0 & 0xf];
+        }
+        return new String(str);
+    }
+
+    /**
+     * 网络传输中文UTF-8加密,防止乱码
+     * @param text
+     * @return String
+     */
+    public static String netEnCoderUTF8(String text){
+        return netEnCoder(text,"UTF-8");
+    }
+
+    /***
+     * 网络传输中文UTF-8解码
+     * @param text
+     * @return String
+     */
+    public static String netEDeCoderUTF8(String text){
+        return netDecoder(text,"UTF-8");
+    }
+
+
+    /**
+     *
+     * @param text
+     * @param charsetName 字符集
+     * @return String
+     */
+    public static String netEnCoder(String text,String charsetName){
+        String result=null;
+        try {
+            result= URLEncoder.encode(text,charsetName);
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+
+    /**
+     *
+     * @param text
+     * @param charsetName 字符集
+     * @return String
+     */
+    public static String netDecoder(String text,String charsetName){
+        String result=null;
+        try {
+            result= URLDecoder.decode(text,charsetName);
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+
+}

+ 1 - 1
core/src/test/java/com/mooctest/crowd/domain/domainobject/UserTest.java

@@ -67,7 +67,7 @@ public class UserTest {
         evaluationAgency.setId(1L);
         evaluationAgency.setUserId(user.getId());
         evaluationAgency.setEvaluationAgencyName("测评机构");
-        evaluationAgency.setBankAccount("111111111");
+//        evaluationAgency.setBankAccount("111111111");
         evaluationAgency.setAgencyPhoto("https://mooctest.phone.com");
         evaluationAgency.setAddress(user.getProvince()+user.getCity());
         evaluationAgency.setIsDeleted(DeletedStatus.isNotDeleted);

+ 0 - 1
site/pom.xml

@@ -143,7 +143,6 @@
 			<artifactId>snakeyaml</artifactId>
 		</dependency>
 	</dependencies>
-
 	<build>
 		<plugins>
 			<plugin>

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

@@ -5,9 +5,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cache.annotation.EnableCaching;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
+@EnableScheduling
 @SpringBootApplication(scanBasePackages = "com.mooctest.crowd")
-@EnableCaching
 public class SiteApplication {
 
 	public static void main(String[] args) {

+ 43 - 11
site/src/main/java/com/mooctest/crowd/site/command/ApplyAgencyAuthCommand.java

@@ -1,12 +1,16 @@
 package com.mooctest.crowd.site.command;
 
+import com.alibaba.fastjson.JSONObject;
 import com.mooctest.crowd.domain.domainobject.EvaluationAgency;
 import com.mooctest.crowd.domain.domainobject.EvaluationAgencyAbility;
+import com.mooctest.crowd.domain.exception.HttpBadRequestException;
 import com.mooctest.crowd.domain.factory.UserFactory;
 import lombok.Data;
 import org.springframework.beans.BeanUtils;
 
 import javax.validation.constraints.NotNull;
+import java.sql.Date;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -16,25 +20,53 @@ import java.util.stream.Collectors;
  * @date 2019-08-12 01:05
  */
 @Data
-public class ApplyAgencyAuthCommand {
-    @NotNull(message = "机构名称不可为空")
+public class ApplyAgencyAuthCommand{
+
+    @NotNull(message = "企业名称不可为空")
     private String evaluationAgencyName;
-//    @NotNull(message = "银行卡号不可为空")
-    private String bankAccount;
-    @NotNull(message = "机构地址不可为空")
+    @NotNull(message = "营业执照图片不可为空")
+    private String businessLicensePhoto;
+    @NotNull(message = "企业地址不可为空")
     private String address;
-    @NotNull(message = "评测能力不可为空")
-    private List<String> evaluationAgencyAbilityList;
-    @NotNull(message = "机构资源不可为空")
-    private List<AgencyResourceCommand> evaluationAgencyResourceList;
     @NotNull(message = "LOGO不可为空")
     private String agencyPhoto;
 
+    @NotNull(message = "法人姓名不能为空")
+    private  String legalPersonName;
+    @NotNull(message = "身份证号码不能为空")
+    private  String  IdCardNum;
+    @NotNull(message = "请选择性别")
+    private String gender;
+    @NotNull(message = "请上传身份证正面照")
+    private String idCardPositivePhoto;//身份证正面照
+    @NotNull(message = "请上传身份证反面照")
+    private String idCardBackPhoto;//身份证反面照
+    @NotNull(message = "请正确填写身份证过期时间")
+    private Date idCardDeadTime;
+    @NotNull(message = "请选择企业认证类型")
+    private ArrayList<Integer> roleList;
+
+//    @NotNull(message = "评测能力不可为空")
+    private List<String> evaluationAgencyAbilityList;
+//    @NotNull(message = "机构资源不可为空")
+    private List<AgencyResourceCommand> evaluationAgencyResourceList;
+
     public EvaluationAgency toAgency(){
+        String reg = "\\d{15}(\\d{2}[0-9xX])?";
+        if(!IdCardNum.matches(reg)){
+            throw new HttpBadRequestException("身份证信息不合法");
+        }
         EvaluationAgency agency = UserFactory.defaultAgency();
         BeanUtils.copyProperties(this, agency, "evaluationAgencyAbilityList", "evaluationAgencyResourceList");
-        agency.setEvaluationAgencyAbilityList(this.evaluationAgencyAbilityList.stream().map(EvaluationAgencyAbility::new).collect(Collectors.toList()));
-        agency.setEvaluationAgencyResourceList(this.evaluationAgencyResourceList.stream().map(AgencyResourceCommand::toAgencyResource).collect(Collectors.toList()));
+        if( this.evaluationAgencyAbilityList != null&&this.evaluationAgencyAbilityList.size() > 0 ){
+            agency.setEvaluationAgencyAbilityList(this.evaluationAgencyAbilityList.stream().map(EvaluationAgencyAbility::new).collect(Collectors.toList()));
+
+        }
+        if( this.evaluationAgencyResourceList != null&&this.evaluationAgencyResourceList.size() > 0){
+            agency.setEvaluationAgencyAbilityList(this.evaluationAgencyAbilityList.stream().map(EvaluationAgencyAbility::new).collect(Collectors.toList()));
+            agency.setEvaluationAgencyResourceList(this.evaluationAgencyResourceList.stream().map(AgencyResourceCommand::toAgencyResource).collect(Collectors.toList()));
+        }
+        agency.setType(JSONObject.toJSONString(this.roleList));
         agency.setIsDeleted(0);
         agency.setIsAuthentication(0);
         return agency;

+ 20 - 9
site/src/main/java/com/mooctest/crowd/site/command/ApplyEnterpriseAuthCommand.java

@@ -1,11 +1,16 @@
 package com.mooctest.crowd.site.command;
 
+import com.alibaba.fastjson.JSONObject;
 import com.mooctest.crowd.domain.domainobject.EnterpriseAuthentication;
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 import org.springframework.beans.BeanUtils;
 
 import javax.validation.constraints.NotNull;
+import java.sql.Date;
 import java.sql.Timestamp;
+import java.util.ArrayList;
 
 /**
  * @author: Diors.Po
@@ -13,29 +18,35 @@ import java.sql.Timestamp;
  * @date 2019-08-28 01:20
  */
 @Data
+@AllArgsConstructor
+@NoArgsConstructor
 public class ApplyEnterpriseAuthCommand {
 
+//    private String isDaOrEa;
+
+    @NotNull(message = "请选择认证研发机构或者评测机构")
+    private ArrayList<Integer> roleList;
     @NotNull(message = "企业法人姓名不可为空")
     private String legalPersonName;
     @NotNull(message = "请上传营业执照")
     private String businessLicensePhoto;
     @NotNull(message = "身份证号不可为空")
-    private String IDCardNum;
+    private String idCardNum;
     @NotNull(message = "地址不可为空")
     private String address;
     @NotNull(message = "请选择性别")
-    private String sex;//2.0新加性别
-//    @NotNull(message = "请上传身份证正面照")
-    private String IDCardPositivePhoto;//身份证正面照
-//    @NotNull(message = "请上传身份证反面照")
-    private String IDCardBackPhoto;//身份证反面照
-//    @NotNull(message = "请正确填写身份证过期时间")
-    private Timestamp IDCardDeadTime;
-
+    private String gender;
+    @NotNull(message = "请上传身份证正面照")
+    private String idCardPositivePhoto;//身份证正面照
+    @NotNull(message = "请上传身份证反面照")
+    private String idCardBackPhoto;//身份证反面照
+    @NotNull(message = "请正确填写身份证过期时间")
+    private Date idCardDeadTime;
 
     public EnterpriseAuthentication toEnterpriseAuth() {
         EnterpriseAuthentication enterpriseAuthentication = new EnterpriseAuthentication();
         BeanUtils.copyProperties(this, enterpriseAuthentication);
+        enterpriseAuthentication.setType(JSONObject.toJSONString(this.roleList));
         enterpriseAuthentication.setApplyTime(new Timestamp(System.currentTimeMillis()));
         return enterpriseAuthentication;
     }

+ 25 - 16
site/src/main/java/com/mooctest/crowd/site/command/ApplyPersonalAuthCommand.java

@@ -1,13 +1,16 @@
 package com.mooctest.crowd.site.command;
 
+import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.mooctest.crowd.domain.domainobject.PersonalAuthentication;
+import com.mooctest.crowd.domain.exception.HttpBadRequestException;
 import lombok.Data;
 import org.springframework.beans.BeanUtils;
 
 import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Pattern;
+import java.sql.Date;
 import java.sql.Timestamp;
+import java.util.List;
 
 /**
  * @author: Diors.Po
@@ -17,37 +20,43 @@ import java.sql.Timestamp;
 @Data
 public class ApplyPersonalAuthCommand {
 
-    private String  userId;
-
     @NotNull(message = "请填写真实姓名")
     private String realName;
 
-//    @NotNull(message = "请选择性别")
-    private String sex;
+    @NotNull(message = "请选择性别")
+    private String gender;
 
-    @JsonProperty(value = "IDCard")
+    @JsonProperty(value = "idCard")
     @NotNull(message = "请填写身份证号码")
-    @Pattern(regexp = "\\d{15}(\\d{2}[0-9xX])?", message = "身份证号格式错误")
-    private String IDCard;
+//    @Pattern(regexp = "\\d{15}(\\d{2}[0-9xX])?", message = "身份证号格式错误")
+    private String idCard;
 
-    @JsonProperty(value = "IDCardPositivePhoto")
+    @JsonProperty(value = "idCardPositivePhoto")
     @NotNull(message = "请上传身份证正面图片")
-    private String IDCardPositivePhoto;
+    private String idCardPositivePhoto;
 
-    @JsonProperty(value = "IDCardBackPhoto")
-//    @NotNull(message = "请上传身份证反面图片")
-    private String IDCardBackPhoto;
+    @JsonProperty(value = "idCardBackPhoto")
+    @NotNull(message = "请上传身份证反面图片")
+    private String idCardBackPhoto;
 
-    @JsonProperty(value = "IDCardDeadTime")
-//    @NotNull(message = "请正确填写身份证过期时间")
-    private Timestamp IDCardDeadTime;
+    @JsonProperty(value = "idCardDeadTime")
+    @NotNull(message = "请正确填写身份证过期时间")
+    private Date idCardDeadTime;
 
     @NotNull(message = "请填写单位或者家庭地址")
     private String address;
 
+    @NotNull(message = "请选择个人认证类型")
+    private List<Integer> roleList;
+
     public PersonalAuthentication toPersonalAuth() {
+        String reg = "\\d{15}(\\d{2}[0-9xX])?";
+        if(!idCard.matches(reg)){
+            throw new HttpBadRequestException("身份证信息不合法");
+        }
         PersonalAuthentication personalAuthentication = new PersonalAuthentication();
         BeanUtils.copyProperties(this, personalAuthentication);
+        personalAuthentication.setType(JSONObject.toJSONString(this.roleList));
         personalAuthentication.setApplyTime(new Timestamp(System.currentTimeMillis()));
         return personalAuthentication;
     }

+ 1 - 1
site/src/main/java/com/mooctest/crowd/site/command/CrowdTestProjectCommand.java

@@ -31,7 +31,7 @@ public class CrowdTestProjectCommand {
     @NotNull(message = "项目应用类型不可为空")
     private String platform;
 
-    @NotNull(message = "项目服务类型不可为空")
+//    @NotNull(message = "项目服务类型不可为空")
     private ArrayList<String> type;
 
 //    @NotNull(message = "项目描述不可为空")

+ 2 - 0
site/src/main/java/com/mooctest/crowd/site/command/CrowdTestTaskCommand.java

@@ -2,6 +2,7 @@ package com.mooctest.crowd.site.command;
 
 import com.mooctest.crowd.domain.domainobject.CrowdTestTask;
 import lombok.Data;
+import org.springframework.beans.BeanUtils;
 
 import javax.validation.constraints.NotNull;
 import java.sql.Timestamp;
@@ -52,6 +53,7 @@ public class CrowdTestTaskCommand {
 
     public CrowdTestTask toCrowdTask(){
         CrowdTestTask crowdTestTask = new CrowdTestTask();
+        BeanUtils.copyProperties(this, crowdTestTask);
         crowdTestTask.setName(name);
         crowdTestTask.setDeadTime(datetime);
         crowdTestTask.setDescription(desc);

+ 16 - 0
site/src/main/java/com/mooctest/crowd/site/command/TestCommand.java

@@ -0,0 +1,16 @@
+package com.mooctest.crowd.site.command;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Author: xuexb
+ * @Date: 2019.7.5 14:24
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class TestCommand {
+    private String mobileNum;
+}

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

@@ -12,7 +12,13 @@ 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;
 
+    public static final Integer TEST = 3;
+
     public static final Integer DEFAULT_RECOURSE_ROWS_ON_PAGE = 7;
 }

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

@@ -1,6 +1,5 @@
 package com.mooctest.crowd.site.controller;
 
-import com.alibaba.druid.sql.visitor.functions.Bin;
 import com.mooctest.crowd.domain.exception.BaseException;
 import com.mooctest.crowd.site.annotation.LoginRequired;
 import com.mooctest.crowd.site.annotation.SysAdminRequired;
@@ -12,12 +11,11 @@ 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;
 import com.mooctest.crowd.site.util.DataUtils;
-import lombok.extern.java.Log;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
@@ -25,8 +23,6 @@ import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.http.HttpSession;
-import javax.validation.constraints.Pattern;
 import java.util.List;
 
 /**
@@ -140,35 +136,48 @@ public class AgencyController extends BaseSearchController {
      */
     @LoginRequired
     @RequestMapping(value = "/user/{userId}/agency", method = RequestMethod.GET)
-    public AgencyVO getAgencyInfo(@PathVariable("userId") Long userId) {
-        return agencyService.getAgencyDetails(userId);
+    public ResponseVO getAgencyInfo(@PathVariable("userId") Long userId) {
+        return new ResponseVO(ServerCode.SUCCESS ,agencyService.getDetailById(userId));
+    }
+
+    /**
+     * 获取机构认证简单的信息
+     *
+     * @param userId
+     * @return
+     */
+    @LoginRequired
+    @RequestMapping(value = "/user/{userId}/agency/common", method = RequestMethod.GET)
+    public ResponseVO getAgencyInfoCommon(@PathVariable("userId") Long userId) {
+        return new ResponseVO(ServerCode.SUCCESS ,agencyService.getAgencyInfoCommon(userId));
     }
 
     @RequestMapping(value = "/agency/list", method = RequestMethod.GET)
-    public List<EvolutionAgencyVO> getAgencyList() {
+    public List<EvaluationAgencyVO> getAgencyList() {
         return agencyService.getAgencyList();
     }
 
 
-    @RequestMapping(value = "/agency/list/more", method = RequestMethod.GET)
+    @RequestMapping(value = "/agency/list/more", method = RequestMethod.POST)
     public ResponseVO getMoreAgencyList(@RequestBody SearchConditionVO searchConditionVO) {
         Pageable pageable = this.getPageable(searchConditionVO);
-        List<EvolutionAgencyVO> list = agencyService.findMoreAgencyVO();
-        Page<EvolutionAgencyVO> page = DataUtils.listToPage(list, pageable);
+        String keyword = searchConditionVO.getKeyword();
+        List<EvaluationAgencyVO> list = agencyService.findMoreAgencyVO(keyword);
+        Page<EvaluationAgencyVO> page = DataUtils.listToPage(list, pageable);
         return new ResponseVO(ServerCode.SUCCESS, page);
     }
 
 
-    @RequestMapping(value = "resident/agency/more", method = RequestMethod.GET)
+    @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)
     public ResponseVO getAgencyDetails(@PathVariable("agencyId") long agencyId) {
 
-        EvolutionAgencyVO agencyVO = agencyService.getDetailById(agencyId);
+        EvaluationAgencyVO agencyVO = agencyService.getDetailById(agencyId);
         return new ResponseVO(ServerCode.SUCCESS, agencyVO);
     }
 

ファイルの差分が大きいため隠しています
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/controller/CommonController.java


+ 17 - 19
site/src/main/java/com/mooctest/crowd/site/controller/CrowTestSquareController.java

@@ -1,9 +1,9 @@
 package com.mooctest.crowd.site.controller;
 
 import com.mooctest.crowd.site.data.dto.CrowdTestSquareIndexDTO;
-import com.mooctest.crowd.site.data.dto.ProjectAndTaskDTO;
 import com.mooctest.crowd.site.data.response.ResponseVO;
 import com.mooctest.crowd.site.data.response.ServerCode;
+import com.mooctest.crowd.site.data.vo.CrowdProjectVO;
 import com.mooctest.crowd.site.data.vo.CrowdTaskVO;
 import com.mooctest.crowd.site.data.vo.CrowdTestProjectVO;
 import com.mooctest.crowd.site.data.vo.SearchConditionVO;
@@ -17,11 +17,7 @@ import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
 
 
 /**
@@ -52,11 +48,12 @@ public class CrowTestSquareController extends BaseSearchController {
     @GetMapping("/list")
     public ResponseVO getAll() {
         CrowdTestSquareIndexDTO crowdTestSquareIndexDTO = new CrowdTestSquareIndexDTO();
-        List<CrowdTestProjectVO> list = crowdProjectService.findAll();
+        List<CrowdTestProjectVO> list = crowdProjectService.findIndexProject();
         List<CrowdTaskVO> crowdTestTasks = crowdTaskService.findAll();
-        crowdTestSquareIndexDTO.setCrowdTestProjectVOs(list);
-        crowdTestSquareIndexDTO.setCrowdTestTaskVOS(crowdTestTasks);
-        crowdTestSquareIndexDTO.initHotTaskAndProject();
+        crowdTestSquareIndexDTO.setCrowdTestProjectVOs(list);//众测项目
+        crowdTestSquareIndexDTO.setCrowdTestTaskVOS(crowdTestTasks);//众测任务
+        crowdTestSquareIndexDTO.setHotCrowdTaskVOs(crowdTaskService.findMoreHotTasks());//热门任务
+        crowdTestSquareIndexDTO.setHotCrowdTestProjectVOs(crowdProjectService.findAllMoreHotProjects());//热门项目
         return new ResponseVO(ServerCode.SUCCESS, crowdTestSquareIndexDTO);
     }
 
@@ -69,35 +66,36 @@ public class CrowTestSquareController extends BaseSearchController {
         return crowdTestSquareService.findByNameLike(searchConditionVO);
     }
 
+
     /**
-     * 获取更多热门项目
+     * 更多热门项目列表
      *
      * @param searchConditionVO
      * @return
      */
 
-    @GetMapping("hotProject/list/more")
-    public ResponseVO findMoreHotProjects(@RequestBody SearchConditionVO searchConditionVO) {
+    @PostMapping("/hotProject/list")
+    public ResponseVO findMoreHotProjectLists(@RequestBody SearchConditionVO searchConditionVO) {
         Pageable pageable = this.getPageable(searchConditionVO);
-        List<CrowdTestProjectVO> crowdTestProjectVOList = crowdProjectService.findAllMoreHotProjects();
-        Page<CrowdTestProjectVO> projectVOPage = DataUtils.listToPage(crowdTestProjectVOList, pageable);
+        List<CrowdProjectVO> crowdTestProjectVOList = crowdProjectService.findAllMoreHotProjectList(searchConditionVO.getKeyword());
+        Page<CrowdProjectVO> projectVOPage = DataUtils.listToPage(crowdTestProjectVOList, pageable);
         return new ResponseVO(ServerCode.SUCCESS, projectVOPage);
     }
 
+
     /**
-     * 获取更多热门任务
+     * 更多热门任务列表
      *
      * @param searchConditionVO
      * @return
      */
 
-    @GetMapping("hotTasks/list/more")
-    public ResponseVO findMoreHotTasks(@RequestBody SearchConditionVO searchConditionVO) {
+    @PostMapping("/hotTasks/list")
+    public ResponseVO findMoreHotTasksList(@RequestBody SearchConditionVO searchConditionVO) {
         Pageable pageable = this.getPageable(searchConditionVO);
-        List<CrowdTaskVO> crowdTestProjectVOList = crowdTaskService.findMoreHotTasks();
+        List<CrowdTaskVO> crowdTestProjectVOList = crowdTaskService.findMoreHotTasksList(searchConditionVO.getKeyword());
         Page<CrowdTaskVO> taskVOPage = DataUtils.listToPage(crowdTestProjectVOList, pageable);
         return new ResponseVO(ServerCode.SUCCESS, taskVOPage);
-
     }
 
 

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

@@ -28,7 +28,7 @@ import java.util.List;
  */
 @Slf4j
 @RestController
-public class CrowdProjectController {
+public class CrowdProjectController{
 
     @Autowired
     private CrowdProjectService projectService;
@@ -39,14 +39,17 @@ public class CrowdProjectController {
      * @param result
      * @return
      */
-    @RequestMapping(value = "/api/project", method = RequestMethod.POST)
-    public ProjectDetailsDTO createProject(@Validated @RequestBody CrowdTestProjectCommand crowdTestProjectCommand, BindingResult result){
-        if (result.hasErrors())
+    @RequestMapping(value = "/api/project/", method = RequestMethod.POST)
+    public ProjectDetailsDTO createProject(@Validated @RequestBody CrowdTestProjectCommand crowdTestProjectCommand, BindingResult result,HttpSession session){
+        long  userId=Long.parseLong((String) session.getAttribute("userId"));
+
+        if (result.hasErrors()) {
             throw new BaseException(result.getFieldErrors().toString());
+        }
         else if (!crowdTestProjectCommand.isLegal())
             throw new BaseException("信息不合法,项目可见性必须选择指定的市");
 //            throw new BaseException("信息不合法,项目可见性存在问题");
-        return projectService.createCrowdProject(crowdTestProjectCommand);
+        return projectService.createCrowdProject(crowdTestProjectCommand,userId);
     }
 
     /**
@@ -124,6 +127,7 @@ public class CrowdProjectController {
         } catch (IOException e) {
             e.printStackTrace();
         }
+        System.out.println("excel");
         return projectService.generateProjectByExcel(userId, file);
     }
 
@@ -198,6 +202,10 @@ public class CrowdProjectController {
         return projectService.modifyAllData();
     }
 
+    /**
+     * 获取平台总体数据
+     * @return
+     */
     @RequestMapping(value = "/api/allproject", method = RequestMethod.GET)
     public  List<CrowdTestProject>  getByProject(){
         return projectService.getByProject();

+ 4 - 4
site/src/main/java/com/mooctest/crowd/site/controller/CrowdTaskController.java

@@ -23,16 +23,16 @@ import javax.servlet.http.HttpSession;
 @Slf4j
 @RestController
 @RequestMapping("/api")
-public class CrowdTaskController {
+public class CrowdTaskController{
 
     @Autowired
     private CrowdTaskService taskService;
 
     @RequestMapping(value = "/project/{projectCode}/task/{taskCode}", method = RequestMethod.GET)
     public TaskDetailsDTO getTask(@PathVariable("projectCode") String projectCode, @PathVariable("taskCode") String taskCode, HttpSession session){
-//        Object user = session.getAttribute("userId");
-//        if (user == null)
-//            return taskService.getTaskDetails(projectCode, taskCode, null);
+        Object user = session.getAttribute("userId");
+        if (user == null)
+            return taskService.getTaskDetails(projectCode, taskCode, null);
         Long userId = Long.parseLong((String)session.getAttribute("userId"));
         return taskService.getTaskDetails(projectCode, taskCode, userId);
     }

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

@@ -11,7 +11,6 @@ import org.codehaus.jettison.json.JSONException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-
 @RestController
 @RequestMapping("/api/personal")
 public class PersonalDataController {
@@ -39,6 +38,11 @@ public class PersonalDataController {
         return  personalDataService.addQualification(userId,qualificationVO);
     }
 
+    @RequestMapping(value = "/displayone/{id:\\d+}", method = RequestMethod.GET)
+    public QualificationDTO displayOneQualification(@PathVariable("id") long id){
+        return  personalDataService.getOne(id);
+    }
+
     @RequestMapping(value = "/updatequalification/{id:\\d+}/{userId:\\d+}", method = RequestMethod.PUT)
     public QualificationDTO updateQualification(@PathVariable("id") long id, @PathVariable("userId") long userId,@RequestBody QualificationVO qualificationVO){
         return  personalDataService.updateQualification(id,userId,qualificationVO);
@@ -63,4 +67,9 @@ public class PersonalDataController {
     public BankCardDTO deleteBankCard(@PathVariable("id") long id, @PathVariable("userId") long userId){
         return  personalDataService.deleteBankCard(id,userId);
     }
+
+    @RequestMapping(value = "/banktype", method = RequestMethod.GET)
+    public BankCardDTO displayBankType(){
+        return  personalDataService.getBankType();
+    }
 }

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

@@ -70,7 +70,7 @@ public class TechnicalArticlesController extends BaseSearchController{
         return  technical.updateRanking(id);
     }
 
-    @RequestMapping(value = "/morearticles", method = RequestMethod.POST)
+    @RequestMapping(value = "/more", method = RequestMethod.POST)
     public ResponseVO<TechnicalArticlesDTO> moreArticles(@RequestBody SearchConditionVO searchConditionVO){
         Map<String, String> extraCondition = searchConditionVO.getColumnFilters()==null? new HashMap<>() :super.getExtraCondition(searchConditionVO);
         Pageable pageable = this.getMore(searchConditionVO);

+ 26 - 23
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
@@ -35,7 +35,7 @@ import java.util.Map;
  */
 @RestController
 @RequestMapping("/api")
-public class UserController extends BaseController {
+public class UserController extends BaseController{
     @Autowired
     private PersonalAuthService personalAuthService;
     @Autowired
@@ -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));
+    }
+
     /**
      * 修改密码
      */
@@ -143,14 +148,13 @@ public class UserController extends BaseController {
                                                       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());
+//        LOG.info("当前用户申请的认证信息为" + command);
+//        if (result.hasErrors())
+//            throw new BaseException(result.getFieldError().getDefaultMessage());
         return userService.applyPersonalAuth(userId, command);
     }
 
 
-
     /**
      * 修改个人认证信息
      *
@@ -233,14 +237,15 @@ public class UserController extends BaseController {
      * @return
      */
     @LoginRequired
-    @RequestMapping(value = "/user/{userId}/enterpriseAuth", method = RequestMethod.POST)
-    public EnterpriseAuthVO applyEnterpriseAuth(@PathVariable("userId") Long userId,
-                                                @Validated @RequestBody ApplyEnterpriseAuthCommand command,
-                                                BindingResult result, HttpSession session) {
-        if (!userId.equals(Long.parseLong((String) session.getAttribute("userId"))))
-            throw new UnauthorizedException("没有权限对他人账号进行操作!");
-        if (result.hasErrors())
-            throw new BaseException(result.getFieldError().getDefaultMessage());
+    @PostMapping(value = "/user/{userId}/enterpriseAuth")
+    public EnterpriseAuthVO test(@PathVariable("userId") Long userId,
+                                 @Validated @RequestBody ApplyEnterpriseAuthCommand command,
+                                 BindingResult result, HttpSession session){
+//        if (!userId.equals(Long.parseLong((String) session.getAttribute("userId"))))
+//            throw new UnauthorizedException("没有权限对他人账号进行操作!");
+//        if (result.hasErrors())
+//            throw new BaseException(result.getFieldError().getDefaultMessage());
+        System.out.println(command);
         return userService.applyEnterpriseAuth(userId, command);
     }
 
@@ -303,18 +308,16 @@ public class UserController extends BaseController {
 
     /**
      * 用户所在地
+     *
      * @param request
      * @return
      */
-    @RequestMapping(value = "index/address",method = RequestMethod.GET)
-    public Area getAddressByIp(HttpServletRequest request) throws UnsupportedEncodingException {
-
-         String ip=DataUtils.getClientIp(request);
-         LOG.info("ip地址是========"+ip);
-          Area   area= AddressUtils.getProvinceName(ip);
-         return  area;
-
-
+    @RequestMapping(value = "index/address", method = RequestMethod.GET)
+    public Area getAddressByIp(HttpServletRequest request) throws UnsupportedEncodingException{
+        String ip = DataUtils.getClientIp(request);
+        LOG.info("ip地址是========" + ip);
+        Area area = AddressUtils.getProvinceName(ip);
+        return area;
     }
 
 }

+ 7 - 1
site/src/main/java/com/mooctest/crowd/site/controller/advice/ExceptionAdvice.java

@@ -47,7 +47,13 @@ public class ExceptionAdvice {
             return "领域不存在";
         } else if (e instanceof ResourceNoExistException){
             return "资源不存在";
-        } else
+        } else if (e instanceof UserTaskCountNoExistException) {
+            return "当前用户没有参与接包";
+        } else if (e instanceof HaveNotAgencyAuthException){
+            return "您未认证为接包用户,请认证后操作。";
+        } else if (e instanceof HaveNotPartAuthException){
+            return "您未认证为发包用户,请认证后操作。";
+        }  else
             return e.getMessage();
     }
 

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

@@ -1,6 +1,7 @@
 package com.mooctest.crowd.site.data.dto;
 
 import com.mooctest.crowd.site.data.vo.BankCardVO;
+import com.mooctest.crowd.site.data.vo.BankLogoVO;
 import lombok.Data;
 
 import java.util.List;
@@ -9,4 +10,5 @@ import java.util.List;
 public class BankCardDTO {
     private BankCardVO bankCardVO;
     private List<BankCardVO> bankCardVOList;
+    private List<BankLogoVO>  bankLogoVOList;
 }

+ 0 - 23
site/src/main/java/com/mooctest/crowd/site/data/dto/CrowdTestSquareIndexDTO.java

@@ -1,9 +1,5 @@
 package com.mooctest.crowd.site.data.dto;
 
-import com.mooctest.crowd.domain.domainobject.CrowdTestProjectStatus;
-import com.mooctest.crowd.domain.domainobject.CrowdTestTaskStatus;
-import com.mooctest.crowd.domain.model.CrowdTestProjectPO;
-import com.mooctest.crowd.domain.model.CrowdTestTaskPO;
 import com.mooctest.crowd.site.data.vo.CrowdTaskVO;
 import com.mooctest.crowd.site.data.vo.CrowdTestProjectVO;
 import lombok.Data;
@@ -27,23 +23,4 @@ public class CrowdTestSquareIndexDTO {
     private List<CrowdTestProjectVO> hotCrowdTestProjectVOs;
     //热门任务
     private List<CrowdTaskVO> hotCrowdTaskVOs;
-
-
-    /**
-     * 初始化热门任务 ,热门项目
-     */
-    public void initHotTaskAndProject(){
-        List<CrowdTestProjectVO> projectVOS = this.crowdTestProjectVOs;
-
-        this.crowdTestProjectVOs = projectVOS.subList(0, 6);
-
-        //根据参与人数和创建时间进行排序
-        List<CrowdTestProjectVO> list1 = projectVOS.stream().sorted(Comparator.comparing(CrowdTestProjectVO::getJoinCount).reversed()).collect(Collectors.toList());
-        //截取前七条
-        this.hotCrowdTestProjectVOs = list1.subList(0, 7);
-        List<CrowdTaskVO> tasklist1 = crowdTestTaskVOS.subList(0, 6);
-        List<CrowdTaskVO> tasklist2 = crowdTestTaskVOS.stream().sorted(Comparator.comparing(CrowdTaskVO::getAcceptedCount).reversed()).collect(Collectors.toList());
-        this.hotCrowdTaskVOs = tasklist2.subList(0, 7);
-        this.crowdTestTaskVOS = tasklist1;
-    }
 }

+ 16 - 0
site/src/main/java/com/mooctest/crowd/site/data/dto/DataDTO.java

@@ -0,0 +1,16 @@
+package com.mooctest.crowd.site.data.dto;
+
+import com.mooctest.crowd.domain.domainobject.CrowdTestProject;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Author: xuexb
+ * @Date: 2019.7.15 20:15
+ */
+@Data
+public class DataDTO {
+    private List<CrowdTestProject> projectList;
+    private List<UserDataDTO> userDataList;
+}

+ 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;
 }

+ 1 - 1
site/src/main/java/com/mooctest/crowd/site/data/dto/MyCrowdDTO.java

@@ -20,8 +20,8 @@ public class MyCrowdDTO implements Serializable {
     private List<CrowdProjectVO> myProjects;
     private List<CrowdProjectVO> handlingProjects;
     private List<CrowdProjectVO> acceptableProjects;
+    private List<CrowdProjectVO> finishedProjects;
     private Long myProjectNoticeCount;
     private Long processProjectNoticeCount;
     private Long acceptableProjectNoticeCount;
-
 }

+ 0 - 1
site/src/main/java/com/mooctest/crowd/site/data/dto/QualificationDTO.java

@@ -9,5 +9,4 @@ import java.util.List;
 public class QualificationDTO {
     private QualificationVO qualificationVO;
     private List<QualificationVO> qualificationVOList;
-
 }

+ 20 - 0
site/src/main/java/com/mooctest/crowd/site/data/dto/UserDataDTO.java

@@ -0,0 +1,20 @@
+package com.mooctest.crowd.site.data.dto;
+
+import com.mooctest.crowd.domain.domainobject.CrowdTestTask;
+import com.mooctest.crowd.site.data.vo.CrowdProjectDataVO;
+import com.mooctest.crowd.site.data.vo.UserVO;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Author: xuexb
+ * @Date: 2019.7.15 20:15
+ */
+@Data
+public class UserDataDTO {
+    private UserVO userVO;
+    private List<CrowdTestTask> unfinishedTasks;
+    private List<CrowdTestTask> finishedTasks;
+    private List<CrowdProjectDataVO> myProjects;
+}

+ 7 - 5
site/src/main/java/com/mooctest/crowd/site/data/enums/RoleType.java

@@ -1,7 +1,6 @@
 package com.mooctest.crowd.site.data.enums;
 
 import lombok.AllArgsConstructor;
-import lombok.Data;
 import lombok.NoArgsConstructor;
 
 /**
@@ -13,11 +12,14 @@ import lombok.NoArgsConstructor;
 @NoArgsConstructor
 public enum RoleType {
 
-    GENERAL_USER(1L, "generalUser"),
-    AGENCY(2L, "evaluationAgency"),
+    GENERAL_USER(1L, "generalUser"),        // 注册后的普通用户
+    AGENCY(2L, "evaluationAgency"),         // 注册为测评机构接包
     REGIONAL_MANAGER(3L, "RegionalManager"),
-    SYSTEM_ADMIN(4L, "SystemAdministrator"),
-    ENTERPRISE_USER(5L, "enterpriseUser");
+    SYSTEM_ADMIN(4L, "RegionalManager"),
+    ENTERPRISE_USER(5L, "enterpriseUser"),
+    EVALUATION_USER(6L, "evaluationUser"),  // 注册为测评用户接包
+    PARTY_USER(7L, "partyUser"),            // 注册为发包用户发包
+    PARTY_AGENCY(8L, "partyAgency");        // 注册为发包机构
 
     private Long id;
     private String name;

+ 34 - 0
site/src/main/java/com/mooctest/crowd/site/data/vo/AgencyDetailVO.java

@@ -0,0 +1,34 @@
+package com.mooctest.crowd.site.data.vo;
+
+import com.mooctest.crowd.domain.domainobject.EvaluationAgency;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.beans.BeanUtils;
+
+import java.sql.Timestamp;
+
+/**
+ * @author: Diors.Po
+ * @Email: 171256175@qq.com
+ * @date 2019-08-12 02:59
+ */
+@Data
+@NoArgsConstructor
+public class AgencyDetailVO {
+    private String evaluationAgencyName;
+    private String address;
+    private String agencyPhoto;
+    private Integer isAuthentication;
+    private Long taskCount;
+    private StatusVO authStatus;
+    private String legalPersonName;
+    private Timestamp checkTime;
+    private Double allTaskPrice;
+
+
+    public AgencyDetailVO(EvaluationAgency agency) {
+        BeanUtils.copyProperties(agency, this);
+        this.authStatus = new StatusVO();
+        this.authStatus.initAuthStatus(this.isAuthentication);
+    }
+}

+ 16 - 1
site/src/main/java/com/mooctest/crowd/site/data/vo/AgencyVO.java

@@ -1,11 +1,13 @@
 package com.mooctest.crowd.site.data.vo;
 
+import com.alibaba.fastjson.JSONArray;
 import com.mooctest.crowd.domain.domainobject.EvaluationAgency;
 import com.mooctest.crowd.domain.domainobject.EvaluationAgencyAbility;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import org.springframework.beans.BeanUtils;
 
+import java.sql.Date;
 import java.sql.Timestamp;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -20,19 +22,28 @@ import java.util.stream.Collectors;
 public class AgencyVO {
     private Long userId;
     private String evaluationAgencyName;
-    private String bankAccount;
     private String address;
     private List<String> evaluationAgencyAbilityList;
     private List<AgencyResourceVO> evaluationAgencyResourceList;
     private String agencyPhoto;
     private Integer isAuthentication;
     private String explain;
+    private Long taskCount;
     private int isDeleted;
+    private String businessLicensePhoto;
     private Timestamp updateTime;
     private Timestamp expireTime;
     private Timestamp createTime;
     private StatusVO authStatus;
     private Timestamp applyTime;
+    private List<String> roleList;
+    private String IdCardNum;
+    private String legalPersonName;
+    private Long id;
+    private String gender;
+    private String idCardPositivePhoto;//身份证正面照
+    private String idCardBackPhoto;//身份证反面照
+    private Date idCardDeadTime;
 
 
     public AgencyVO(EvaluationAgency agency){
@@ -46,6 +57,10 @@ public class AgencyVO {
             this.setEvaluationAgencyResourceList(agency.getEvaluationAgencyResourceList()
                     .stream().map(AgencyResourceVO::new).collect(Collectors.toList()));
         }
+
+        if(agency.getType() != null && agency.getType() !=  ""){
+            this.roleList = (List<String>) JSONArray.parse(agency.getType());
+        }
         this.authStatus = new StatusVO();
         this.authStatus.initAuthStatus(this.isAuthentication);
     }

+ 4 - 2
site/src/main/java/com/mooctest/crowd/site/data/vo/ApplicationTypeVO.java

@@ -20,12 +20,14 @@ public class ApplicationTypeVO implements Serializable {
     private String name;
     private Long count;
     private String image;
+    private String introduction;
     private List<TestTypeVO> testTypeList;
 
-    public ApplicationTypeVO(ApplicationType applicationType){
+    public ApplicationTypeVO(ApplicationType applicationType) {
         code = applicationType.getCode();
         name = applicationType.getName();
         image = applicationType.getImage();
-        count=applicationType.getCount();
+        count = applicationType.getCount();
+        introduction = applicationType.getIntroduction();
     }
 }

+ 0 - 1
site/src/main/java/com/mooctest/crowd/site/data/vo/BankCardVO.java

@@ -14,5 +14,4 @@ public class BankCardVO {
     private String code;
     private Long userId;
     private String logoUrl;
-
 }

+ 1 - 7
site/src/main/java/com/mooctest/crowd/site/data/vo/BankLogoVO.java

@@ -4,16 +4,10 @@ import com.mooctest.crowd.domain.domainobject.BankLogo;
 import lombok.Data;
 
 
-
 @Data
 public class BankLogoVO {
+    private Long id;
     private String name;
     private  String logoUrl;
     private String code;
-
-    public BankLogoVO(BankLogo bankLogo){
-        code = bankLogo.getCode();
-        name = bankLogo.getName();
-        logoUrl=bankLogo.getLogoUrl();
-    }
 }

+ 26 - 0
site/src/main/java/com/mooctest/crowd/site/data/vo/CrowdProjectDataVO.java

@@ -0,0 +1,26 @@
+package com.mooctest.crowd.site.data.vo;
+
+
+import com.mooctest.crowd.domain.domainobject.CrowdTestProject;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @Author: xuexb
+ * @Date: 2019.7.15 20:41
+ */
+@Data
+@NoArgsConstructor
+public class CrowdProjectDataVO implements Serializable {
+
+    private String code;
+    private String name;
+
+    public CrowdProjectDataVO(CrowdTestProject crowdTestProject){
+        this.code = crowdTestProject.getCode();
+        this.name = crowdTestProject.getName();
+    }
+
+}

+ 2 - 1
site/src/main/java/com/mooctest/crowd/site/data/vo/CrowdProjectVO.java

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.google.common.collect.Lists;
 import com.mooctest.crowd.domain.domainobject.CrowdTestProject;
 import com.mooctest.crowd.domain.domainobject.CrowdTestProjectStatus;
+import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -20,6 +21,7 @@ import java.util.Map;
  */
 @Data
 @NoArgsConstructor
+@AllArgsConstructor
 public class CrowdProjectVO implements Serializable {
 
     private String id;
@@ -105,6 +107,5 @@ public class CrowdProjectVO implements Serializable {
             this.statusVO.setText("已截止");
             this.statusVO.setStyle("warning");
         }
-
     }
 }

+ 3 - 0
site/src/main/java/com/mooctest/crowd/site/data/vo/CrowdReportVO.java

@@ -21,6 +21,9 @@ public class CrowdReportVO {
     private String file;
     private String conclusion;
     private String target;
+    private  boolean Updated;//是否可以修改
+
+
 
     public CrowdReportVO(CrowdTestReport report){
         BeanUtils.copyProperties(report, this);

+ 0 - 2
site/src/main/java/com/mooctest/crowd/site/data/vo/CrowdTestProjectVO.java

@@ -48,8 +48,6 @@ public class CrowdTestProjectVO   {
     private String time_interval;
 
 
-
-
     public CrowdTestProjectVO(CrowdTestProject crowdTestProject) {
         id = crowdTestProject.getId();
         code = crowdTestProject.getCode();

+ 15 - 9
site/src/main/java/com/mooctest/crowd/site/data/vo/EnterpriseAuthVO.java

@@ -1,10 +1,13 @@
 package com.mooctest.crowd.site.data.vo;
 
+import com.alibaba.fastjson.JSONArray;
 import com.mooctest.crowd.domain.domainobject.EnterpriseAuthentication;
 import lombok.Data;
 import org.springframework.beans.BeanUtils;
 
+import java.sql.Date;
 import java.sql.Timestamp;
+import java.util.List;
 
 /**
  * @author: Diors.Po
@@ -15,28 +18,31 @@ import java.sql.Timestamp;
 public class EnterpriseAuthVO {
     private Long id;
     private Long userId;
-
+    private String enterpriseName;
+    private String idCardNum;//身份证号码
     private String legalPersonName;
     private String businessLicensePhoto;
     private String unifiedSocialCreditCode;
-    private String bankAccount;
-    private String sex;//2.0新加性别
-    private  String  IDcardPositivePhoto;//身份证正面照
-    private   String IDCardBackPhoto;//身份证反面照
+    private String gender;//2.0新加性别
+    private String idCardPositivePhoto;//身份证正面照
+    private String idCardBackPhoto;//身份证反面照
     private String address;
     private int isDeleted;
-    private Integer isAuthentication;
+    private int isAuthentication;
     private String explain;
     private Timestamp applyTime;
     private Timestamp checkTime;
+    private Date idCardDeadTime;//身份证过期时间
     private StatusVO authStatus;
-   private Timestamp  IDCardDeadTime;//身份证过期时间
-
+    private List<String> type;
 
 
-    public EnterpriseAuthVO(EnterpriseAuthentication authentication){
+    public EnterpriseAuthVO(EnterpriseAuthentication authentication) {
         BeanUtils.copyProperties(authentication, this);
         this.authStatus = new StatusVO();
         authStatus.initAuthStatus(this.isAuthentication);
+        if(authentication.getType() != null && authentication.getType() !=  ""){
+            this.type = (List<String>) JSONArray.parse(authentication.getType());
+        }
     }
 }

+ 73 - 0
site/src/main/java/com/mooctest/crowd/site/data/vo/EvaluationAgencyVO.java

@@ -0,0 +1,73 @@
+package com.mooctest.crowd.site.data.vo;
+
+import com.alibaba.fastjson.JSONArray;
+import com.mooctest.crowd.domain.domainobject.EvaluationAgency;
+import com.mooctest.crowd.domain.domainobject.EvaluationAgencyAbility;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.beans.BeanUtils;
+
+import java.io.Serializable;
+import java.sql.Date;
+import java.sql.Timestamp;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @Author: xuexb
+ * @Date: 2019.7.17 10:12
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class EvaluationAgencyVO implements Serializable {
+
+    private Long userId;
+    private String evaluationAgencyName;
+    private String address;
+    private List<String> evaluationAgencyAbilityList;
+    private List<AgencyResourceVO> evaluationAgencyResourceList;
+    private String agencyPhoto;
+    private Integer isAuthentication;
+    private String explain;
+    private Long taskCount;
+    private int isDeleted;
+    private String businessLicensePhoto;
+    private Timestamp updateTime;
+    private Timestamp expireTime;
+    private Timestamp createTime;
+    private StatusVO authStatus;
+    private Timestamp applyTime;
+    private List<String> roleList;
+    private String IdCardNum;
+    private String legalPersonName;
+    private Long id;
+    private String gender;
+    private String idCardPositivePhoto;//身份证正面照
+    private String idCardBackPhoto;//身份证反面照
+    private Date idCardDeadTime;
+    private Timestamp checkTime;
+    private Double allTaskPrice;
+
+
+
+    public EvaluationAgencyVO(EvaluationAgency agency) {
+        BeanUtils.copyProperties(agency, this, "evaluationAgencyResourceList", "evaluationAgencyAbilityList");
+
+        if(agency.getEvaluationAgencyAbilityList() != null && agency.getEvaluationAgencyAbilityList().size() > 0){
+            this.setEvaluationAgencyAbilityList(agency.getEvaluationAgencyAbilityList()
+                    .stream().map(EvaluationAgencyAbility::getAbilityName).collect(Collectors.toList()));
+        }
+        if(agency.getEvaluationAgencyResourceList() != null && agency.getEvaluationAgencyResourceList().size() > 0){
+            this.setEvaluationAgencyResourceList(agency.getEvaluationAgencyResourceList()
+                    .stream().map(AgencyResourceVO::new).collect(Collectors.toList()));
+        }
+
+        if(agency.getType() != null && agency.getType() !=  ""){
+            this.roleList = (List<String>) JSONArray.parse(agency.getType());
+        }
+        this.authStatus = new StatusVO();
+        this.authStatus.initAuthStatus(this.isAuthentication);
+    }
+}

+ 0 - 44
site/src/main/java/com/mooctest/crowd/site/data/vo/EvolutionAgencyVO.java

@@ -1,44 +0,0 @@
-package com.mooctest.crowd.site.data.vo;
-
-import com.mooctest.crowd.domain.domainobject.EvaluationAgency;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-/**
- * @Author: xuexb
- * @Date: 2019.7.17 10:12
- */
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class EvolutionAgencyVO implements Serializable {
-
-    private Long id;
-    private Long userId;
-    private String agencyPhoto;
-    private String evaluationAgencyName;
-    private Double allTaskPrice;
-    private Long taskCount;
-    private String address;
-    private Timestamp updateTime;
-    private Timestamp expireTime;
-    private Timestamp checkTime;
-    private Timestamp applyTime;
-
-
-
-    public EvolutionAgencyVO(EvaluationAgency evaluationAgency){
-        id = evaluationAgency.getId();
-        agencyPhoto = evaluationAgency.getAgencyPhoto();
-        evaluationAgencyName = evaluationAgency.getEvaluationAgencyName();
-        userId = evaluationAgency.getUserId();
-        updateTime=evaluationAgency.getUpdateTime();
-        expireTime=evaluationAgency.getExpireTime();
-        checkTime=evaluationAgency.getCheckTime();
-        applyTime=evaluationAgency.getApplyTime();
-    }
-}

+ 2 - 0
site/src/main/java/com/mooctest/crowd/site/data/vo/ExpertVO.java

@@ -13,11 +13,13 @@ public class ExpertVO {
     private String name;
     private String photo;
     private String introduction;
+    private String title;
 
     public ExpertVO(Expert expert){
         id = expert.getId();
         name = expert.getName();
         photo = expert.getPhoto();
         introduction = expert.getIntroduction();
+        title = expert.getTitle();
     }
 }

+ 2 - 0
site/src/main/java/com/mooctest/crowd/site/data/vo/FieldVO.java

@@ -17,9 +17,11 @@ import java.io.Serializable;
 public class FieldVO implements Serializable {
     private String code;
     private String name;
+    private String introduction;
 
     public FieldVO(Field field){
         code = field.getCode();
         name = field.getName();
+        introduction = field.getIntroduction();
     }
 }

+ 1 - 1
site/src/main/java/com/mooctest/crowd/site/data/vo/FullStatusVO.java

@@ -28,7 +28,7 @@ public class FullStatusVO {
             this.setStyle("warning");
         } else if (status.equals(AuthenticationStatus.isNotAuthenticated)) {
             this.setText("认证失败");
-            this.setStyle("info");
+            this.setStyle("danger");
         }
     }
 }

+ 16 - 13
site/src/main/java/com/mooctest/crowd/site/data/vo/PersonalAuthVO.java

@@ -1,11 +1,14 @@
 package com.mooctest.crowd.site.data.vo;
 
+import com.alibaba.fastjson.JSONArray;
 import com.mooctest.crowd.domain.domainobject.PersonalAuthentication;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import org.springframework.beans.BeanUtils;
 
+import java.sql.Date;
 import java.sql.Timestamp;
+import java.util.List;
 
 /**
  * @author: Diors.Po
@@ -16,10 +19,9 @@ import java.sql.Timestamp;
 @NoArgsConstructor
 public class PersonalAuthVO {
 
+    private Long userId;
     private String realName;
-    private String IDCard;
-    private String IDCardPhoto;
-    private String bankAccount;
+    private String idCard;
     private String address;
     private int isDeleted;
     private Integer isAuthentication;
@@ -27,19 +29,20 @@ public class PersonalAuthVO {
     private Timestamp applyTime;
     private Timestamp checkTime;
     private StatusVO authStatus;
-    private String IDCardPositivePhoto;//身份证正面照片
-    private String IDCardBackPhoto;//身份证反面照片
-    private  String sex;
+    private String idCardPositivePhoto;//身份证正面照片
+    private String idCardBackPhoto;//身份证反面照片
+    private Date idCardDeadTime;//身份证过期时间
+    private String gender;
+    private List<String> roleList;
 
-    public PersonalAuthVO(PersonalAuthentication personalAuthentication){
+    public PersonalAuthVO(PersonalAuthentication personalAuthentication) {
         BeanUtils.copyProperties(personalAuthentication, this);
+
+        if(personalAuthentication.getType() != null && personalAuthentication.getType() !=  ""){
+            this.roleList = (List<String>) JSONArray.parse(personalAuthentication.getType());
+        }
         this.authStatus = new StatusVO();
         this.authStatus.initAuthStatus(this.isAuthentication);
-    }
-
-
-
-
-
 
+    }
 }

+ 6 - 10
site/src/main/java/com/mooctest/crowd/site/data/vo/ResidentAgencyVO.java

@@ -1,33 +1,29 @@
 package com.mooctest.crowd.site.data.vo;
 
 import com.mooctest.crowd.domain.domainobject.ResidentAgency;
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
 /**
  * @author guochao
  * @date 2019/7/6 17:54
  */
 @Data
+@NoArgsConstructor
+@AllArgsConstructor
 public class ResidentAgencyVO {
     private Long id;
     private Long agencyId;
     private Long userId;
-    private long   taskCount;
+    private long taskCount;
     private String address;
+    private String agencyPhoto;
     private  String name;//机构名称
 
-
-
-
     public ResidentAgencyVO(ResidentAgency residentAgency){
         id = residentAgency.getId();
         agencyId = residentAgency.getAgencyId();
         userId = residentAgency.getUserId();
-
-    }
-
-
-    public  ResidentAgencyVO(){
-
     }
 }

+ 12 - 2
site/src/main/java/com/mooctest/crowd/site/data/vo/ResourceVO.java

@@ -26,10 +26,11 @@ public class ResourceVO implements Serializable {
     private String unitWork;
     private String standard;
     private String unit;
-    private int state;
+    private String state;
     private Timestamp startTime;
     private String personnel;
     private String remarks;
+    private StatusVO statusVO;
 
     public ResourceVO(Resource resource){
         code = resource.getCode();
@@ -42,9 +43,18 @@ public class ResourceVO implements Serializable {
         unitWork=resource.getUnitWork();
         standard=resource.getStandard();
         unit=resource.getUnit();
-        state=resource.getState();
         startTime=resource.getStartTime();
         personnel=resource.getPersonnel();
         remarks=resource.getRemarks();
+        if(resource.getState()==0){
+            this.setState("空闲");
+        }else if(resource.getState()==1){
+            this.setState("占用");
+        }else if(resource.getState()==2){
+            this.setState("可用");
+        }else if(resource.getState()==3){
+            this.setState("故障");
+        }
     }
+
 }

+ 1 - 1
site/src/main/java/com/mooctest/crowd/site/data/vo/StatusVO.java

@@ -29,7 +29,7 @@ public class StatusVO {
             this.setStyle("warning");
         } else if (status.equals(AuthenticationStatus.isNotAuthenticated)){
             this.setText("认证失败");
-            this.setStyle("info");
+            this.setStyle("danger");
         }
     }
 

+ 2 - 0
site/src/main/java/com/mooctest/crowd/site/data/vo/TestTypeVO.java

@@ -17,9 +17,11 @@ import java.io.Serializable;
 public class TestTypeVO implements Serializable {
     private String code;
     private String name;
+    private String introduction;
 
     public TestTypeVO(TestType testType){
         code = testType.getCode();
         name = testType.getName();
+        introduction = testType.getIntroduction();
     }
 }

+ 19 - 0
site/src/main/java/com/mooctest/crowd/site/data/vo/UserTaskCountVO.java

@@ -0,0 +1,19 @@
+package com.mooctest.crowd.site.data.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author guochao
+ * @date 2019/7/6 17:54
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class UserTaskCountVO {
+    private Long id;
+    private Long userId;
+    private Long count;
+    private Long type;
+}

+ 4 - 7
site/src/main/java/com/mooctest/crowd/site/data/vo/UserVO.java

@@ -1,7 +1,5 @@
 package com.mooctest.crowd.site.data.vo;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 import com.mooctest.crowd.domain.domainobject.Account;
 import com.mooctest.crowd.domain.domainobject.User;
 import com.mooctest.crowd.domain.model.UserPO;
@@ -12,6 +10,7 @@ import org.springframework.beans.BeanUtils;
 
 import java.io.Serializable;
 import java.sql.Date;
+import java.util.List;
 
 /**
  * @Author: xuexb
@@ -28,25 +27,23 @@ public class UserVO implements Serializable {
     private String email;
     private String mobile;
     private String password;
-    @JsonIgnore
     private String province;
-    @JsonIgnore
     private String city;
     private String photoUrl;
     private Double allProjectPrice;
     private String authType;
     private Long taskCount;
     private Date birthday;
-    private String personalCompetence;
+    private List<String> personalCompetence;
+    private List<String> personAbilities;
     private String unit;
     private String county;
     private String address;
 
 
-
     public UserVO(User user) {
         BeanUtils.copyProperties(user, this);
-        this.address=this.province+this.city;
+        this.address = this.province + this.city;
         this.password = "********";
         if (user.getEvaluationAgency() != null) {
             this.authType = "agency";

+ 46 - 25
site/src/main/java/com/mooctest/crowd/site/mediator/ViewMediator.java

@@ -5,37 +5,39 @@ 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.ApplyEnterpriseAuthCommand;
+import com.mooctest.crowd.site.command.ApplyPersonalAuthCommand;
 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
  * @Date: 2019.7.16 20:25
  */
 public interface ViewMediator {
+    List<CrowdTestProjectVO> crowdTestProjects();
+
+    List<CrowdTaskVO> findIndexTask();
 
-    List<UserVO> renderMoreUser(Pageable pageable);
+    void saveEnterpriseRole(User user, ApplyEnterpriseAuthCommand applyEnterpriseAuthCommand);
 
+    void saveUserRole(User user, ApplyPersonalAuthCommand command);
+
+    List<UserVO> renderMoreUser(Pageable pageable, String keyword);
 
 
     List<CrowdTaskVO> findMoreHotTasks();
+
     List<CrowdTestProjectVO> findMoreHotProjects();
 
     EnterpriseAuthVO getEnterpriseAuthByUserId(Long userId);
+
     PersonalAuthVO getByUserId(Long userId);
 
     UserDTO loginByMobileAndPwd(LoginCommand cmd) throws PasswordErrorException, AccountNotExistException, BadRequestException;
@@ -44,10 +46,14 @@ public interface ViewMediator {
 
     IndexDTO renderIndex();
 
+    IndexInfoDTO renderIndexInfosCache();
+
     IndexInfoDTO renderIndexInfos();
 
     MyCrowdDTO renderMyCrowd(Long userId);
 
+    UserDataDTO renderMyCrowdData(Long userId);
+
     TaskSquareDTO renderTaskSquare();
 
     ProjectDetailsDTO renderProjectDetails(CrowdTestProject project, User user);
@@ -62,23 +68,30 @@ public interface ViewMediator {
 
     List<RegionalManagerVO> renderRegionManagerList();
 
-    List<EvolutionAgencyVO> renderAgencyList();
+    List<EvaluationAgencyVO> renderAgencyList();
 
     List<BaseAuthVO> renderAuthingList();
 
     List<BaseAuthVO> renderAuthedList();
 
     // 项目模糊查询
-    List<CrowdTestProjectVO>     findByNameLike(String name);
+    List<CrowdTestProjectVO> findByNameLike(String name);
 
     //任务模糊查询
-    List<CrowdTaskVO>  findTaskByNameLike(String name);
+    List<CrowdTaskVO> findTaskByNameLike(String name);
+
+
+    List<CrowdTestProjectVO> AllByPage();
 
+    //热门项目
+    List<CrowdTestProjectVO> hotCrowdTestProjects();
 
 
-    List<CrowdTestProjectVO>   crowdTestProjects();
+    List<CrowdTestProjectVO> indexCrowdTestProjects();
 
-    List<CrowdTaskVO>    crowdTaskVos();
+    List<CrowdTaskVO> crowdTaskVos();
+
+    List<CrowdTaskVO> crowdTaskVosWaitingAccept();
 
     UserDTO getInformation(long userId);
 
@@ -86,23 +99,31 @@ public interface ViewMediator {
 
     QualificationDTO getQualification(long userId);
 
-    QualificationDTO addQualification(long userId,QualificationVO qualificationVO);
+    QualificationDTO addQualification(long userId, QualificationVO qualificationVO);
 
-    QualificationDTO updateQualification(long id,long userId,QualificationVO qualificationVO);
+    QualificationDTO updateQualification(long id, long userId, QualificationVO qualificationVO);
 
-    QualificationDTO deleteQualification(long id,long userId);
+    QualificationDTO deleteQualification(long id, long userId);
 
     BankCardDTO getBankCard(long userId);
 
-    BankCardDTO addBankCard(long userId,BankCardVO bankCardVO) throws JSONException;
+    BankCardDTO addBankCard(long userId, BankCardVO bankCardVO) throws JSONException;
 
-    BankCardDTO deleteBankCard(long id,long userId);
+    BankCardDTO deleteBankCard(long id, long userId);
 
-    TechnicalArticlesDTO  updateRanking(long id);
+    TechnicalArticlesDTO updateRanking(long id);
 
-    List<ResourceVO>  getResource();
+    List<ResourceVO> getResource();
 
     ResourceVO getResourceDetailed(String code);
 
-    List<ResourceVO>  getSearchResource(String name);
+    List<ResourceVO> getSearchResource(String name);
+
+    QualificationDTO getOne(long id);
+
+    BankCardDTO getBankType();
+
+    List<CrowdTestProjectVO> crowdTestProjectsWaitingAccept();
+
+    List<UserTaskCountVO> getCount();
 }

+ 19 - 2
site/src/main/java/com/mooctest/crowd/site/mediator/impl/OperationMediatorImpl.java

@@ -1,15 +1,20 @@
 package com.mooctest.crowd.site.mediator.impl;
 
 import com.mooctest.crowd.domain.domainobject.CrowdTestProject;
+import com.mooctest.crowd.domain.repository.CommonRepo;
 import com.mooctest.crowd.domain.repository.CrowdTestProjectRepo;
 import com.mooctest.crowd.site.command.CrowdTestProjectCommand;
 import com.mooctest.crowd.site.data.dto.ProjectDetailsDTO;
 import com.mooctest.crowd.site.data.vo.CrowdProjectVO;
 import com.mooctest.crowd.site.mediator.OperationMediator;
+import com.mooctest.crowd.site.service.ThemeSchedulerService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @author: Diors.Po
@@ -21,6 +26,12 @@ public class OperationMediatorImpl implements OperationMediator {
 
     @Autowired
     private CrowdTestProjectRepo projectRepo;
+    
+    @Autowired
+    private CommonRepo commonRepo;
+
+    @Autowired
+    private ThemeSchedulerService themeSchedulerService;
 
     @Override
     public ProjectDetailsDTO createCrowdProject(CrowdTestProjectCommand command) {
@@ -32,14 +43,20 @@ public class OperationMediatorImpl implements OperationMediator {
     }
 
     @Override
-    public CrowdTestProject updateProject(CrowdTestProject project, CrowdTestProjectCommand crowdTestProjectCommand) {
-        CrowdTestProject updateProject = crowdTestProjectCommand.toCrowdProject();
+    public CrowdTestProject updateProject(CrowdTestProject project, CrowdTestProjectCommand command) {
+        command.setField(commonRepo.getFieldCodeByFieldName(command.getField()));
+        command.setPlatform(commonRepo.getApplicationCodeByName(command.getPlatform()));
+        List<String> typeCodeList = command.getType().stream().map(s -> commonRepo.getTypeCodeByName(s)).collect(Collectors.toList());
+        command.setType((ArrayList<String>) typeCodeList);
+        themeSchedulerService.cancelThemeScheduler(project);
+        CrowdTestProject updateProject = command.toCrowdProject();
         updateProject.setId(project.getId());
         updateProject.setCode(project.getCode());
         updateProject.setStatus(project.getStatus());
         if(updateProject.getCreateTime() == null){
             updateProject.setCreateTime(new Timestamp(System.currentTimeMillis()));
         }
+        themeSchedulerService.createNewThemeScheduler(updateProject);
         return updateProject;
     }
 }

ファイルの差分が大きいため隠しています
+ 509 - 188
site/src/main/java/com/mooctest/crowd/site/mediator/impl/WebMediatorImpl.java


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

@@ -4,8 +4,9 @@ import com.mooctest.crowd.site.command.AgencyResourceAbilityUpdateCommand;
 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.AgencyDetailVO;
 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 +17,9 @@ import java.util.List;
  */
 public interface AgencyService {
 
-    EvolutionAgencyVO   getDetailById(long agencyId);
+    EvaluationAgencyVO getDetailById(long agencyId);
 
-    List<EvolutionAgencyVO> findMoreAgencyVO();
+    List<EvaluationAgencyVO> findMoreAgencyVO(String keyword);
 
     UserDTO applyAgency(Long userId, ApplyAgencyAuthCommand command);
 
@@ -30,11 +31,13 @@ public interface AgencyService {
 
     AgencyVO upadteResourceAndAbility(Long userId, AgencyResourceAbilityUpdateCommand command);
 
-    List<EvolutionAgencyVO> getAgencyList();
+    List<EvaluationAgencyVO> getAgencyList();
 
     AgencyVO passAuth(Long userId);
 
     AgencyVO rejectAuth(Long userId, String explain);
 
     AgencyVO getAgencyDetails(Long userId);
+
+    AgencyDetailVO getAgencyInfoCommon(Long userId);
 }

+ 11 - 0
site/src/main/java/com/mooctest/crowd/site/service/AuthCheckService.java

@@ -0,0 +1,11 @@
+package com.mooctest.crowd.site.service;
+
+
+import com.mooctest.crowd.domain.domainobject.User;
+
+public interface AuthCheckService {
+
+    Boolean isAgency(User user);
+
+    Boolean isPart(User user);
+}

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません