修改重新实训接口,登录接口新增学校名称

master
xiaoCJ 1 year ago
parent 98a8355dd5
commit 1b494a5d31

@ -31,6 +31,8 @@ public class LoginResult {
private int classId;
@ApiModelProperty("用户所在学校id")
private int schoolId;
@ApiModelProperty("用户所在学校名称")
private String schoolName;
@ApiModelProperty("用户权限")
private List<String> authorityCodes;
@ -74,6 +76,7 @@ public class LoginResult {
result.setMajorId(jwtUser.getMajorId());
result.setCollegeId(jwtUser.getCollegeId());
result.setUsername(jwtUser.getUsername());
result.setSchoolName(jwtUser.getSchoolName());
return result;
}
}

@ -105,8 +105,6 @@ public class UserController {
@AnonymousAccess
public ResultEntity reTraining(@RequestParam String userId) {
Flow flow = flowMapper.selectByPrimaryKey(userId);
flow.setFlowId(IdUtil.simpleUUID());
flowMapper.updateByPrimaryKey(flow);
PerformanceScoreExample example = new PerformanceScoreExample();
example.createCriteria().andFlowIdEqualTo(flow.getFlowId());
List<PerformanceScore> performanceScores = performanceScoreMapper.selectByExample(example);
@ -114,6 +112,9 @@ public class UserController {
return null;
}
performanceScoreMapper.deleteByExample(example);
flow.setFlowId(IdUtil.simpleUUID());
flowMapper.updateByPrimaryKey(flow);
return new ResultEntity(HttpStatus.OK, "已重新实训!");
}
}

Loading…
Cancel
Save