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; ...@@ -7,7 +7,8 @@ import cn.zhxu.bs.bean.SearchBean;
@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", 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", autoMapTo = "st",
ignoreFields = { "incrementColumnsInfoMap" } ignoreFields = { "incrementColumnsInfoMap" },
orderBy = "rand()"
) )
public class StudentVo extends StudentInfo { public class StudentVo extends StudentInfo {
......
...@@ -104,7 +104,6 @@ public class StudentInfoService { ...@@ -104,7 +104,6 @@ public class StudentInfoService {
.field(StudentVo::getDeleted, StudentInfo.NOT_DELETED).op(Equal.class) .field(StudentVo::getDeleted, StudentInfo.NOT_DELETED).op(Equal.class)
.field(StudentVo::getClassId, classId).op(Equal.class) .field(StudentVo::getClassId, classId).op(Equal.class)
.field(StudentVo::getCallTimes, maxCall).op(LessThan.class) .field(StudentVo::getCallTimes, maxCall).op(LessThan.class)
.orderBy("random()")
.build()); .build());
} }
......
...@@ -104,6 +104,8 @@ public class StudentPointService { ...@@ -104,6 +104,8 @@ public class StudentPointService {
studentPoint.setAddTime(now); studentPoint.setAddTime(now);
studentPoint.setDeleted(false); studentPoint.setDeleted(false);
studentPointInfoMapper.insert(studentPoint); studentPointInfoMapper.insert(studentPoint);
studentInfoService.increaseCallTimeByPrimaryKey(studentPoint.getStudentId());
return "add OK"; return "add OK";
} }
......
logging: logging:
level: level:
cn.zhxu.bs: info cn.zhxu.bs: debug
pagehelper: pagehelper:
helperDialect: mysql helperDialect: mysql
......
...@@ -39,7 +39,7 @@ public class StudentController { ...@@ -39,7 +39,7 @@ public class StudentController {
} }
@GetMapping("randomSelect") @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)); 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