guo00guo пре 5 година
родитељ
комит
afd87ea362

+ 0 - 6
core/pom.xml

@@ -35,12 +35,6 @@
             <version>1.6.4</version>
         </dependency>
         <!--定位-->
-<!--        <dependency>-->
-<!--            <groupId>com.maxmind.geoip</groupId>-->
-<!--            <artifactId>geoip-api</artifactId>-->
-<!--            <version>1.3.1</version>-->
-<!--        </dependency>-->
-
         <dependency>
             <groupId>org.jsoup</groupId>
             <artifactId>jsoup</artifactId>

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

@@ -1092,6 +1092,10 @@ public class WebMediatorImpl implements ViewMediator {
         ProjectOperationControl operationControl = new ProjectOperationControl();
         if (user == null)
             return operationControl;
+        if(project.getStatus() == CrowdTestProjectStatus.HAS_TIME_OUT){
+            return operationControl;
+        }
+
         //需求提出者和系统管理员视角
         if (project.getUserId().equals(user.getId()) || user.getRoleList().stream().anyMatch(role -> role.getName().equals("SystemAdministrator"))) {
             if (project.getStatus() < CrowdTestProjectStatus.HAS_RECEIVED) {
@@ -1103,7 +1107,7 @@ public class WebMediatorImpl implements ViewMediator {
         //区域管理员视角
         if (user.getRoleList().stream().anyMatch(role -> role.getName().equals("RegionalManager"))) {
             if ((project.getProjectDistributionTypeId() == 0 && project.getRegionalManagerId().equals(user.getId()))
-                    || (project.getProjectDistributionTypeId() > 0 && project.getStatus() >= CrowdTestProjectStatus.HAS_RECEIVED && project.getRegionalManagerId().equals(user.getId()))) {
+                    || ((project.getProjectDistributionTypeId() > 0 && project.getStatus() >= CrowdTestProjectStatus.HAS_RECEIVED) && project.getRegionalManagerId().equals(user.getId()))) {
                 if (project.getStatus() == CrowdTestProjectStatus.HAS_RELEASED) {
                     operationControl.setReceive(true);
                     operationControl.setReject(true);
@@ -1145,6 +1149,10 @@ public class WebMediatorImpl implements ViewMediator {
         TaskOperationControl taskOperationControl = new TaskOperationControl();
         if (user == null)
             return taskOperationControl;
+        if(task.getStatus() == CrowdTestTaskStatus.HAS_TIME_OUT){
+            return taskOperationControl;
+        }
+
         //区域管理员或系统管理员视角
         if (user.getRoleList().stream().anyMatch(role -> role.getName().equals("SystemAdministrator"))
                 || (user.getRegionalManager() != null && user.getId().equals(project.getRegionalManagerId()))) {

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

@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: dev-localhost
+    active: dev-pre
   cache:
     guava:
       spec: expireAfterWrite=30s
@@ -147,7 +147,7 @@ website:
 spring:
   profiles: pre
   datasource:
-    url: jdbc:mysql://101.37.175.111:3306/crowd-test-service?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://101.37.175.111:3306/crowd-test-service-pre?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
     username: mooctest
     password: secr3t!
   redis:

+ 16 - 26
site/src/test/java/com/mooctest/crowd/site/SiteApplicationTests.java

@@ -1,26 +1,16 @@
-package com.mooctest.crowd.site;
-
-import com.mooctest.crowd.domain.dao.*;
-import com.mooctest.crowd.domain.domainobject.EvaluationAgency;
-import com.mooctest.crowd.domain.model.*;
-import com.mooctest.crowd.site.data.vo.EvolutionAgencyVO;
-import com.mooctest.crowd.site.service.AgencyService;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-import java.awt.*;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class SiteApplicationTests {
-@Autowired
-private AgencyService agencyService;
-
-
-}
+//package com.mooctest.crowd.site;
+//
+//import com.mooctest.crowd.site.service.AgencyService;
+//import org.junit.runner.RunWith;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.test.context.SpringBootTest;
+//import org.springframework.test.context.junit4.SpringRunner;
+//
+//@RunWith(SpringRunner.class)
+//@SpringBootTest
+//public class SiteApplicationTests {
+//    @Autowired
+//    private AgencyService agencyService;
+//
+//
+//}