|
|
@@ -0,0 +1,33 @@
|
|
|
+package com.seecoder.dataanalysis.controller;
|
|
|
+
|
|
|
+import com.seecoder.dataanalysis.analysis.DevcloudScoreService;
|
|
|
+import com.seecoder.dataanalysis.vo.ResponseVO;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author Peng Yiyan
|
|
|
+ * @since 2022/09/03
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@CrossOrigin
|
|
|
+@RequestMapping("/devcloudScore")
|
|
|
+public class DevcloudScoreController {
|
|
|
+ private final DevcloudScoreService devcloudScoreService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ public DevcloudScoreController(DevcloudScoreService devcloudScoreService){
|
|
|
+ this.devcloudScoreService = devcloudScoreService;
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/getGroupScore")
|
|
|
+ public ResponseVO getGroupScore(@RequestParam(value = "user_id") int user_id){
|
|
|
+ return ResponseVO.buildSuccess(devcloudScoreService.getGroupScore(user_id));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("getStudentScore")
|
|
|
+ public ResponseVO getStudentScore(@RequestParam(value = "user_id") int user_id){
|
|
|
+ return ResponseVO.buildSuccess(devcloudScoreService.getStudentScore(user_id));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|