|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.ibeetl.jlw.service;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
|
|
import cn.hutool.core.util.EnumUtil;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import cn.jlw.token.TokenService;
|
|
|
|
@ -11,7 +12,9 @@ import com.ibeetl.admin.core.service.CorePlatformService;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreUserService;
|
|
|
|
|
import com.ibeetl.admin.core.util.HttpRequestLocal;
|
|
|
|
|
import com.ibeetl.jlw.entity.Student;
|
|
|
|
|
import com.ibeetl.jlw.entity.StudentExtendSchoolInfo;
|
|
|
|
|
import com.ibeetl.jlw.entity.Teacher;
|
|
|
|
|
import com.ibeetl.jlw.entity.TeacherExtendSchoolInfo;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
@ -170,4 +173,28 @@ public class WebPlatformService {
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 学生或者教师身份判断必要的属性是否为空
|
|
|
|
|
* @param userId
|
|
|
|
|
*/
|
|
|
|
|
public void checkUserLoginStatusThrow(Long userId) {
|
|
|
|
|
|
|
|
|
|
StudentExtendSchoolInfo studentExtendSchoolInfo = studentService.getStudentExtendSchoolInfoByUserIds(userId.toString());
|
|
|
|
|
TeacherExtendSchoolInfo teacherExtendSchoolInfo = teacherService.getTeacherExtendSchoolInfoByUserIds(userId.toString());
|
|
|
|
|
|
|
|
|
|
Assert.isFalse(ObjectUtil.isAllEmpty(studentExtendSchoolInfo, teacherExtendSchoolInfo), "学生信息异常,请联系管理员!");
|
|
|
|
|
|
|
|
|
|
if (studentExtendSchoolInfo != null) {
|
|
|
|
|
Assert.notBlank(studentExtendSchoolInfo.getUniversitiesCollegesName(), "所在院校已不存在!");
|
|
|
|
|
Assert.notBlank(studentExtendSchoolInfo.getUniversityFacultyName(), "所在院系已不存在!");
|
|
|
|
|
Assert.notBlank(studentExtendSchoolInfo.getUniversitySystemName(), "所在专业已不存在!");
|
|
|
|
|
Assert.notBlank(studentExtendSchoolInfo.getClassName(), "所在班级已不存在!");
|
|
|
|
|
}
|
|
|
|
|
if (teacherExtendSchoolInfo != null) {
|
|
|
|
|
Assert.notBlank(teacherExtendSchoolInfo.getUniversitiesCollegesName(), "所在院校已不存在!");
|
|
|
|
|
Assert.notBlank(teacherExtendSchoolInfo.getUniversityFacultyName(), "所在院系已不存在!");
|
|
|
|
|
Assert.notBlank(teacherExtendSchoolInfo.getUniversitySystemName(), "所在专业已不存在!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|