|
|
@ -374,7 +374,7 @@ public class UserController {
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
StuUserExample stuUserExample = new StuUserExample();
|
|
|
|
StuUserExample stuUserExample = new StuUserExample();
|
|
|
|
StuUserExample.Criteria criteria = stuUserExample.createCriteria();
|
|
|
|
StuUserExample.Criteria criteria = stuUserExample.createCriteria();
|
|
|
|
criteria.andSchoolIdEqualTo(schoolId).andStatusEqualTo(0);
|
|
|
|
criteria.andSchoolIdEqualTo(schoolId).andStatusEqualTo(0).andRoleIdEqualTo(4);
|
|
|
|
if (StringUtils.isNotBlank(studentId)) {
|
|
|
|
if (StringUtils.isNotBlank(studentId)) {
|
|
|
|
criteria.andStudentIdEqualTo(studentId);
|
|
|
|
criteria.andStudentIdEqualTo(studentId);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -407,7 +407,7 @@ public class UserController {
|
|
|
|
public ResultEntity<HttpStatus> updateStudent(@ApiParam("学校ID必传") @RequestBody StuUser stuUser) {
|
|
|
|
public ResultEntity<HttpStatus> updateStudent(@ApiParam("学校ID必传") @RequestBody StuUser stuUser) {
|
|
|
|
StuUserExample example = new StuUserExample();
|
|
|
|
StuUserExample example = new StuUserExample();
|
|
|
|
if (StringUtils.isNotBlank(stuUser.getStudentId())) {
|
|
|
|
if (StringUtils.isNotBlank(stuUser.getStudentId())) {
|
|
|
|
example.createCriteria().andStudentIdEqualTo(stuUser.getStudentId()).andSchoolIdEqualTo(stuUser.getSchoolId());
|
|
|
|
example.createCriteria().andStudentIdEqualTo(stuUser.getStudentId()).andSchoolIdEqualTo(stuUser.getSchoolId()).andRoleIdEqualTo(4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<StuUser> stuUsers = stuUserMapper.selectByExample(example);
|
|
|
|
List<StuUser> stuUsers = stuUserMapper.selectByExample(example);
|
|
|
|
if (!stuUsers.isEmpty()) {
|
|
|
|
if (!stuUsers.isEmpty()) {
|
|
|
@ -458,7 +458,7 @@ public class UserController {
|
|
|
|
@RequestParam String schoolId) {
|
|
|
|
@RequestParam String schoolId) {
|
|
|
|
StuUserExample userTableExample = new StuUserExample();
|
|
|
|
StuUserExample userTableExample = new StuUserExample();
|
|
|
|
StuUserExample.Criteria criteria = userTableExample.createCriteria();
|
|
|
|
StuUserExample.Criteria criteria = userTableExample.createCriteria();
|
|
|
|
criteria.andSchoolIdEqualTo(schoolId);
|
|
|
|
criteria.andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4);
|
|
|
|
if (StringUtils.isNotBlank(classId)) {
|
|
|
|
if (StringUtils.isNotBlank(classId)) {
|
|
|
|
criteria.andClassIdEqualTo(classId);
|
|
|
|
criteria.andClassIdEqualTo(classId);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -514,7 +514,7 @@ public class UserController {
|
|
|
|
@ApiOperation("考试人数和考试次数")
|
|
|
|
@ApiOperation("考试人数和考试次数")
|
|
|
|
public ResultEntity<Map<Long, Long>> getStudentExamCountAndStudentCount(String schoolId) {
|
|
|
|
public ResultEntity<Map<Long, Long>> getStudentExamCountAndStudentCount(String schoolId) {
|
|
|
|
StuUserExample stuUserExample = new StuUserExample();
|
|
|
|
StuUserExample stuUserExample = new StuUserExample();
|
|
|
|
stuUserExample.createCriteria().andSchoolIdEqualTo(schoolId).andExamStatusEqualTo("true");
|
|
|
|
stuUserExample.createCriteria().andSchoolIdEqualTo(schoolId).andExamStatusEqualTo("true").andRoleIdEqualTo(4);
|
|
|
|
//考试人数
|
|
|
|
//考试人数
|
|
|
|
long examPeopleCount = stuUserMapper.countByExample(stuUserExample);
|
|
|
|
long examPeopleCount = stuUserMapper.countByExample(stuUserExample);
|
|
|
|
|
|
|
|
|
|
|
|