|
|
@@ -10,7 +10,6 @@ import com.mooctest.crowd.site.data.dto.ProjectDetailsDTO;
|
|
|
import com.mooctest.crowd.site.data.vo.RegionalManagerVO;
|
|
|
import com.mooctest.crowd.site.service.CrowdProjectService;
|
|
|
import com.mooctest.crowd.site.util.FileUtil;
|
|
|
-import lombok.extern.java.Log;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
@@ -18,7 +17,6 @@ import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
import java.io.IOException;
|
|
|
import java.util.List;
|
|
|
@@ -141,18 +139,33 @@ public class CrowdProjectController {
|
|
|
* 区域管理员接收项目
|
|
|
* @param projectCode
|
|
|
* @param userId
|
|
|
+ * @return
|
|
|
*/
|
|
|
@LoginRequired
|
|
|
- @RequestMapping(value = "/api/project/{projectCode}/regionManager/{userId}")
|
|
|
- public void acceptProject(@PathVariable("projectCode") String projectCode, @PathVariable("userId") Long userId){
|
|
|
- projectService.receiveProject(projectCode, userId);
|
|
|
+ @RequestMapping(value = "/api/project/{projectCode}/regionManager/{userId}", method = RequestMethod.PUT)
|
|
|
+ public ProjectDetailsDTO acceptProject(@PathVariable("projectCode") String projectCode, @PathVariable("userId") Long userId){
|
|
|
+ return projectService.receiveProject(projectCode, userId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @LoginRequired
|
|
|
+ @RequestMapping(value = "/api/project/{projectCode}/status/rejected", method = RequestMethod.PUT)
|
|
|
+ public void rejectProejct(@PathVariable("projectCode") String projectCode, HttpSession session){
|
|
|
+ Long userId = Long.parseLong((String)session.getAttribute("userId"));
|
|
|
+ projectService.rejectProject(projectCode, userId);
|
|
|
}
|
|
|
|
|
|
@LoginRequired
|
|
|
- @RequestMapping(value = "/api/project/{projectCode}/status/reject")
|
|
|
- public void rejectProejct(@PathVariable("proejctCode") String projectCode, HttpSession session){
|
|
|
+ @RequestMapping(value = "/api/project/{projectCode}/status/committed", method = RequestMethod.PUT)
|
|
|
+ public ProjectDetailsDTO commitProject(@PathVariable("projectCode") String projectCode, HttpSession session){
|
|
|
Long userId = Long.parseLong((String)session.getAttribute("userId"));
|
|
|
+ return projectService.commitProject(projectCode, userId);
|
|
|
+ }
|
|
|
|
|
|
+ @LoginRequired
|
|
|
+ @RequestMapping(value = "/api/project/{projectCode}/status/finished", method = RequestMethod.PUT)
|
|
|
+ public ProjectDetailsDTO confirmFinished(@PathVariable("projectCode") String projectCode, HttpSession session){
|
|
|
+ Long userId = Long.parseLong((String)session.getAttribute("userId"));
|
|
|
+ return projectService.confirmFinished(projectCode, userId);
|
|
|
}
|
|
|
|
|
|
/**
|