Commit ab6afd25 authored by Ryan Loong's avatar Ryan Loong

update 点名接口

parent 2d335dc2
......@@ -100,18 +100,15 @@ public class StudentInfoService {
* @return
*/
@Transactional(rollbackFor = Exception.class)
public StudentVo selectStudentInfo(Integer classId, Integer maxCall) {
StudentVo record = beanSearcher.searchFirst(StudentVo.class, MapUtils.builder()
public List<StudentVo> selectStudentInfo(Integer classId, Integer maxCall) {
return beanSearcher.searchAll(StudentVo.class, MapUtils.builder()
.field(StudentVo::getDeleted, StudentInfo.NOT_DELETED).op(Equal.class)
.field(StudentVo::getClassId, classId).op(Equal.class)
.field(StudentVo::getCallTimes, maxCall).op(LessThan.class)
.build());
increaseCallTime(record);
return record;
}
/**
/**
* 更新数据
* @param studentInfo
* @return
......
......@@ -38,8 +38,11 @@ public class StudentController {
return ResponseUtil.ok(studentInfoService.selectStudentInfoByWeb(studentName, studentUniqueId, null, classId, page, limit, sort, order, minCall, maxCall));
}
@GetMapping("randomSelect")
public Object randomSelect(@RequestParam Integer classId, @Nullable @RequestParam Integer maxCall) {
@GetMapping("pointList")
public Object pointList(@RequestParam Integer classId, @Nullable @RequestParam Integer maxCall) {
if (Objects.nonNull(maxCall) && maxCall <= 0) {
return ResponseUtil.badArgumentValue();
}
return ResponseUtil.ok(studentInfoService.selectStudentInfo(classId, maxCall));
}
......
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