更新9.25

This commit is contained in:
许允枞 2024-09-25 14:28:15 +08:00
parent 7defd1d771
commit bc76d42343
3 changed files with 29 additions and 21 deletions

View File

@ -349,15 +349,18 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
if (ObjectUtils.isEmpty(hitRegInfoUser1)) { if (ObjectUtils.isEmpty(hitRegInfoUser1)) {
throw new RuntimeException("您并未参加战队"); throw new RuntimeException("您并未参加战队");
} }
if (ObjectUtil.isNotEmpty(hitRegInfoUser1.getType()) && !hitRegInfoUser1.getType().equals("1")) {
HitRegInfo hitRegInfo1 = hitRegInfoMapper.selectOne(new LambdaQueryWrapper<HitRegInfo>() throw new RuntimeException("请由学生修改");
.eq(HitRegInfo::getId, hitRegInfoUser1.getRegId())
.last("limit 1"));
//判断当前登陆人是否是领队老师如果是查询该老师学校下的战队
HitRegistrationTeachInfo teacherInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(userId);
if (teacherInfo != null && teacherInfo.getType().equals("1")) {
hitRegInfo.setSchoolName(teacherInfo.getSchoolName());
} }
// HitRegInfo hitRegInfo1 = hitRegInfoMapper.selectOne(new LambdaQueryWrapper<HitRegInfo>()
// .eq(HitRegInfo::getId, hitRegInfoUser1.getRegId())
// .last("limit 1"));
//判断当前登陆人是否是领队老师如果是查询该老师学校下的战队
// HitRegistrationTeachInfo teacherInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(userId);
// if (teacherInfo != null && teacherInfo.getType().equals("1")) {
// hitRegInfo.setSchoolName(teacherInfo.getSchoolName());
// }
PageUtils.startPage(); PageUtils.startPage();
// List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo); // List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo);
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectList(new LambdaQueryWrapper<HitRegInfo>() List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectList(new LambdaQueryWrapper<HitRegInfo>()

View File

@ -206,6 +206,8 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
sysUser.setRoleIds(new Long[]{103L}); sysUser.setRoleIds(new Long[]{103L});
regFlag = userService.insertUser(sysUser)>0; regFlag = userService.insertUser(sysUser)>0;
} else { } else {
//指导老师
sysUser.setRoleIds(new Long[]{2L});
regFlag= userService.registerUser(sysUser); regFlag= userService.registerUser(sysUser);
} }
if (!regFlag) { if (!regFlag) {

View File

@ -302,9 +302,12 @@ export default {
} }
} }
this.HitRegistrationStudentInfoList[i].competitionName = "" this.HitRegistrationStudentInfoList[i].competitionName = ""
//this.HitRegistrationStudentInfoList[i].competition
if (this.HitRegistrationStudentInfoList[i].competition != null) {
const arr = this.splitStringToArray(this.HitRegistrationStudentInfoList[i].competition) const arr = this.splitStringToArray(this.HitRegistrationStudentInfoList[i].competition)
const arr2 = [] const arr2 = []
//arr // arr
for (let k = 0; k < arr.length; k++) { for (let k = 0; k < arr.length; k++) {
// //
if (arr[k] == "1") { if (arr[k] == "1") {
@ -316,7 +319,7 @@ export default {
} }
} }
this.HitRegistrationStudentInfoList[i].competitionName = this.arrayToString(arr2); this.HitRegistrationStudentInfoList[i].competitionName = this.arrayToString(arr2);
}
} }
console.log("this.HitRegistrationStudentInfoList", this.HitRegistrationStudentInfoList) console.log("this.HitRegistrationStudentInfoList", this.HitRegistrationStudentInfoList)