Commit d3f39338 authored by Ryan Loong's avatar Ryan Loong

update 分数统计增加最大和最小分的限制

parent 9448718c
...@@ -11,6 +11,7 @@ import org.springframework.util.StringUtils; ...@@ -11,6 +11,7 @@ import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Nullable;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
...@@ -34,10 +35,10 @@ public class PointController { ...@@ -34,10 +35,10 @@ public class PointController {
StorageService storageService; StorageService storageService;
@GetMapping("selectPoint") @GetMapping("selectPoint")
public Object selectPoint(@RequestParam String studentName, @RequestParam String studentUniqueId, @RequestParam Integer classId, @RequestParam String startTime, @RequestParam String endTime, public Object selectPoint(@RequestParam @Nullable String studentName, @RequestParam @Nullable String studentUniqueId, @RequestParam @Nullable Integer classId, @RequestParam @Nullable String startTime, @RequestParam @Nullable String endTime,
@RequestParam(required = false, defaultValue = "1") Integer page, @RequestParam(required = false, defaultValue = "10") Integer limit, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer limit,
@RequestParam(required = false, defaultValue = "addTime") String sort, @RequestParam(required = false, defaultValue = "desc") String order, @RequestParam( defaultValue = "addTime") String sort, @RequestParam(defaultValue = "desc") String order,
@RequestParam Integer min, @RequestParam Integer max) { @RequestParam @Nullable Integer min, @RequestParam @Nullable Integer max) {
studentUniqueId = StringUtils.isEmpty(studentUniqueId) ? null : studentUniqueId; studentUniqueId = StringUtils.isEmpty(studentUniqueId) ? null : studentUniqueId;
studentName = StringUtils.isEmpty(studentName) ? null : studentName; studentName = StringUtils.isEmpty(studentName) ? null : studentName;
startTime = StringUtils.isEmpty(startTime) ? null : startTime; startTime = StringUtils.isEmpty(startTime) ? null : startTime;
...@@ -47,8 +48,8 @@ public class PointController { ...@@ -47,8 +48,8 @@ public class PointController {
@GetMapping("export") @GetMapping("export")
public Object export(@RequestParam String studentName, @RequestParam String studentUniqueId, @RequestParam Integer classId, @RequestParam String startTime, @RequestParam String endTime, public Object export(@RequestParam String studentName, @RequestParam String studentUniqueId, @RequestParam Integer classId, @RequestParam String startTime, @RequestParam String endTime,
@RequestParam(required = false, defaultValue = "addTime") String sort, @RequestParam(required = false, defaultValue = "desc") String order, @RequestParam(defaultValue = "addTime") String sort, @RequestParam(defaultValue = "desc") String order,
@RequestParam Integer min, @RequestParam Integer max) { @RequestParam @Nullable Integer min, @RequestParam @Nullable Integer max) {
studentUniqueId = StringUtils.isEmpty(studentUniqueId) ? null : studentUniqueId; studentUniqueId = StringUtils.isEmpty(studentUniqueId) ? null : studentUniqueId;
studentName = StringUtils.isEmpty(studentName) ? null : studentName; studentName = StringUtils.isEmpty(studentName) ? null : studentName;
startTime = StringUtils.isEmpty(startTime) ? null : startTime; startTime = StringUtils.isEmpty(startTime) ? null : startTime;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment