|
@@ -19,7 +19,9 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 【模拟考成绩】Controller
|
|
@@ -100,4 +102,34 @@ public class ScoreInfoController extends BaseController{
|
|
|
){
|
|
|
return toResponse(scoreInfoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取预测成功
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/forecastScore")
|
|
|
+ @ApiOperation("获取预测成绩")
|
|
|
+ public Response<Integer> getInfo(){
|
|
|
+ ScoreInfo scoreInfo = new ScoreInfo();
|
|
|
+ scoreInfo.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
|
+ int forecastScore = scoreInfoService.getForecastScore(scoreInfo);
|
|
|
+// Map<String,Object> map = new HashMap<String,Object>();
|
|
|
+// map.put("forecastScore",forecastScore);
|
|
|
+ return Response.success(forecastScore);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取预测成功
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/avgScore")
|
|
|
+ @ApiOperation("获取平均成绩")
|
|
|
+ public Response<Integer> getAvgScore(){
|
|
|
+ ScoreInfo scoreInfo = new ScoreInfo();
|
|
|
+ scoreInfo.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|
|
|
+ int aveScore = scoreInfoService.getAveScore(scoreInfo);
|
|
|
+// Map<String,Object> map = new HashMap<String,Object>();
|
|
|
+// map.put("forecastScore",forecastScore);
|
|
|
+ return Response.success(aveScore);
|
|
|
+ }
|
|
|
}
|