Kaynağa Gözat

项目 参数与额外说明

Reiskuchen 5 yıl önce
ebeveyn
işleme
c65dddb6ff

+ 12 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ParticipationController.java

@@ -5,6 +5,7 @@ import com.management.platform.service.ParticipationService;
 import com.management.platform.util.HttpRespMsg;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
@@ -23,13 +24,22 @@ public class ParticipationController {
     @Autowired
     private ParticipationService participationService;
 
+    /**
+     * 获取参加某项目的所有参与者id
+     * projectId 项目id
+     */
     @RequestMapping("/get")
-    public HttpRespMsg getParticipation(Integer projectId, HttpServletRequest request) {
+    public HttpRespMsg getParticipation(@RequestParam Integer projectId, HttpServletRequest request) {
         return participationService.getParticipation(projectId, request);
     }
 
+    /**
+     * 编辑某个项目的参与者id
+     * projectId 项目id
+     * userId 用户id数组
+     */
     @RequestMapping("/edit")
-    public HttpRespMsg editParticipation(Integer projectId, String[] userId, HttpServletRequest request) {
+    public HttpRespMsg editParticipation(@RequestParam Integer projectId, String[] userId, HttpServletRequest request) {
         return participationService.editParticipation(projectId, userId, request);
     }
 }