xiatian 2 ani în urmă
părinte
comite
b55d46c3b2

+ 3 - 3
src/main/java/cn/com/qmth/mps/service/impl/ExamServiceImpl.java

@@ -55,7 +55,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
 	@Override
 	public void syncExam(Long schoolId, User user) {
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(schoolId)) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		SchoolEntity school = schoolService.getById(schoolId);
 		if (school == null) {
@@ -112,7 +112,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
 			throw new StatusException("学校不能为空");
 		}
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(domain.getSchoolId())) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		if (StringUtils.isBlank(domain.getName())) {
 			throw new StatusException("考试名称不能为空");
@@ -141,7 +141,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamDao, ExamEntity> implements
 			throw new StatusException("学校不能为空");
 		}
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(query.getSchoolId())) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		IPage<ExamVo> iPage = this.baseMapper.page(new Page<ExamVo>(query.getPageNumber(), query.getPageSize()), query);
 		if(CollectionUtils.isNotEmpty(iPage.getRecords())) {

+ 2 - 2
src/main/java/cn/com/qmth/mps/service/impl/PaperServiceImpl.java

@@ -64,7 +64,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
 			throw new StatusException("未找到考试批次");
 		}
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(exam.getSchoolId())) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		InputStream inputStream = null;
 		try {
@@ -176,7 +176,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
 			throw new StatusException("学校不能为空");
 		}
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(query.getSchoolId())) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		IPage<PaperVo> iPage = this.baseMapper.page(new Page<PaperVo>(query.getPageNumber(), query.getPageSize()), query);
 		if(CollectionUtils.isNotEmpty(iPage.getRecords())) {

+ 4 - 4
src/main/java/cn/com/qmth/mps/service/impl/SchoolServiceImpl.java

@@ -47,7 +47,7 @@ public class SchoolServiceImpl extends ServiceImpl<SchoolDao, SchoolEntity> impl
 	@Override
 	public void syncSchool(User user) {
 		if (!user.getRole().equals(Role.SUPER_ADMIN)) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		SolarHttpUtil orgUtil = new SolarHttpUtil(accessKey, accessSecret, host, uri);
 		List<SchoolEntity> list = orgUtil.getOrgs();
@@ -83,11 +83,11 @@ public class SchoolServiceImpl extends ServiceImpl<SchoolDao, SchoolEntity> impl
 	@Override
 	public void saveSchool(User user, SchoolDomain domain) {
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && domain.getId() == null) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && domain.getId() != null
 				&& !user.getSchoolId().equals(domain.getId())) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		if (domain.getId() == null && StringUtils.isBlank(domain.getCode())) {
 			throw new StatusException("学校编码不能为空");
@@ -151,7 +151,7 @@ public class SchoolServiceImpl extends ServiceImpl<SchoolDao, SchoolEntity> impl
 	@Override
 	public void toggle(List<Long> ids, Boolean enable, User user) {
 		if (!user.getRole().equals(Role.SUPER_ADMIN)) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		UpdateWrapper<SchoolEntity> wrapper = new UpdateWrapper<>();
 		LambdaUpdateWrapper<SchoolEntity> lw = wrapper.lambda();

+ 4 - 4
src/main/java/cn/com/qmth/mps/service/impl/UserServiceImpl.java

@@ -68,7 +68,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
 			throw new StatusException("学校不能为空");
 		}
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(domain.getSchoolId())) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		if (StringUtils.isBlank(domain.getName())) {
 			throw new StatusException("姓名不能为空");
@@ -125,7 +125,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
 	@Override
 	public List<String> importUser(Long schoolId, User user, MultipartFile file) {
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(schoolId)) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		InputStream inputStream = null;
 		try {
@@ -235,7 +235,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
 			throw new StatusException("学校不能为空");
 		}
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(query.getSchoolId())) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		IPage<UserVo> iPage = this.baseMapper.page(new Page<UserVo>(query.getPageNumber(), query.getPageSize()), query);
 		return PageUtil.of(iPage);
@@ -300,7 +300,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
 			throw new StatusException("未找到用户信息");
 		}
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(ue.getSchoolId())) {
-			throw new StatusException("非法操作");
+			throw new StatusException("没有权限");
 		}
 		String pw = ByteUtil.toHexAscii(SHA256.encode(passwd));
 		UpdateWrapper<UserEntity> wrapper = new UpdateWrapper<>();