Commit 19b4f820 authored by Ryan Loong's avatar Ryan Loong

fix 点名次数限定不正确 && fix 点名不增加次数的bug && update 修改开发环境日志级别

parent 538214f1
......@@ -7,7 +7,8 @@ import cn.zhxu.bs.bean.SearchBean;
@SearchBean(
tables = "(select * from student_info where deleted = false) st left join (select * from class_info where deleted = false) cl on cl.id = st.class_id",
autoMapTo = "st",
ignoreFields = { "incrementColumnsInfoMap" }
ignoreFields = { "incrementColumnsInfoMap" },
orderBy = "rand()"
)
public class StudentVo extends StudentInfo {
......
......@@ -104,7 +104,6 @@ public class StudentInfoService {
.field(StudentVo::getDeleted, StudentInfo.NOT_DELETED).op(Equal.class)
.field(StudentVo::getClassId, classId).op(Equal.class)
.field(StudentVo::getCallTimes, maxCall).op(LessThan.class)
.orderBy("random()")
.build());
}
......
......@@ -104,6 +104,8 @@ public class StudentPointService {
studentPoint.setAddTime(now);
studentPoint.setDeleted(false);
studentPointInfoMapper.insert(studentPoint);
studentInfoService.increaseCallTimeByPrimaryKey(studentPoint.getStudentId());
return "add OK";
}
......
logging:
level:
cn.zhxu.bs: info
cn.zhxu.bs: debug
pagehelper:
helperDialect: mysql
......
......@@ -39,7 +39,7 @@ public class StudentController {
}
@GetMapping("randomSelect")
public Object randomSelect(@RequestParam Integer classId, @RequestParam Integer maxCall) {
public Object randomSelect(@RequestParam Integer classId, @Nullable @RequestParam Integer maxCall) {
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