WANG 6 سال پیش
والد
کامیت
9590283db5
29فایلهای تغییر یافته به همراه284 افزوده شده و 284 حذف شده
  1. 3 3
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/Auth2Controller.java
  2. 6 6
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/AuthController.java
  3. 10 10
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/CourseController.java
  4. 10 10
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/CourseSpeciatlyRelationController.java
  5. 3 3
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/ExamSiteController.java
  6. 2 2
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/FaceController.java
  7. 2 2
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/LogController.java
  8. 25 25
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/OrgController.java
  9. 14 14
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/RolePrivilegeController.java
  10. 4 4
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/SpecialtyController.java
  11. 12 12
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/StudentController.java
  12. 30 30
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/UserController.java
  13. 1 1
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/CommonCloudServiceProvider.java
  14. 5 5
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/CourseCloudServiceProvider.java
  15. 2 2
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/FaceCloudServiceProvider.java
  16. 6 6
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/OrgCloudServiceProvider.java
  17. 8 8
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/StudentCloudServiceProvider.java
  18. 9 9
      examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/UserCloudServiceProvider.java
  19. 32 32
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/AuthServiceImpl.java
  20. 11 11
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/CourseServiceImpl.java
  21. 11 11
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/ExamSiteServiceImpl.java
  22. 12 12
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/FaceServiceImpl.java
  23. 16 16
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/OrgServiceImpl.java
  24. 8 8
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/RolePrivilegeServiceImpl.java
  25. 3 3
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/SmsCodeServiceImpl.java
  26. 9 9
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/SpecialtyServiceImpl.java
  27. 16 16
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/StudentServiceImpl.java
  28. 13 13
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/SysConfigServiceImpl.java
  29. 1 1
      examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/UserServiceImpl.java

+ 3 - 3
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/Auth2Controller.java

@@ -98,14 +98,14 @@ public class Auth2Controller extends ControllerSupport {
 			if (1 == userList.size()) {
 				user = userList.get(0);
 			} else if (1 < userList.size()) {
-				throw new StatusException("B-001003", "不同顶级机构下存在相同登录名");
+				throw new StatusException("001003", "不同顶级机构下存在相同登录名");
 			}
 		}
 
 		if (user == null) {
-			throw new StatusException("B-001001", "该用户不存在");
+			throw new StatusException("001001", "该用户不存在");
 		} else if (!user.getEnable()) {
-			throw new StatusException("B-001002", "该用户被禁用");
+			throw new StatusException("001002", "该用户被禁用");
 		}
 
 		LoginInfo loginInfo = new LoginInfo();

+ 6 - 6
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/AuthController.java

@@ -105,10 +105,10 @@ public class AuthController extends ControllerSupport {
 	public User getLoginUser(@RequestParam String key, @RequestParam String token) {
 
 		if (StringUtils.isBlank(key)) {
-			throw new StatusException("B-001009", "key is blank");
+			throw new StatusException("001009", "key is blank");
 		}
 		if (StringUtils.isBlank(token)) {
-			throw new StatusException("B-001010", "token is blank");
+			throw new StatusException("001010", "token is blank");
 		}
 
 		return authService.getLoginUser(key, token);
@@ -135,9 +135,9 @@ public class AuthController extends ControllerSupport {
 
 		Boolean hasBeBound = studentService.hasBeBound(phone);
 		if (bound && !hasBeBound.equals(bound)) {
-			throw new StatusException("B-002050", "手机号未被关联");
+			throw new StatusException("002050", "手机号未被关联");
 		} else if ((!bound) && hasBeBound.equals(bound)) {
-			throw new StatusException("B-002050", "手机号已被关联");
+			throw new StatusException("002050", "手机号已被关联");
 		}
 
 		smsCodeService.sendSmsCode(phone);
@@ -163,9 +163,9 @@ public class AuthController extends ControllerSupport {
 		StudentEntity sb = studentRepo.findBySecurityPhone(phone);
 		if (null != sb) {
 			if (!sb.getId().equals(studentId)) {
-				throw new StatusException("B-001052", "手机号已被其他用户绑定,请更换手机号");
+				throw new StatusException("001052", "手机号已被其他用户绑定,请更换手机号");
 			} else {
-				throw new StatusException("B-001053", "手机号已绑定成功,无需重复绑定");
+				throw new StatusException("001053", "手机号已绑定成功,无需重复绑定");
 			}
 		}
 

+ 10 - 10
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/CourseController.java

@@ -239,7 +239,7 @@ public class CourseController extends ControllerSupport {
 	public CourseEntity getCourseById(@PathVariable Long id) {
 		CourseEntity course = GlobalHelper.getEntity(courseRepo, id, CourseEntity.class);
 		if (null == course) {
-			throw new StatusException("B-540001", "课程不存在");
+			throw new StatusException("540001", "课程不存在");
 		}
 
 		Long rootOrgId = course.getRootOrgId();
@@ -262,7 +262,7 @@ public class CourseController extends ControllerSupport {
 
 		CourseEntity course = courseRepo.findByRootOrgIdAndCode(rootOrgId, code);
 		if (null == course) {
-			throw new StatusException("B-540001", "课程不存在");
+			throw new StatusException("540001", "课程不存在");
 		}
 
 		return course;
@@ -286,17 +286,17 @@ public class CourseController extends ControllerSupport {
 		String code = domain.getCode();
 		String name = domain.getName();
 		if (StringUtils.isBlank(code)) {
-			throw new StatusException("B-620001", "课程编码不能为空");
+			throw new StatusException("620001", "课程编码不能为空");
 		}
 		if (StringUtils.isBlank(name)) {
-			throw new StatusException("B-620002", "课程名称不能为空");
+			throw new StatusException("620002", "课程名称不能为空");
 		}
 		if (name.length() > 50) {
-			throw new StatusException("B-620003", "课程名称不能超过50个字符");
+			throw new StatusException("620003", "课程名称不能超过50个字符");
 		}
 		CourseEntity course = courseRepo.findByRootOrgIdAndCode(rootOrgId, code);
 		if (null != course) {
-			throw new StatusException("B-620002", "课程编码已被占用");
+			throw new StatusException("620002", "课程编码已被占用");
 		}
 
 		CourseInfo info = new CourseInfo();
@@ -329,13 +329,13 @@ public class CourseController extends ControllerSupport {
 		String code = domain.getCode();
 		String name = domain.getName();
 		if (StringUtils.isBlank(code)) {
-			throw new StatusException("B-620001", "课程编码不能为空");
+			throw new StatusException("620001", "课程编码不能为空");
 		}
 		if (StringUtils.isBlank(name)) {
-			throw new StatusException("B-620002", "课程名称不能为空");
+			throw new StatusException("620002", "课程名称不能为空");
 		}
 		if (name.length() > 50) {
-			throw new StatusException("B-620003", "课程名称不能超过50个字符");
+			throw new StatusException("620003", "课程名称不能超过50个字符");
 		}
 
 		CourseInfo info = new CourseInfo();
@@ -430,7 +430,7 @@ public class CourseController extends ControllerSupport {
 
 		long count = courseRepo.count(specification);
 		if (100000 < count) {
-			throw new StatusException("B-620200", "数据量过大,无法导出");
+			throw new StatusException("620200", "数据量过大,无法导出");
 		}
 
 		List<CourseEntity> list = courseRepo.findAll(specification);

+ 10 - 10
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/CourseSpeciatlyRelationController.java

@@ -47,17 +47,17 @@ public class CourseSpeciatlyRelationController extends ControllerSupport {
 		User accessUser = getAccessUser();
 
 		if (null == courseId) {
-			throw new StatusException("B-320001", "courseId is null");
+			throw new StatusException("320001", "courseId is null");
 		}
 
 		if (null == specialtyId) {
-			throw new StatusException("B-320002", "specialtyId is null");
+			throw new StatusException("320002", "specialtyId is null");
 		}
 
 		CourseEntity courseEntity = GlobalHelper.getEntity(courseRepo, courseId,
 				CourseEntity.class);
 		if (null == courseEntity) {
-			throw new StatusException("B-320001", "courseId is wrong");
+			throw new StatusException("320001", "courseId is wrong");
 		}
 
 		this.validateRootOrgIsolation(courseEntity.getRootOrgId());
@@ -65,7 +65,7 @@ public class CourseSpeciatlyRelationController extends ControllerSupport {
 		SpecialtyEntity specialtyEntity = GlobalHelper.getEntity(specialtyRepo, specialtyId,
 				SpecialtyEntity.class);
 		if (null == specialtyEntity) {
-			throw new StatusException("B-320001", "specialtyId is wrong");
+			throw new StatusException("320001", "specialtyId is wrong");
 		}
 
 		this.validateRootOrgIsolation(specialtyEntity.getRootOrgId());
@@ -77,7 +77,7 @@ public class CourseSpeciatlyRelationController extends ControllerSupport {
 		CourseSpeciatlyRelationEntity one = GlobalHelper.getEntity(courseSpeciatlyRelationRepo, pk,
 				CourseSpeciatlyRelationEntity.class);
 		if (null != one) {
-			throw new StatusException("B-320003", "课程专业已关联");
+			throw new StatusException("320003", "课程专业已关联");
 		}
 
 		one = new CourseSpeciatlyRelationEntity();
@@ -96,17 +96,17 @@ public class CourseSpeciatlyRelationController extends ControllerSupport {
 			@RequestParam(required = true) Long specialtyId) {
 
 		if (null == courseId) {
-			throw new StatusException("B-320001", "courseId is null");
+			throw new StatusException("320001", "courseId is null");
 		}
 
 		if (null == specialtyId) {
-			throw new StatusException("B-320002", "specialtyId is null");
+			throw new StatusException("320002", "specialtyId is null");
 		}
 
 		CourseEntity courseEntity = GlobalHelper.getEntity(courseRepo, courseId,
 				CourseEntity.class);
 		if (null == courseEntity) {
-			throw new StatusException("B-320001", "courseId is wrong");
+			throw new StatusException("320001", "courseId is wrong");
 		}
 
 		this.validateRootOrgIsolation(courseEntity.getRootOrgId());
@@ -114,7 +114,7 @@ public class CourseSpeciatlyRelationController extends ControllerSupport {
 		SpecialtyEntity specialtyEntity = GlobalHelper.getEntity(specialtyRepo, specialtyId,
 				SpecialtyEntity.class);
 		if (null == specialtyEntity) {
-			throw new StatusException("B-320001", "specialtyId is wrong");
+			throw new StatusException("320001", "specialtyId is wrong");
 		}
 
 		this.validateRootOrgIsolation(specialtyEntity.getRootOrgId());
@@ -126,7 +126,7 @@ public class CourseSpeciatlyRelationController extends ControllerSupport {
 		CourseSpeciatlyRelationEntity one = GlobalHelper.getEntity(courseSpeciatlyRelationRepo, pk,
 				CourseSpeciatlyRelationEntity.class);
 		if (null == one) {
-			throw new StatusException("B-320003", "课程专业未关联");
+			throw new StatusException("320003", "课程专业未关联");
 		}
 
 		courseSpeciatlyRelationRepo.delete(one);

+ 3 - 3
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/ExamSiteController.java

@@ -107,15 +107,15 @@ public class ExamSiteController extends ControllerSupport {
 		Long orgId = domain.getOrgId();
 
 		if (StringUtils.isBlank(code)) {
-			throw new StatusException("B-620001", "code is blank");
+			throw new StatusException("620001", "code is blank");
 		}
 		if (null == orgId) {
-			throw new StatusException("B-620002", "orgId is null");
+			throw new StatusException("620002", "orgId is null");
 		}
 
 		ExamSiteEntity es = examSiteRepo.findByOrgIdAndCode(orgId, code);
 		if (null != es) {
-			throw new StatusException("B-620003", "考点代码已被占用");
+			throw new StatusException("620003", "考点代码已被占用");
 		}
 
 		ExamSiteInfo info = new ExamSiteInfo();

+ 2 - 2
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/FaceController.java

@@ -74,14 +74,14 @@ public class FaceController extends ControllerSupport {
 	public StudentFaceEntity getStudentFace(@PathVariable Long studentId) {
 
 		if (null == studentId) {
-			throw new StatusException("B-710001", "studentId is null");
+			throw new StatusException("710001", "studentId is null");
 		}
 
 		StudentFaceEntity studentFaceEntity = GlobalHelper.getEntity(studentFaceRepo, studentId,
 				StudentFaceEntity.class);
 
 		if (null == studentFaceEntity) {
-			throw new StatusException("B-710001", "studentFaceEntity is null");
+			throw new StatusException("710001", "studentFaceEntity is null");
 		}
 
 		return studentFaceEntity;

+ 2 - 2
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/LogController.java

@@ -53,7 +53,7 @@ public class LogController extends ControllerSupport {
 	 */
 	private void log(String logger, String level, String code, String info) {
 		if (!code.matches("\\w{1,2}\\-\\d{6}")) {
-			throw new StatusException("B-500002",
+			throw new StatusException("500002",
 					"code must match regular expression:  \\w{1,2}\\-\\d{6}");
 		}
 		info = RegExUtils.replaceAll(info, "[\n\r]", "  ");
@@ -66,7 +66,7 @@ public class LogController extends ControllerSupport {
 		} else if ("error".equalsIgnoreCase(level)) {
 			log.error(info);
 		} else {
-			throw new StatusException("B-500001", "level must be [debug,info,error]");
+			throw new StatusException("500001", "level must be [debug,info,error]");
 		}
 	}
 

+ 25 - 25
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/OrgController.java

@@ -249,10 +249,10 @@ public class OrgController extends ControllerSupport {
 	public OrgEntity getRootOrg(@PathVariable Long rootOrgId) {
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 		if (null == orgEntity) {
-			throw new StatusException("B-001250", "rootOrgId is wrong");
+			throw new StatusException("001250", "rootOrgId is wrong");
 		}
 		if (null != orgEntity.getParentId()) {
-			throw new StatusException("B-001251", "rootOrgId is wrong");
+			throw new StatusException("001251", "rootOrgId is wrong");
 		}
 		validateRootOrgIsolation(orgEntity.getRootId());
 
@@ -271,10 +271,10 @@ public class OrgController extends ControllerSupport {
 	public OrgEntity getSubOrg(@PathVariable Long orgId) {
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 		if (null == orgEntity) {
-			throw new StatusException("B-001250", "orgId is wrong");
+			throw new StatusException("001250", "orgId is wrong");
 		}
 		if (null == orgEntity.getParentId()) {
-			throw new StatusException("B-001251", "orgId is wrong");
+			throw new StatusException("001251", "orgId is wrong");
 		}
 		validateRootOrgIsolation(orgEntity.getRootId());
 
@@ -316,12 +316,12 @@ public class OrgController extends ControllerSupport {
 			@RequestParam(required = false) String propertyKeys) {
 
 		if (null == parentId) {
-			throw new StatusException("B-001249", "parentId is null");
+			throw new StatusException("001249", "parentId is null");
 		}
 
 		OrgEntity parentOrg = GlobalHelper.getEntity(orgRepo, parentId, OrgEntity.class);
 		if (null == parentOrg) {
-			throw new StatusException("B-001250", "parentId is wrong");
+			throw new StatusException("001250", "parentId is wrong");
 		}
 		validateRootOrgIsolation(parentOrg.getRootId());
 
@@ -489,7 +489,7 @@ public class OrgController extends ControllerSupport {
 		// 过载保护
 		long total = orgRepo.count(specification);
 		if (total > 1000) {
-			throw new StatusException("B-001251", "total is larger than 1000");
+			throw new StatusException("001251", "total is larger than 1000");
 		}
 
 		Sort sort = new Sort(Direction.ASC, "id");
@@ -542,7 +542,7 @@ public class OrgController extends ControllerSupport {
 
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 		if (null == orgEntity) {
-			throw new StatusException("B-001250", "orgId is wrong");
+			throw new StatusException("001250", "orgId is wrong");
 		}
 		validateRootOrgIsolation(orgEntity.getRootId());
 
@@ -570,7 +570,7 @@ public class OrgController extends ControllerSupport {
 	public String getOrgProperty(@PathVariable Long orgId, @PathVariable String key) {
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 		if (null == orgEntity) {
-			throw new StatusException("B-001250", "orgId is wrong");
+			throw new StatusException("001250", "orgId is wrong");
 		}
 		validateRootOrgIsolation(orgEntity.getRootId());
 
@@ -592,15 +592,15 @@ public class OrgController extends ControllerSupport {
 		if (null != orgId) {
 			orgEntity = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 			if (null == orgEntity) {
-				throw new StatusException("B-001250", "orgId is wrong");
+				throw new StatusException("001250", "orgId is wrong");
 			}
 		} else if (StringUtils.isNotBlank(domainName)) {
 			orgEntity = orgRepo.findByParentIdIsNullAndDomainName(domainName);
 			if (null == orgEntity) {
-				throw new StatusException("B-001252", "domainName is wrong");
+				throw new StatusException("001252", "domainName is wrong");
 			}
 		} else {
-			throw new StatusException("B-001253", "orgId and domainName are all null");
+			throw new StatusException("001253", "orgId and domainName are all null");
 		}
 
 		DynamicEnumManager manager = OrgProperty.getDynamicEnumManager();
@@ -625,16 +625,16 @@ public class OrgController extends ControllerSupport {
 		trim(domain, true);
 
 		if (!isSuperAdmin()) {
-			throw new StatusException("B-140001", "非法访问");
+			throw new StatusException("140001", "非法访问");
 		}
 
 		if (StringUtils.isBlank(domain.getCode())) {
-			throw new StatusException("B-150001", "code is null");
+			throw new StatusException("150001", "code is null");
 		}
 
 		OrgEntity orgEntity = orgRepo.findByParentIdIsNullAndCode(domain.getCode());
 		if (null != orgEntity) {
-			throw new StatusException("B-150001", "机构代码已存在");
+			throw new StatusException("150001", "机构代码已存在");
 		}
 
 		OrgInfo info = new OrgInfo();
@@ -668,17 +668,17 @@ public class OrgController extends ControllerSupport {
 		trim(domain, true);
 
 		if (!isSuperAdmin()) {
-			throw new StatusException("B-140001", "非法访问");
+			throw new StatusException("140001", "非法访问");
 		}
 
 		Long id = domain.getId();
 		if (null == id) {
-			throw new StatusException("B-140001", "id is null");
+			throw new StatusException("140001", "id is null");
 		}
 
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, id, OrgEntity.class);
 		if (null == orgEntity) {
-			throw new StatusException("B-140002", "orgEntity is null");
+			throw new StatusException("140002", "orgEntity is null");
 		}
 
 		validateRootOrgIsolation(orgEntity.getRootId());
@@ -727,7 +727,7 @@ public class OrgController extends ControllerSupport {
 
 		OrgEntity subOrg = orgRepo.findByRootIdAndCode(accessUser.getRootOrgId(), domain.getCode());
 		if (null != subOrg) {
-			throw new StatusException("B-140001", "机构代码已存在");
+			throw new StatusException("140001", "机构代码已存在");
 		}
 
 		Long parentId = domain.getParentId();
@@ -769,12 +769,12 @@ public class OrgController extends ControllerSupport {
 
 		Long id = domain.getId();
 		if (null == id) {
-			throw new StatusException("B-140001", "id is null");
+			throw new StatusException("140001", "id is null");
 		}
 
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, id, OrgEntity.class);
 		if (null == orgEntity) {
-			throw new StatusException("B-140002", "orgEntity is null");
+			throw new StatusException("140002", "orgEntity is null");
 		}
 
 		validateRootOrgIsolation(orgEntity.getRootId());
@@ -850,7 +850,7 @@ public class OrgController extends ControllerSupport {
 			throws IOException {
 		OrgEntity org = orgRepo.findByParentIdIsNullAndDomainName(domain);
 		if (null == org) {
-			throw new StatusException("B-140002", "orgEntity is null");
+			throw new StatusException("140002", "orgEntity is null");
 		}
 
 		DynamicEnumManager manager = OrgProperty.getDynamicEnumManager();
@@ -861,7 +861,7 @@ public class OrgController extends ControllerSupport {
 			IOUtils.copy(new FileInputStream(entity.getValue()), response.getOutputStream());
 			response.flushBuffer();
 		} else {
-			throw new StatusException("B-140003", "no logo");
+			throw new StatusException("140003", "no logo");
 		}
 	}
 
@@ -881,7 +881,7 @@ public class OrgController extends ControllerSupport {
 
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 		if (null == orgEntity) {
-			throw new StatusException("B-140002", "orgEntity is null");
+			throw new StatusException("140002", "orgEntity is null");
 		}
 
 		validateRootOrgIsolation(orgEntity.getRootId());
@@ -900,7 +900,7 @@ public class OrgController extends ControllerSupport {
 		} else if (name.endsWith(".png")) {
 			filePath = schoolLogoPath + "/" + orgId + ".png";
 		} else {
-			throw new StatusException("B-101001", "文件格式错误");
+			throw new StatusException("101001", "文件格式错误");
 		}
 
 		FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath));

+ 14 - 14
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/RolePrivilegeController.java

@@ -132,7 +132,7 @@ public class RolePrivilegeController extends ControllerSupport {
 		PrivilegeGroupEntity privilegeGroup = privilegeGroupRepo.findByCode(groupCode);
 
 		if (null == privilegeGroup) {
-			throw new StatusException("B-002001", "groupCode is not existing");
+			throw new StatusException("002001", "groupCode is not existing");
 		}
 
 		List<Long> roleIdList = getAccessUserRoleIdList();
@@ -243,7 +243,7 @@ public class RolePrivilegeController extends ControllerSupport {
 		User accessUser = getAccessUser();
 		Long userRootOrgId = accessUser.getRootOrgId();
 		if ((!rootOrgId.equals(userRootOrgId)) && (!isSuperAdmin())) {
-			throw new StatusException("B-012001", "非法请求");
+			throw new StatusException("012001", "非法请求");
 		}
 
 		rolePrivilegeService.updateRolePrivilegeRelations(rootOrgId, roleId, privilegeGroupId,
@@ -259,13 +259,13 @@ public class RolePrivilegeController extends ControllerSupport {
 		privilege.setDescription(privilege.getDescription());
 
 		if (!privilege.getCode().matches("[0-9a-zA-Z_]+")) {
-			throw new StatusException("B-020101", "权限编码必须由字母,数字和下划线组成");
+			throw new StatusException("020101", "权限编码必须由字母,数字和下划线组成");
 		}
 
 		PrivilegeGroupEntity group = GlobalHelper.getEntity(privilegeGroupRepo,
 				privilege.getGroupId(), PrivilegeGroupEntity.class);
 		if (null == group) {
-			throw new StatusException("B-020001", "权限组不存在");
+			throw new StatusException("020001", "权限组不存在");
 		}
 
 		if (null == privilege.getParentId()
@@ -275,10 +275,10 @@ public class RolePrivilegeController extends ControllerSupport {
 			PrivilegeEntity parentPrivilege = GlobalHelper.getEntity(privilegeRepo,
 					privilege.getParentId(), PrivilegeEntity.class);
 			if (null == parentPrivilege) {
-				throw new StatusException("B-020002", "父权限不存在");
+				throw new StatusException("020002", "父权限不存在");
 			}
 			if (!parentPrivilege.getGroupId().equals(privilege.getGroupId())) {
-				throw new StatusException("B-020003", "权限组错误");
+				throw new StatusException("020003", "权限组错误");
 			}
 		}
 
@@ -297,17 +297,17 @@ public class RolePrivilegeController extends ControllerSupport {
 		PrivilegeGroupEntity group = GlobalHelper.getEntity(privilegeGroupRepo,
 				privilege.getGroupId(), PrivilegeGroupEntity.class);
 		if (null == group) {
-			throw new StatusException("B-020001", "权限组不存在");
+			throw new StatusException("020001", "权限组不存在");
 		}
 
 		if (null != privilege.getParentId()) {
 			PrivilegeEntity parentPrivilege = GlobalHelper.getEntity(privilegeRepo,
 					privilege.getParentId(), PrivilegeEntity.class);
 			if (null == parentPrivilege) {
-				throw new StatusException("B-020002", "父权限不存在");
+				throw new StatusException("020002", "父权限不存在");
 			}
 			if (!parentPrivilege.getGroupId().equals(privilege.getGroupId())) {
-				throw new StatusException("B-020003", "权限组错误");
+				throw new StatusException("020003", "权限组错误");
 			}
 		}
 
@@ -322,12 +322,12 @@ public class RolePrivilegeController extends ControllerSupport {
 		PrivilegeEntity privilege = GlobalHelper.getEntity(privilegeRepo, id,
 				PrivilegeEntity.class);
 		if (null == privilege) {
-			throw new StatusException("B-020004", "权限不存在");
+			throw new StatusException("020004", "权限不存在");
 		}
 
 		List<PrivilegeEntity> children = privilegeRepo.findAllByParentId(privilege.getId());
 		if (CollectionUtils.isNotEmpty(children)) {
-			throw new StatusException("B-020005", "存在子权限");
+			throw new StatusException("020005", "存在子权限");
 		}
 
 		privilegeRepo.deleteById(id);
@@ -340,7 +340,7 @@ public class RolePrivilegeController extends ControllerSupport {
 		PrivilegeEntity privilege = GlobalHelper.getEntity(privilegeRepo, id,
 				PrivilegeEntity.class);
 		if (null == privilege) {
-			throw new StatusException("B-020004", "权限不存在");
+			throw new StatusException("020004", "权限不存在");
 		}
 		return privilege;
 	}
@@ -387,12 +387,12 @@ public class RolePrivilegeController extends ControllerSupport {
 
 		RoleEntity roleByCode = roleRepo.findByCode(code);
 		if (null != roleByCode) {
-			throw new StatusException("B-620001", "角色编码已被占用");
+			throw new StatusException("620001", "角色编码已被占用");
 		}
 
 		RoleEntity roleByName = roleRepo.findByNameAndRootOrgId(name, rootOrgId);
 		if (null != roleByName) {
-			throw new StatusException("B-620002", "角色名称已被占用");
+			throw new StatusException("620002", "角色名称已被占用");
 		}
 
 		RoleInfo info = new RoleInfo();

+ 4 - 4
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/SpecialtyController.java

@@ -204,7 +204,7 @@ public class SpecialtyController extends ControllerSupport {
 	public SpecialtyEntity getByCode(@RequestParam Long orgId, @RequestParam String code) {
 		SpecialtyEntity specialty = specialtyRepo.findByRootOrgIdAndCode(orgId, code);
 		if (null == specialty) {
-			throw new StatusException("B-620002", "专业不存在");
+			throw new StatusException("620002", "专业不存在");
 		}
 		validateRootOrgIsolation(specialty.getRootOrgId());
 		return specialty;
@@ -227,11 +227,11 @@ public class SpecialtyController extends ControllerSupport {
 
 		String code = domain.getCode();
 		if (StringUtils.isBlank(code)) {
-			throw new StatusException("B-620001", "code is blank");
+			throw new StatusException("620001", "code is blank");
 		}
 		SpecialtyEntity course = specialtyRepo.findByRootOrgIdAndCode(rootOrgId, code);
 		if (null != course) {
-			throw new StatusException("B-620002", "专业编码已被占用");
+			throw new StatusException("620002", "专业编码已被占用");
 		}
 
 		SpecialtyInfo info = new SpecialtyInfo();
@@ -358,7 +358,7 @@ public class SpecialtyController extends ControllerSupport {
 
 		long count = specialtyRepo.count(specification);
 		if (100000 < count) {
-			throw new StatusException("B-620200", "数据量过大,无法导出");
+			throw new StatusException("620200", "数据量过大,无法导出");
 		}
 
 		List<SpecialtyEntity> list = specialtyRepo.findAll(specification);

+ 12 - 12
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/StudentController.java

@@ -146,7 +146,7 @@ public class StudentController extends ControllerSupport {
 
 		String urlPrefix = PropertyHolder.getString(PropKeys.STUDENT_PHOTO_URL_PREFIX);
 		if (StringUtils.isBlank(urlPrefix)) {
-			throw new StatusException("B-560111",
+			throw new StatusException("560111",
 					"property[$studentPhoto.url.prefix] is not configured");
 		}
 
@@ -231,7 +231,7 @@ public class StudentController extends ControllerSupport {
 
 		long count = studentRepo.count(specification);
 		if (100000 < count) {
-			throw new StatusException("B-520200", "数据量超过100000,无法导出");
+			throw new StatusException("520200", "数据量超过100000,无法导出");
 		}
 
 		List<StudentEntity> studentList = studentRepo.findAll(specification,
@@ -336,7 +336,7 @@ public class StudentController extends ControllerSupport {
 		for (Long cur : studentIds) {
 			StudentEntity s = GlobalHelper.getEntity(studentRepo, cur, StudentEntity.class);
 			if (null == s) {
-				throw new StatusException("B-450110", "学生不存在");
+				throw new StatusException("450110", "学生不存在");
 			}
 			String identityNumber = s.getIdentityNumber();
 			if (StringUtils.isNotEmpty(identityNumber)
@@ -362,11 +362,11 @@ public class StudentController extends ControllerSupport {
 	public Long updateStudentPassword(@RequestParam("newPassword") String newPassword) {
 		User accessUser = getAccessUser();
 		if (StringUtils.isEmpty(newPassword)) {
-			throw new StatusException("B-450201", "新密码为空");
+			throw new StatusException("450201", "新密码为空");
 		}
 
 		if (!newPassword.matches("[a-zA-Z0-9]{6,18}")) {
-			throw new StatusException("B-450203", "密码必须是6至18位字母或数字");
+			throw new StatusException("450203", "密码必须是6至18位字母或数字");
 		}
 
 		StudentEntity s = GlobalHelper.getEntity(studentRepo, accessUser.getUserId(),
@@ -391,20 +391,20 @@ public class StudentController extends ControllerSupport {
 			@RequestParam("newPassword") String newPassword) {
 		User accessUser = getAccessUser();
 		if (StringUtils.isEmpty(password)) {
-			throw new StatusException("B-450110", "旧密码为空");
+			throw new StatusException("450110", "旧密码为空");
 		}
 		if (StringUtils.isEmpty(newPassword)) {
-			throw new StatusException("B-450111", "新密码为空");
+			throw new StatusException("450111", "新密码为空");
 		}
 		if (!newPassword.matches("[a-zA-Z0-9]{6,18}")) {
-			throw new StatusException("B-450111", "密码必须是6至18位字母或数字");
+			throw new StatusException("450111", "密码必须是6至18位字母或数字");
 		}
 
 		StudentEntity s = GlobalHelper.getEntity(studentRepo, accessUser.getUserId(),
 				StudentEntity.class);
 
 		if (StringUtils.isNotBlank(s.getPassword()) && !s.getPassword().equals(password)) {
-			throw new StatusException("B-450111", "当前密码错误");
+			throw new StatusException("450111", "当前密码错误");
 		}
 		s.setPassword(newPassword);
 		studentRepo.save(s);
@@ -457,7 +457,7 @@ public class StudentController extends ControllerSupport {
 		for (Long cur : studentIds) {
 			StudentEntity s = GlobalHelper.getEntity(studentRepo, cur, StudentEntity.class);
 			if (null == s) {
-				throw new StatusException("B-450110", "学生不存在");
+				throw new StatusException("450110", "学生不存在");
 			}
 			validateRootOrgIsolation(s.getRootOrgId());
 
@@ -502,7 +502,7 @@ public class StudentController extends ControllerSupport {
 		} else {
 			OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 			if (null == rootOrg) {
-				throw new StatusException("B-450110", "rootOrgId is wrong");
+				throw new StatusException("450110", "rootOrgId is wrong");
 			}
 			validateRootOrgIsolation(rootOrgId);
 		}
@@ -521,7 +521,7 @@ public class StudentController extends ControllerSupport {
 		for (Long cur : studentIds) {
 			StudentEntity s = GlobalHelper.getEntity(studentRepo, cur, StudentEntity.class);
 			if (null == s) {
-				throw new StatusException("B-450110", "学生不存在");
+				throw new StatusException("450110", "学生不存在");
 			}
 			validateRootOrgIsolation(s.getRootOrgId());
 

+ 30 - 30
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/UserController.java

@@ -114,16 +114,16 @@ public class UserController extends ControllerSupport {
 
 		OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 		if (null == rootOrg) {
-			throw new StatusException("B-150003", "机构不存在");
+			throw new StatusException("150003", "机构不存在");
 		}
 		if (null != rootOrg.getParentId()) {
-			throw new StatusException("B-150004", "机构错误");
+			throw new StatusException("150004", "机构错误");
 		}
 
 		if (null != roleId) {
 			RoleEntity roleEntity = GlobalHelper.getEntity(roleRepo, roleId, RoleEntity.class);
 			if (null == roleEntity) {
-				throw new StatusException("B-150002", "角色不存在");
+				throw new StatusException("150002", "角色不存在");
 			}
 		} else if (StringUtils.isNotBlank(roleCode)) {
 			RoleEntity roleEntity = roleRepo.findByCodeAndRootOrgIdIsNull(roleCode.trim());
@@ -132,7 +132,7 @@ public class UserController extends ControllerSupport {
 						accessUser.getRootOrgId());
 			}
 			if (null == roleEntity) {
-				throw new StatusException("B-150002", "角色不存在");
+				throw new StatusException("150002", "角色不存在");
 			}
 			roleId = roleEntity.getId();
 		}
@@ -206,7 +206,7 @@ public class UserController extends ControllerSupport {
 				RoleEntity curRoleEntity = GlobalHelper.getEntity(roleRepo, cur.getRoleId(),
 						RoleEntity.class);
 				if (null == curRoleEntity) {
-					throw new StatusException("B-150002", "角色错误");
+					throw new StatusException("150002", "角色错误");
 				}
 				roleNameList.add(curRoleEntity.getName());
 				roleIdList.add(curRoleEntity.getId());
@@ -240,18 +240,18 @@ public class UserController extends ControllerSupport {
 		if (null != rootOrgId) {
 			rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 			if (null == rootOrg) {
-				throw new StatusException("B-150003", "机构不存在");
+				throw new StatusException("150003", "机构不存在");
 			}
 		} else if (StringUtils.isNotBlank(rootOrgCode)) {
 			rootOrg = orgRepo.findByParentIdIsNullAndCode(rootOrgCode);
 			if (null == rootOrg) {
-				throw new StatusException("B-150003", "机构不存在");
+				throw new StatusException("150003", "机构不存在");
 			}
 		}
 
 		if (null != rootOrg) {
 			if (null != rootOrg.getParentId()) {
-				throw new StatusException("B-150004", "机构错误");
+				throw new StatusException("150004", "机构错误");
 			}
 			rootOrgId = rootOrg.getId();
 		}
@@ -261,7 +261,7 @@ public class UserController extends ControllerSupport {
 		if (null != roleId) {
 			RoleEntity roleEntity = GlobalHelper.getEntity(roleRepo, roleId, RoleEntity.class);
 			if (null == roleEntity) {
-				throw new StatusException("B-150002", "角色不存在");
+				throw new StatusException("150002", "角色不存在");
 			}
 		} else if (StringUtils.isNotBlank(roleCode)) {
 			RoleEntity roleEntity = roleRepo.findByCodeAndRootOrgIdIsNull(roleCode.trim());
@@ -269,7 +269,7 @@ public class UserController extends ControllerSupport {
 				roleEntity = roleRepo.findByCodeAndRootOrgId(roleCode.trim(), rootOrgId);
 			}
 			if (null == roleEntity) {
-				throw new StatusException("B-150002", "角色不存在");
+				throw new StatusException("150002", "角色不存在");
 			}
 			roleId = roleEntity.getId();
 		}
@@ -345,7 +345,7 @@ public class UserController extends ControllerSupport {
 				RoleEntity curRoleEntity = GlobalHelper.getEntity(roleRepo, cur.getRoleId(),
 						RoleEntity.class);
 				if (null == curRoleEntity) {
-					throw new StatusException("B-150002", "角色错误");
+					throw new StatusException("150002", "角色错误");
 				}
 				roleNameList.add(curRoleEntity.getName());
 				roleIdList.add(curRoleEntity.getId());
@@ -482,17 +482,17 @@ public class UserController extends ControllerSupport {
 	public Map<String, Object> updateUser(@RequestBody UserFormDomain userForm) {
 		trim(userForm, true);
 		if (null == userForm.getId()) {
-			throw new StatusException("B-150009", "user ID is null");
+			throw new StatusException("150009", "user ID is null");
 		}
 
 		UserEntity userEntity = GlobalHelper.getEntity(userRepo, userForm.getId(),
 				UserEntity.class);
 		if (null == userEntity) {
-			throw new StatusException("B-150010", "用户不存在");
+			throw new StatusException("150010", "用户不存在");
 		}
 
 		if (!userEntity.getRootOrgId().equals(userForm.getRootOrgId())) {
-			throw new StatusException("B-150010", "顶级机构错误");
+			throw new StatusException("150010", "顶级机构错误");
 		}
 
 		userForm.setPassword(userEntity.getPassword());
@@ -513,24 +513,24 @@ public class UserController extends ControllerSupport {
 		Long orgId = userForm.getOrgId();
 
 		if (StringUtils.isBlank(userForm.getName())) {
-			throw new StatusException("B-130001", "用户名不能为空");
+			throw new StatusException("130001", "用户名不能为空");
 		}
 		if (StringUtils.isBlank(userForm.getLoginName())) {
-			throw new StatusException("B-130002", "登陆名不能为空");
+			throw new StatusException("130002", "登陆名不能为空");
 		}
 		if (StringUtils.isBlank(userForm.getPassword())) {
-			throw new StatusException("B-130003", "密码不能为空");
+			throw new StatusException("130003", "密码不能为空");
 		}
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-150002", "rootOrgId is null");
+			throw new StatusException("150002", "rootOrgId is null");
 		}
 		OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 		if (null == rootOrg) {
-			throw new StatusException("B-150003", "机构不存在");
+			throw new StatusException("150003", "机构不存在");
 		}
 		if (null != rootOrg.getParentId()) {
-			throw new StatusException("B-150004", "机构错误");
+			throw new StatusException("150004", "机构错误");
 		}
 
 		validateRootOrgIsolation(rootOrgId);
@@ -538,13 +538,13 @@ public class UserController extends ControllerSupport {
 		if (null != orgId) {
 			OrgEntity org = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 			if (null == org) {
-				throw new StatusException("B-150101", "子机构不存在");
+				throw new StatusException("150101", "子机构不存在");
 			}
 			if (null == org.getParentId()) {
-				throw new StatusException("B-150102", "子机构错误");
+				throw new StatusException("150102", "子机构错误");
 			}
 			if (!org.getRootId().equals(rootOrgId)) {
-				throw new StatusException("B-150103", "子机构错误");
+				throw new StatusException("150103", "子机构错误");
 			}
 		}
 
@@ -566,21 +566,21 @@ public class UserController extends ControllerSupport {
 		for (Long cur : roleIds) {
 			RoleEntity curRoleEntity = GlobalHelper.getEntity(roleRepo, cur, RoleEntity.class);
 			if (null == curRoleEntity) {
-				throw new StatusException("B-150005", "角色错误");
+				throw new StatusException("150005", "角色错误");
 			}
 
 			Long roleRootOrgId = curRoleEntity.getRootOrgId();
 			if (null != roleRootOrgId && (!roleRootOrgId.equals(rootOrgId))) {
-				throw new StatusException("B-150006", "角色错误");
+				throw new StatusException("150006", "角色错误");
 			}
 
 			if (curRoleEntity.getCode().equals(RoleMeta.SUPER_ADMIN.name())) {
-				throw new StatusException("B-150007", "不允许新增或修改超级管理员");
+				throw new StatusException("150007", "不允许新增或修改超级管理员");
 			}
 
 			if (curRoleEntity.getCode().equals(RoleMeta.LC_USER.name())) {
 				if (null == saved.getOrgId()) {
-					throw new StatusException("B-150008", "学习中心角色必须指定学习中心");
+					throw new StatusException("150008", "学习中心角色必须指定学习中心");
 				}
 			}
 
@@ -629,7 +629,7 @@ public class UserController extends ControllerSupport {
 
 		for (Long userId : ids) {
 			if (isSuperAdmin(userId)) {
-				throw new StatusException("B-150410", "超级管理员账号不允许修改");
+				throw new StatusException("150410", "超级管理员账号不允许修改");
 			}
 			UserEntity user = GlobalHelper.getEntity(userRepo, userId, UserEntity.class);
 			user.setPassword(BasicConsts.DEFAULT_PASSWORD);
@@ -645,7 +645,7 @@ public class UserController extends ControllerSupport {
 		List<String> ret = Lists.newArrayList();
 		for (Long userId : userIds) {
 			if (isSuperAdmin(userId)) {
-				throw new StatusException("B-150410", "超级管理员账号不允许修改");
+				throw new StatusException("150410", "超级管理员账号不允许修改");
 			}
 			UserEntity user = GlobalHelper.getEntity(userRepo, userId, UserEntity.class);
 			user.setEnable(true);
@@ -663,7 +663,7 @@ public class UserController extends ControllerSupport {
 		List<String> ret = Lists.newArrayList();
 		for (Long userId : userIds) {
 			if (isSuperAdmin(userId)) {
-				throw new StatusException("B-150410", "超级管理员账号不允许修改");
+				throw new StatusException("150410", "超级管理员账号不允许修改");
 			}
 			UserEntity user = GlobalHelper.getEntity(userRepo, userId, UserEntity.class);
 			user.setEnable(false);

+ 1 - 1
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/CommonCloudServiceProvider.java

@@ -49,7 +49,7 @@ public class CommonCloudServiceProvider extends ControllerSupport implements Com
 				new ThirdPartyAccessPK(rootOrgId, appId), ThirdPartyAccessEntity.class);
 
 		if (null == entity) {
-			throw new StatusException("B-001001", "第三方接入信息不存在");
+			throw new StatusException("001001", "第三方接入信息不存在");
 		}
 
 		ThirdPartyAccessBean bean = new ThirdPartyAccessBean();

+ 5 - 5
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/CourseCloudServiceProvider.java

@@ -89,14 +89,14 @@ public class CourseCloudServiceProvider implements CourseCloudService {
 		Long id = req.getId();
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-160000", "rootOrgId is null");
+			throw new StatusException("160000", "rootOrgId is null");
 		}
 		OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 		if (null == rootOrg) {
-			throw new StatusException("B-160001", "机构不存在");
+			throw new StatusException("160001", "机构不存在");
 		}
 		if (null != rootOrg.getParentId()) {
-			throw new StatusException("B-160002", "机构错误");
+			throw new StatusException("160002", "机构错误");
 		}
 
 		CourseEntity c = null;
@@ -106,11 +106,11 @@ public class CourseCloudServiceProvider implements CourseCloudService {
 		} else if (StringUtils.isNotBlank(code)) {
 			c = courseRepo.findByRootOrgIdAndCode(rootOrgId, code);
 		} else {
-			throw new StatusException("B-160002", "id,code can not be all null");
+			throw new StatusException("160002", "id,code can not be all null");
 		}
 
 		if (null == c) {
-			throw new StatusException("B-160003", "课程不存在");
+			throw new StatusException("160003", "课程不存在");
 		}
 
 		CourseBean courseBean = new CourseBean();

+ 2 - 2
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/FaceCloudServiceProvider.java

@@ -111,14 +111,14 @@ public class FaceCloudServiceProvider extends ControllerSupport implements FaceC
 		Long studentId = req.getStudentId();
 
 		if (null == studentId) {
-			throw new StatusException("B-710001", "studentId is null");
+			throw new StatusException("710001", "studentId is null");
 		}
 
 		StudentFaceEntity studentFaceEntity = GlobalHelper.getEntity(studentFaceRepo, studentId,
 				StudentFaceEntity.class);
 
 		if (null == studentFaceEntity) {
-			throw new StatusException("B-710001", "studentFaceEntity is null");
+			throw new StatusException("710001", "studentFaceEntity is null");
 		}
 
 		StudentFaceBean studentFaceBean = new StudentFaceBean();

+ 6 - 6
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/OrgCloudServiceProvider.java

@@ -105,15 +105,15 @@ public class OrgCloudServiceProvider extends ControllerSupport implements OrgClo
 			org = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 		} else if (StringUtils.isNotBlank(orgCode)) {
 			if (null == rootOrgId) {
-				throw new StatusException("B-150001", "rootOrgId is null");
+				throw new StatusException("150001", "rootOrgId is null");
 			}
 			org = orgRepo.findByRootIdAndCode(rootOrgId, orgCode);
 		} else {
-			throw new StatusException("B-150001", "orgId,orgCode不能都不为空");
+			throw new StatusException("150001", "orgId,orgCode不能都不为空");
 		}
 
 		if (null == org) {
-			throw new StatusException("B-150001", "机构不存在");
+			throw new StatusException("150001", "机构不存在");
 		}
 
 		OrgBean orgBean = new OrgBean();
@@ -191,7 +191,7 @@ public class OrgCloudServiceProvider extends ControllerSupport implements OrgClo
 
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 		if (null == orgEntity) {
-			throw new StatusException("B-001250", "orgId is wrong");
+			throw new StatusException("001250", "orgId is wrong");
 		}
 
 		Map<String, String> map = Maps.newHashMap();
@@ -218,7 +218,7 @@ public class OrgCloudServiceProvider extends ControllerSupport implements OrgClo
 
 		OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 		if (null == orgEntity) {
-			throw new StatusException("B-001250", "orgId is wrong");
+			throw new StatusException("001250", "orgId is wrong");
 		}
 
 		DynamicEnumManager manager = OrgProperty.getDynamicEnumManager();
@@ -228,7 +228,7 @@ public class OrgCloudServiceProvider extends ControllerSupport implements OrgClo
 		} else if (null != keyName) {
 			de = manager.getByName(keyName);
 		} else {
-			throw new StatusException("B-001252", "keyId,keyName can not be all null");
+			throw new StatusException("001252", "keyId,keyName can not be all null");
 		}
 
 		OrgPropertyEntity one = orgPropertyRepo.findByOrgIdAndKeyId(orgId, de.getId());

+ 8 - 8
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/StudentCloudServiceProvider.java

@@ -108,25 +108,25 @@ public class StudentCloudServiceProvider extends ControllerSupport implements St
 		} else {
 
 			if (null == rootOrgId) {
-				throw new StatusException("B-150000", "rootOrgId is null");
+				throw new StatusException("150000", "rootOrgId is null");
 			}
 			if (StringUtils.isBlank(identityNumber)) {
-				throw new StatusException("B-150004", "identityNumber is null");
+				throw new StatusException("150004", "identityNumber is null");
 			}
 
 			OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 			if (null == rootOrg) {
-				throw new StatusException("B-150001", "机构不存在");
+				throw new StatusException("150001", "机构不存在");
 			}
 			if (null != rootOrg.getParentId()) {
-				throw new StatusException("B-150002", "机构错误");
+				throw new StatusException("150002", "机构错误");
 			}
 
 			student = studentRepo.findByIdentityNumberAndRootOrgId(identityNumber, rootOrgId);
 		}
 
 		if (null == student) {
-			throw new StatusException("B-150005", "学生不存在");
+			throw new StatusException("150005", "学生不存在");
 		}
 
 		StudentBean studentBean = new StudentBean();
@@ -145,7 +145,7 @@ public class StudentCloudServiceProvider extends ControllerSupport implements St
 		if (null != student.getPhotoPath()) {
 			String urlPrefix = PropertyHolder.getString(PropKeys.STUDENT_PHOTO_URL_PREFIX);
 			if (StringUtils.isBlank(urlPrefix)) {
-				throw new StatusException("B-560111",
+				throw new StatusException("560111",
 						"property[$studentPhoto.url.prefix] is not configured");
 			}
 			studentBean.setPhotoPath(urlPrefix + student.getPhotoPath());
@@ -168,10 +168,10 @@ public class StudentCloudServiceProvider extends ControllerSupport implements St
 		String identityNumber = req.getIdentityNumber();
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-160001", "rootOrgId is null");
+			throw new StatusException("160001", "rootOrgId is null");
 		}
 		if (StringUtils.isBlank(studentCode)) {
-			throw new StatusException("B-160002", "studentCode is blank");
+			throw new StatusException("160002", "studentCode is blank");
 		}
 
 		List<Long> studentIdList = studentService.unbindStudentCode(rootOrgId, studentCode,

+ 9 - 9
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/UserCloudServiceProvider.java

@@ -90,7 +90,7 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
 		UserEntity userEntity = userRepo.findByRootOrgIdAndLoginName(rootOrgId, loginName);
 
 		if (null != userEntity) {
-			throw new StatusException("B-650001", "用户名已经存在");
+			throw new StatusException("650001", "用户名已经存在");
 		}
 
 		userEntity = new UserEntity();
@@ -109,7 +109,7 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
 		List<String> roleCodeList = req.getRoleCodeList();
 
 		if (CollectionUtils.isEmpty(roleCodeList)) {
-			throw new StatusException("B-650002", "角色不能为空");
+			throw new StatusException("650002", "角色不能为空");
 		}
 
 		List<UserRoleRelationEntity> userRoles = Lists.newArrayList();
@@ -119,10 +119,10 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
 				roleEntity = roleRepo.findByCodeAndRootOrgId(roleCode, rootOrgId);
 			}
 			if (null == roleEntity) {
-				throw new StatusException("B-002002", "role code is wrong. roleCode=" + roleCode);
+				throw new StatusException("002002", "role code is wrong. roleCode=" + roleCode);
 			}
 			if (roleEntity.getCode().equals(RoleMeta.SUPER_ADMIN.name())) {
-				throw new StatusException("B-150007", "不允许新增或修改超级管理员");
+				throw new StatusException("150007", "不允许新增或修改超级管理员");
 			}
 			UserRoleRelationEntity relation = new UserRoleRelationEntity(saved.getId(),
 					roleEntity.getId());
@@ -151,7 +151,7 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
 		} else if (StringUtils.isNotBlank(loginName)) {
 			userEntity = userRepo.findByRootOrgIdAndLoginName(rootOrgId, loginName);
 		} else {
-			throw new StatusException("B-230001", "userId and  loginName can not be all null");
+			throw new StatusException("230001", "userId and  loginName can not be all null");
 		}
 
 		GetUserResp resp = new GetUserResp();
@@ -200,7 +200,7 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
 				Long roleId = cur.getRoleId();
 				RoleEntity roleEntity = GlobalHelper.getEntity(roleRepo, roleId, RoleEntity.class);
 				if (null == roleEntity) {
-					throw new StatusException("B-002002", "roleId wrong. roleId=" + roleId);
+					throw new StatusException("002002", "roleId wrong. roleId=" + roleId);
 				}
 				RoleBean role = new RoleBean(roleEntity.getRootOrgId(), roleEntity.getId(),
 						roleEntity.getCode(), roleEntity.getName());
@@ -221,7 +221,7 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
 		if (null != roleId) {
 			RoleEntity roleEntity = GlobalHelper.getEntity(roleRepo, roleId, RoleEntity.class);
 			if (null == roleEntity) {
-				throw new StatusException("B-150001", "角色不存在");
+				throw new StatusException("150001", "角色不存在");
 			}
 		} else if (StringUtils.isNotBlank(roleCode)) {
 			RoleEntity roleEntity = roleRepo.findByCodeAndRootOrgIdIsNull(roleCode.trim());
@@ -229,11 +229,11 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
 				roleEntity = roleRepo.findByCodeAndRootOrgId(roleCode.trim(), rootOrgId);
 			}
 			if (null == roleEntity) {
-				throw new StatusException("B-150002", "角色不存在");
+				throw new StatusException("150002", "角色不存在");
 			}
 			roleId = roleEntity.getId();
 		} else {
-			throw new StatusException("B-150003", "roleId,roleCode不能都为空");
+			throw new StatusException("150003", "roleId,roleCode不能都为空");
 		}
 		final Long finalRoleId = roleId;
 

+ 32 - 32
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/AuthServiceImpl.java

@@ -108,17 +108,17 @@ public class AuthServiceImpl implements AuthService {
 		String imgCode = loginInfo.getImgCode();
 
 		if (StringUtils.isBlank(accountType)) {
-			throw new StatusException("B-001201", "accountType is null");
+			throw new StatusException("001201", "accountType is null");
 		}
 		if (StringUtils.isBlank(accountValue)) {
-			throw new StatusException("B-001202", "accountValue is null");
+			throw new StatusException("001202", "accountValue is null");
 		}
 
 		AccountType accountTypeEnum = null;
 		try {
 			accountTypeEnum = AccountType.valueOf(accountType);
 		} catch (Exception e) {
-			throw new StatusException("B-001204", "accountType is wrong");
+			throw new StatusException("001204", "accountType is wrong");
 		}
 
 		// 系统级别登陆限制
@@ -127,12 +127,12 @@ public class AuthServiceImpl implements AuthService {
 				|| AccountType.STUDENT_CODE.equals(accountTypeEnum)) {
 			Boolean stuClientLoginLimit = (Boolean) sysConfigService.get("STU_CLIENT_LOGIN_LIMIT");
 			if (stuClientLoginLimit) {
-				throw new StatusException("B-001505", "系统维护中... ...");
+				throw new StatusException("001505", "系统维护中... ...");
 			}
 		} else if (AccountType.COMMON_LOGIN_NAME.equals(accountTypeEnum)) {
 			Boolean commonLoginLimit = (Boolean) sysConfigService.get("COMMON_LOGIN_LIMIT");
 			if (commonLoginLimit) {
-				throw new StatusException("B-001506", "系统维护中... ...");
+				throw new StatusException("001506", "系统维护中... ...");
 			}
 		}
 
@@ -140,10 +140,10 @@ public class AuthServiceImpl implements AuthService {
 		if (StringUtils.isNotBlank(sessionId) && StringUtils.isNotBlank(imgCode)) {
 			String rightImgCode = redisClient.get("$_IMG_" + sessionId, String.class);
 			if (null == rightImgCode || !rightImgCode.equalsIgnoreCase(imgCode)) {
-				throw new StatusException("B-002303", "验证码错误");
+				throw new StatusException("002303", "验证码错误");
 			}
 		} else if (5 < errorTimes) {
-			throw new StatusException("B-001205", "登陆失败次数已达到上限,请5分钟后重试");
+			throw new StatusException("001205", "登陆失败次数已达到上限,请5分钟后重试");
 		}
 
 		StudentEntity student = null;
@@ -151,7 +151,7 @@ public class AuthServiceImpl implements AuthService {
 		if (AccountType.STUDENT_PHONE.equals(accountTypeEnum)) {
 			student = studentRepo.findBySecurityPhone(accountValue);
 			if (null == student) {
-				throw new StatusException("B-001110", "学生不存在");
+				throw new StatusException("001110", "学生不存在");
 			}
 			loginInfo.setRootOrgId(student.getRootOrgId());
 		}
@@ -160,20 +160,20 @@ public class AuthServiceImpl implements AuthService {
 		OrgEntity rootOrg = null;
 		if (null == rootOrgId) {
 			if (StringUtils.isBlank(loginInfo.getDomain())) {
-				throw new StatusException("B-001001", "domain,rootOrgId 必须有一个不为空");
+				throw new StatusException("001001", "domain,rootOrgId 必须有一个不为空");
 			}
 
 			try {
 				rootOrg = orgRepo.findByParentIdIsNullAndDomainName(loginInfo.getDomain());
 				rootOrgId = rootOrg.getId();
 			} catch (Exception e) {
-				throw new StatusException("B-001002", "机构不存在", e);
+				throw new StatusException("001002", "机构不存在", e);
 			}
 
 		} else {
 			rootOrg = GlobalHelper.getEntity(orgRepo, Long.valueOf(rootOrgId), OrgEntity.class);
 			if (null == rootOrg) {
-				throw new StatusException("B-001002", "机构不存在");
+				throw new StatusException("001002", "机构不存在");
 			}
 		}
 
@@ -181,7 +181,7 @@ public class AuthServiceImpl implements AuthService {
 		if (StringUtils.isNotBlank(accessibleRootOrgIds)) {
 			accessibleRootOrgIds = "," + accessibleRootOrgIds + ",";
 			if (!accessibleRootOrgIds.contains("," + rootOrg.getId() + ",")) {
-				throw new StatusException("B-001101", "系统维护中... ...");
+				throw new StatusException("001101", "系统维护中... ...");
 			}
 		}
 
@@ -194,13 +194,13 @@ public class AuthServiceImpl implements AuthService {
 		if (AccountType.COMMON_LOGIN_NAME.equals(accountTypeEnum)) {
 			UserEntity userEntity = userRepo.findByRootOrgIdAndLoginName(rootOrgId, accountValue);
 			if (null == userEntity) {
-				throw new StatusException("B-001004", "账号或密码错误");
+				throw new StatusException("001004", "账号或密码错误");
 			}
 			if (null != userEntity.getEnable() && !userEntity.getEnable()) {
-				throw new StatusException("B-001005", "账号被禁用");
+				throw new StatusException("001005", "账号被禁用");
 			}
 			if (StringUtils.isBlank(password)) {
-				throw new StatusException("B-001203", "账号或密码错误");
+				throw new StatusException("001203", "账号或密码错误");
 			}
 
 			user.setUserId(userEntity.getId());
@@ -216,12 +216,12 @@ public class AuthServiceImpl implements AuthService {
 				String encodePassword = ByteUtil.toHexAscii(bytes);
 				if (!encodePassword.equals(userEntity.getPassword())) {
 					whenLoginError(accountTypeEnum, accountValue, clientIp);
-					throw new StatusException("B-001003", "账号或密码错误");
+					throw new StatusException("001003", "账号或密码错误");
 				}
 			} else {
 				if (!password.equals(userEntity.getPassword())) {
 					whenLoginError(accountTypeEnum, accountValue, clientIp);
-					throw new StatusException("B-001003", "账号或密码错误");
+					throw new StatusException("001003", "账号或密码错误");
 				}
 			}
 
@@ -237,10 +237,10 @@ public class AuthServiceImpl implements AuthService {
 			}
 
 			if (null == student) {
-				throw new StatusException("B-001110", "账号或密码错误");
+				throw new StatusException("001110", "账号或密码错误");
 			}
 			if (null != student.getEnable() && !student.getEnable()) {
-				throw new StatusException("B-001005", "账户被禁用");
+				throw new StatusException("001005", "账户被禁用");
 			}
 
 			// 验证码登录
@@ -256,12 +256,12 @@ public class AuthServiceImpl implements AuthService {
 			// 密码登录
 			else {
 				if (StringUtils.isBlank(password)) {
-					throw new StatusException("B-001203", "账号或密码错误");
+					throw new StatusException("001203", "账号或密码错误");
 				}
 				String rightPassword = student.getPassword();
 				if (!rightPassword.equals(password)) {
 					whenLoginError(accountTypeEnum, accountValue, clientIp);
-					throw new StatusException("B-001003", "账号或密码错误");
+					throw new StatusException("001003", "账号或密码错误");
 				}
 			}
 
@@ -291,7 +291,7 @@ public class AuthServiceImpl implements AuthService {
 				// 验证码为空时,发送验证码
 				else {
 					smsCodeService.sendSmsCode(phone);
-					throw new StatusException("B-001100", "请输入短信验证码");
+					throw new StatusException("001100", "请输入短信验证码");
 				}
 			}
 		}
@@ -308,7 +308,7 @@ public class AuthServiceImpl implements AuthService {
 		// 学习中心禁用时,学习中心用户禁止登录
 		if (1 == user.getRoleList().size() && isLcUser) {
 			if (null != org && !org.getEnable()) {
-				throw new StatusException("B-001008", "学习中心被禁用");
+				throw new StatusException("001008", "学习中心被禁用");
 			}
 		}
 
@@ -505,11 +505,11 @@ public class AuthServiceImpl implements AuthService {
 		int sessionTimeout = PropertyHolder.getInt(PropKeys.SESSION_TIMEOUT, 3600);
 		User user = redisClient.get(key, User.class, sessionTimeout);
 		if (null == user) {
-			throw new StatusException("B-001012", "未登录");
+			throw new StatusException("001012", "未登录");
 		}
 
 		if (!user.getToken().equals(token)) {
-			throw new StatusException("B-001012", "token错误");
+			throw new StatusException("001012", "token错误");
 		}
 
 		return user;
@@ -521,26 +521,26 @@ public class AuthServiceImpl implements AuthService {
 
 		OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 		if (null == rootOrg) {
-			throw new StatusException("B-001002", "机构不存在");
+			throw new StatusException("001002", "机构不存在");
 		}
 
 		ThirdPartyAccessEntity thirdPartyAccess = GlobalHelper.getEntity(thirdPartyAccessRepo,
 				new ThirdPartyAccessPK(rootOrgId, appId), ThirdPartyAccessEntity.class);
 
 		if (null == thirdPartyAccess) {
-			throw new StatusException("B-001201", "第三方系统接入信息未配置");
+			throw new StatusException("001201", "第三方系统接入信息未配置");
 		}
 
 		long timestampLong = 0L;
 		try {
 			timestampLong = Long.parseLong(timestamp);
 		} catch (Exception e) {
-			throw new StatusException("B-001202", "timestamp错误");
+			throw new StatusException("001202", "timestamp错误");
 		}
 
 		long currentTimeMillis = System.currentTimeMillis();
 		if (Math.abs(currentTimeMillis - timestampLong) > thirdPartyAccess.getTimeRange()) {
-			throw new StatusException("B-001203", "timestamp超出时间差范围");
+			throw new StatusException("001203", "timestamp超出时间差范围");
 		}
 
 		String secretKey = thirdPartyAccess.getSecretKey();
@@ -549,12 +549,12 @@ public class AuthServiceImpl implements AuthService {
 		String hexAscii = ByteUtil.toHexAscii(bytes);
 
 		if (!hexAscii.equalsIgnoreCase(token)) {
-			throw new StatusException("B-001204", "token校验失败");
+			throw new StatusException("001204", "token校验失败");
 		}
 
 		UserEntity userEntity = userRepo.findByRootOrgIdAndLoginName(rootOrgId, loginName);
 		if (userEntity == null) {
-			throw new StatusException("B-001205", "用户不存在");
+			throw new StatusException("001205", "用户不存在");
 		}
 
 		User user = new User();
@@ -611,7 +611,7 @@ public class AuthServiceImpl implements AuthService {
 				Long roleId = cur.getRoleId();
 				RoleEntity roleEntity = GlobalHelper.getEntity(roleRepo, roleId, RoleEntity.class);
 				if (null == roleEntity) {
-					throw new StatusException("B-002002", "roleId is wrong. roleId=" + roleId);
+					throw new StatusException("002002", "roleId is wrong. roleId=" + roleId);
 				}
 				Role role = new Role(roleEntity.getId(), roleEntity.getCode(),
 						roleEntity.getName());

+ 11 - 11
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/CourseServiceImpl.java

@@ -61,14 +61,14 @@ public class CourseServiceImpl implements CourseService {
 		String name = courseInfo.getName();
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-160000", "rootOrgId is null");
+			throw new StatusException("160000", "rootOrgId is null");
 		}
 		OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 		if (null == rootOrg) {
-			throw new StatusException("B-160001", "机构不存在");
+			throw new StatusException("160001", "机构不存在");
 		}
 		if (null != rootOrg.getParentId()) {
-			throw new StatusException("B-160002", "机构错误");
+			throw new StatusException("160002", "机构错误");
 		}
 
 		CourseEntity course = null;
@@ -77,11 +77,11 @@ public class CourseServiceImpl implements CourseService {
 			course = GlobalHelper.getEntity(courseRepo, courseId, CourseEntity.class);
 
 			if (null == course) {
-				throw new StatusException("B-160006", "课程ID错误");
+				throw new StatusException("160006", "课程ID错误");
 			}
 
 			if (!rootOrgId.equals(course.getRootOrgId())) {
-				throw new StatusException("B-160006", "课程机构错误");
+				throw new StatusException("160006", "课程机构错误");
 			}
 
 		} else if (StringUtils.isNotBlank(courseCode)) {
@@ -97,7 +97,7 @@ public class CourseServiceImpl implements CourseService {
 				}
 			} else {
 				if (StringUtils.isBlank(name)) {
-					throw new StatusException("B-160003", "courseName is null");
+					throw new StatusException("160003", "courseName is null");
 				}
 
 				course = new CourseEntity();
@@ -108,7 +108,7 @@ public class CourseServiceImpl implements CourseService {
 			}
 
 		} else {
-			throw new StatusException("B-160004", "courseId,courseCode can not be all null");
+			throw new StatusException("160004", "courseId,courseCode can not be all null");
 		}
 
 		if (null != enable) {
@@ -152,15 +152,15 @@ public class CourseServiceImpl implements CourseService {
 		try {
 			lineList = ExcelReader.readSheetBySax(PathUtil.getCanonicalPath(file), 1, 3);
 		} catch (Exception e) {
-			throw new StatusException("B-100110", "Excel 解析失败");
+			throw new StatusException("100110", "Excel 解析失败");
 		}
 
 		if (CollectionUtils.isEmpty(lineList)) {
-			throw new StatusException("B-100111", "Excel无内容");
+			throw new StatusException("100111", "Excel无内容");
 		}
 
 		if (10001 < lineList.size()) {
-			throw new StatusException("B-100112", "数据行数不能超过10000");
+			throw new StatusException("100112", "数据行数不能超过10000");
 		}
 
 		List<Map<String, Object>> failRecords = Collections
@@ -172,7 +172,7 @@ public class CourseServiceImpl implements CourseService {
 			String[] line = lineList.get(i);
 			if (0 == i) {
 				if (headerError(line)) {
-					throw new StatusException("B-100111", "Excel表头错误");
+					throw new StatusException("100111", "Excel表头错误");
 				}
 				continue;
 			}

+ 11 - 11
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/ExamSiteServiceImpl.java

@@ -42,25 +42,25 @@ public class ExamSiteServiceImpl implements ExamSiteService {
 		String telephone = info.getTelephone();
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-160000", "rootOrgId is null");
+			throw new StatusException("160000", "rootOrgId is null");
 		}
 		if (null == orgId) {
-			throw new StatusException("B-160001", "rootOrgId is null");
+			throw new StatusException("160001", "rootOrgId is null");
 		}
 		OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 		if (null == rootOrg) {
-			throw new StatusException("B-160002", "顶级机构不存在");
+			throw new StatusException("160002", "顶级机构不存在");
 		}
 		if (null != rootOrg.getParentId()) {
-			throw new StatusException("B-160003", "顶级机构错误");
+			throw new StatusException("160003", "顶级机构错误");
 		}
 
 		OrgEntity org = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
 		if (null == org) {
-			throw new StatusException("B-160004", "机构不存在");
+			throw new StatusException("160004", "机构不存在");
 		}
 		if (!org.getParentId().equals(rootOrgId)) {
-			throw new StatusException("B-160005", "rootOrgId and orgId is not matched");
+			throw new StatusException("160005", "rootOrgId and orgId is not matched");
 		}
 
 		ExamSiteEntity entity = null;
@@ -69,11 +69,11 @@ public class ExamSiteServiceImpl implements ExamSiteService {
 			entity = GlobalHelper.getEntity(examSiteRepo, id, ExamSiteEntity.class);
 
 			if (null == entity) {
-				throw new StatusException("B-160006", "考点ID错误");
+				throw new StatusException("160006", "考点ID错误");
 			}
 
 			if (!rootOrgId.equals(entity.getRootOrgId())) {
-				throw new StatusException("B-160007", "顶级机构错误");
+				throw new StatusException("160007", "顶级机构错误");
 			}
 
 		} else if (StringUtils.isNotBlank(code)) {
@@ -92,12 +92,12 @@ public class ExamSiteServiceImpl implements ExamSiteService {
 				entity.setEnable(true);
 
 				if (StringUtils.isBlank(name)) {
-					throw new StatusException("B-160008", "name is blank");
+					throw new StatusException("160008", "name is blank");
 				}
 			}
 
 		} else {
-			throw new StatusException("B-160009", "id,code can not be all null");
+			throw new StatusException("160009", "id,code can not be all null");
 		}
 
 		if (null != enable) {
@@ -106,7 +106,7 @@ public class ExamSiteServiceImpl implements ExamSiteService {
 
 		if (null != name) {
 			if (StringUtils.isBlank(name)) {
-				throw new StatusException("B-160008", "name is blank");
+				throw new StatusException("160008", "name is blank");
 			} else {
 				entity.setName(name);
 			}

+ 12 - 12
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/FaceServiceImpl.java

@@ -58,48 +58,48 @@ public class FaceServiceImpl implements FaceService {
 		Long faceCount = info.getFaceCount();
 
 		if (null == studentId) {
-			throw new StatusException("B-680001", "studentId is null");
+			throw new StatusException("680001", "studentId is null");
 		}
 		if (null == rootOrgId) {
-			throw new StatusException("B-680002", "rootOrgId is null");
+			throw new StatusException("680002", "rootOrgId is null");
 		}
 		if (StringUtils.isBlank(facesetToken)) {
-			throw new StatusException("B-680003", "facesetToken is null");
+			throw new StatusException("680003", "facesetToken is null");
 		}
 		if (StringUtils.isBlank(faceToken)) {
-			throw new StatusException("B-680004", "faceToken is null");
+			throw new StatusException("680004", "faceToken is null");
 		}
 		if (StringUtils.isBlank(operator)) {
-			throw new StatusException("B-680005", "operator is null");
+			throw new StatusException("680005", "operator is null");
 		}
 		if (StringUtils.isBlank(photoName)) {
-			throw new StatusException("B-680006", "photoName is null");
+			throw new StatusException("680006", "photoName is null");
 		}
 		if (!photoName.matches("\\w+\\.\\w+")) {
-			throw new StatusException("B-680006", "photoName is wrong");
+			throw new StatusException("680006", "photoName is wrong");
 		}
 
 		if (null == faceCount) {
-			throw new StatusException("B-680008", "faceCount is null");
+			throw new StatusException("680008", "faceCount is null");
 		}
 		if (1 > faceCount) {
-			throw new StatusException("B-680013", "faceCount is less than 1");
+			throw new StatusException("680013", "faceCount is less than 1");
 		}
 
 		StudentEntity studentEntity = GlobalHelper.getEntity(studentRepo, studentId,
 				StudentEntity.class);
 
 		if (null == studentEntity) {
-			throw new StatusException("B-680009", "studentEntity is null");
+			throw new StatusException("680009", "studentEntity is null");
 		}
 
 		if (!studentEntity.getRootOrgId().equals(rootOrgId)) {
-			throw new StatusException("B-680010", "studentId,rootOrgId is not matched");
+			throw new StatusException("680010", "studentId,rootOrgId is not matched");
 		}
 
 		FacesetEntity facesetEntity = facesetRepo.findByFacesetToken(facesetToken);
 		if (null == facesetEntity) {
-			throw new StatusException("B-680011", "facesetEntity is null");
+			throw new StatusException("680011", "facesetEntity is null");
 		}
 
 		String photoPath = rootOrgId + "/" + studentId + "/" + photoName;

+ 16 - 16
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/OrgServiceImpl.java

@@ -92,16 +92,16 @@ public class OrgServiceImpl implements OrgService {
 		Map<String, String> properties = orgInfo.getProperties();
 
 		if (StringUtils.isBlank(code)) {
-			throw new StatusException("B-150001", "code is null");
+			throw new StatusException("150001", "code is null");
 		}
 		if (StringUtils.isBlank(name)) {
-			throw new StatusException("B-150002", "name is null");
+			throw new StatusException("150002", "name is null");
 		}
 
 		if (StringUtils.isNotBlank(domainName)) {
 			OrgEntity tempOrg = orgRepo.findByParentIdIsNullAndDomainName(domainName);
 			if (null != tempOrg && !tempOrg.getCode().equals(code)) {
-				throw new StatusException("B-150004", "域名被占用");
+				throw new StatusException("150004", "域名被占用");
 			}
 		}
 
@@ -119,7 +119,7 @@ public class OrgServiceImpl implements OrgService {
 			orgEntity = orgRepo.save(tmp);
 		} else {
 			if (!orgEntity.getId().equals(orgEntity.getRootId())) {
-				throw new StatusException("B-150003", "数据错误");
+				throw new StatusException("150003", "数据错误");
 			}
 		}
 
@@ -179,33 +179,33 @@ public class OrgServiceImpl implements OrgService {
 		}
 
 		if (null == rootId) {
-			throw new StatusException("B-150000", "rootId is null");
+			throw new StatusException("150000", "rootId is null");
 		}
 		if (StringUtils.isBlank(code)) {
-			throw new StatusException("B-150001", "code is null");
+			throw new StatusException("150001", "code is null");
 		}
 		if (StringUtils.isBlank(name)) {
-			throw new StatusException("B-150002", "name is null");
+			throw new StatusException("150002", "name is null");
 		}
 		if (null == parentId) {
-			throw new StatusException("B-150003", "parentId is null");
+			throw new StatusException("150003", "parentId is null");
 		}
 
 		OrgEntity rootOrgEntity = GlobalHelper.getEntity(orgRepo, rootId, OrgEntity.class);
 		if (null == rootOrgEntity) {
-			throw new StatusException("B-150004", "rootId is wrong");
+			throw new StatusException("150004", "rootId is wrong");
 		}
 		if (null != rootOrgEntity.getParentId()) {
-			throw new StatusException("B-150005", "rootId is wrong");
+			throw new StatusException("150005", "rootId is wrong");
 		}
 
 		OrgEntity parentOrgEntity = GlobalHelper.getEntity(orgRepo, parentId, OrgEntity.class);
 		if (null == parentOrgEntity) {
-			throw new StatusException("B-150006", "parentId is wrong");
+			throw new StatusException("150006", "parentId is wrong");
 		}
 
 		if (!rootOrgEntity.getRootId().equals(parentOrgEntity.getRootId())) {
-			throw new StatusException("B-150007", "parentId, rootId is wrong");
+			throw new StatusException("150007", "parentId, rootId is wrong");
 		}
 
 		long updateTime = 0L;
@@ -328,15 +328,15 @@ public class OrgServiceImpl implements OrgService {
 		try {
 			lineList = ExcelReader.readSheetBySax(PathUtil.getCanonicalPath(file), 1, 4);
 		} catch (Exception e) {
-			throw new StatusException("B-100110", "Excel 解析失败");
+			throw new StatusException("100110", "Excel 解析失败");
 		}
 
 		if (CollectionUtils.isEmpty(lineList)) {
-			throw new StatusException("B-100111", "Excel无内容");
+			throw new StatusException("100111", "Excel无内容");
 		}
 
 		if (10001 < lineList.size()) {
-			throw new StatusException("B-100112", "数据行数不能超过10000");
+			throw new StatusException("100112", "数据行数不能超过10000");
 		}
 
 		List<Map<String, Object>> failRecords = Collections
@@ -348,7 +348,7 @@ public class OrgServiceImpl implements OrgService {
 			String[] line = lineList.get(i);
 			if (0 == i) {
 				if (headerError(line)) {
-					throw new StatusException("B-100111", "Excel表头错误");
+					throw new StatusException("100111", "Excel表头错误");
 				}
 				continue;
 			}

+ 8 - 8
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/RolePrivilegeServiceImpl.java

@@ -88,15 +88,15 @@ public class RolePrivilegeServiceImpl implements RolePrivilegeService {
 		Long rootOrgId = info.getRootOrgId();
 
 		if (StringUtils.isBlank(code)) {
-			throw new StatusException("B-620001", "code is blank");
+			throw new StatusException("620001", "code is blank");
 		}
 
 		if (StringUtils.isBlank(name)) {
-			throw new StatusException("B-620002", "name is blank");
+			throw new StatusException("620002", "name is blank");
 		}
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-620003", "rootOrgId is null");
+			throw new StatusException("620003", "rootOrgId is null");
 		}
 
 		RoleEntity roleEntity = roleRepo.findByCodeAndRootOrgId(code, rootOrgId);
@@ -120,7 +120,7 @@ public class RolePrivilegeServiceImpl implements RolePrivilegeService {
 		Long rootOrgId = info.getRootOrgId();
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-620001", "name is blank");
+			throw new StatusException("620001", "name is blank");
 		}
 
 		RoleEntity roleEntity = null;
@@ -129,21 +129,21 @@ public class RolePrivilegeServiceImpl implements RolePrivilegeService {
 		} else if (StringUtils.isNotBlank(code)) {
 			roleEntity = roleRepo.findByCodeAndRootOrgId(code, rootOrgId);
 		} else {
-			throw new StatusException("B-620002", "id,code can not be all null");
+			throw new StatusException("620002", "id,code can not be all null");
 		}
 
 		if (null == roleEntity) {
-			throw new StatusException("B-620003", "roleEntity is null");
+			throw new StatusException("620003", "roleEntity is null");
 		}
 
 		if (!cascade) {
 			if (0 < rolePrivilegeRelationRepo.countByRoleIdAndRootOrgId(roleEntity.getId(),
 					rootOrgId)) {
-				throw new StatusException("B-620004", "角色已关联权限");
+				throw new StatusException("620004", "角色已关联权限");
 			}
 
 			if (0 < userRoleRelationRepo.countByRoleId(roleEntity.getId())) {
-				throw new StatusException("B-620004", "角色已关联用户");
+				throw new StatusException("620004", "角色已关联用户");
 			}
 		}
 

+ 3 - 3
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/SmsCodeServiceImpl.java

@@ -37,10 +37,10 @@ public class SmsCodeServiceImpl implements SmsCodeService {
 				.getString(PropKeys.SEND_VERIFICATION_CODE_TEMPLATE_CODE);
 
 		if (StringUtils.isBlank(smsSign)) {
-			throw new StatusException("B-001060", "签名未配置");
+			throw new StatusException("001060", "签名未配置");
 		}
 		if (StringUtils.isBlank(smsTemplatecode)) {
-			throw new StatusException("B-001061", "模板未配置");
+			throw new StatusException("001061", "模板未配置");
 		}
 
 		req.setEffectiveTime(smsEffectivetime);
@@ -58,7 +58,7 @@ public class SmsCodeServiceImpl implements SmsCodeService {
 		req.setPhone(phone);
 		CheckIdentifyingCodeResp resp = sendSmsCloudService.checkIdentifyingCode(req);
 		if (!resp.getSuccess()) {
-			throw new StatusException("B-001050", "验证码错误");
+			throw new StatusException("001050", "验证码错误");
 		}
 	}
 

+ 9 - 9
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/SpecialtyServiceImpl.java

@@ -40,23 +40,23 @@ public class SpecialtyServiceImpl implements SpecialtyService {
 		String name = info.getName();
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-620001", "rootOrgId is null");
+			throw new StatusException("620001", "rootOrgId is null");
 		}
 		SpecialtyEntity entity = null;
 
 		if (null != id) {
 			entity = GlobalHelper.getEntity(specialtyRepo, id, SpecialtyEntity.class);
 			if (null == entity) {
-				throw new StatusException("B-620001", "id is wrong");
+				throw new StatusException("620001", "id is wrong");
 			}
 			if (!entity.getRootOrgId().equals(rootOrgId)) {
-				throw new StatusException("B-620001", "rootOrgId or id is worng");
+				throw new StatusException("620001", "rootOrgId or id is worng");
 			}
 		} else if (StringUtils.isNotBlank(code)) {
 			entity = specialtyRepo.findByRootOrgIdAndCode(rootOrgId, code);
 			if (null == entity) {
 				if (StringUtils.isBlank(name)) {
-					throw new StatusException("B-620001", "name is blank");
+					throw new StatusException("620001", "name is blank");
 				}
 				entity = new SpecialtyEntity();
 				entity.setCode(code);
@@ -65,7 +65,7 @@ public class SpecialtyServiceImpl implements SpecialtyService {
 				entity.setEnable(true);
 			}
 		} else {
-			throw new StatusException("B-620001", "id and code can not be all null");
+			throw new StatusException("620001", "id and code can not be all null");
 		}
 
 		if (null != enable) {
@@ -86,15 +86,15 @@ public class SpecialtyServiceImpl implements SpecialtyService {
 		try {
 			lineList = ExcelReader.readSheetBySax(PathUtil.getCanonicalPath(file), 1, 2);
 		} catch (Exception e) {
-			throw new StatusException("B-100110", "Excel 解析失败");
+			throw new StatusException("100110", "Excel 解析失败");
 		}
 
 		if (CollectionUtils.isEmpty(lineList)) {
-			throw new StatusException("B-100111", "Excel无内容");
+			throw new StatusException("100111", "Excel无内容");
 		}
 
 		if (10001 < lineList.size()) {
-			throw new StatusException("B-100112", "数据行数不能超过10000");
+			throw new StatusException("100112", "数据行数不能超过10000");
 		}
 
 		List<Map<String, Object>> failRecords = Collections
@@ -106,7 +106,7 @@ public class SpecialtyServiceImpl implements SpecialtyService {
 			String[] line = lineList.get(i);
 			if (0 == i) {
 				if (headerError(line)) {
-					throw new StatusException("B-100111", "Excel表头错误");
+					throw new StatusException("100111", "Excel表头错误");
 				}
 				continue;
 			}

+ 16 - 16
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/StudentServiceImpl.java

@@ -67,30 +67,30 @@ public class StudentServiceImpl implements StudentService {
 		OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
 
 		if (null == rootOrg || null != rootOrg.getParentId()) {
-			throw new StatusException("B-160001", "顶级机构错误");
+			throw new StatusException("160001", "顶级机构错误");
 		}
 
 		OrgEntity org = null;
 		if (null != studentInfo.getOrgId()) {
 			org = GlobalHelper.getEntity(orgRepo, studentInfo.getOrgId(), OrgEntity.class);
 			if (null == org) {
-				throw new StatusException("B-160050", "orgId is wrong");
+				throw new StatusException("160050", "orgId is wrong");
 			}
 			if (!org.getRootId().equals(rootOrgId)) {
-				throw new StatusException("B-160051", "orgId is wrong");
+				throw new StatusException("160051", "orgId is wrong");
 			}
 			if (null == org.getParentId()) {
-				throw new StatusException("B-160052", "orgId is wrong");
+				throw new StatusException("160052", "orgId is wrong");
 			}
 			if (!org.getParentId().equals(rootOrgId)) {
-				throw new StatusException("B-160053", "orgId is wrong");
+				throw new StatusException("160053", "orgId is wrong");
 			}
 		} else if (StringUtils.isNotBlank(studentInfo.getOrgCode())) {
 			org = orgRepo.findByRootIdAndCode(rootOrgId, studentInfo.getOrgCode());
 			if (null == org) {
 				String orgName = studentInfo.getOrgName();
 				if (StringUtils.isBlank(orgName)) {
-					throw new StatusException("B-160003", "orgName is blank");
+					throw new StatusException("160003", "orgName is blank");
 				}
 				org = new OrgEntity();
 				org.setParentId(rootOrgId);
@@ -101,12 +101,12 @@ public class StudentServiceImpl implements StudentService {
 				org = orgRepo.save(org);
 			}
 		} else {
-			throw new StatusException("B-160082", "orgId,orgCode can not be all null");
+			throw new StatusException("160082", "orgId,orgCode can not be all null");
 		}
 
 		String identityNumber = studentInfo.getIdentityNumber();
 		if (StringUtils.isBlank(identityNumber)) {
-			throw new StatusException("B-160012", "身份证号不能为空");
+			throw new StatusException("160012", "身份证号不能为空");
 		}
 
 		StudentEntity student = studentRepo.findByIdentityNumberAndRootOrgId(identityNumber,
@@ -118,12 +118,12 @@ public class StudentServiceImpl implements StudentService {
 					rootOrgId);
 			if (null != studentByCode
 					&& (!studentByCode.getIdentityNumber().equalsIgnoreCase(identityNumber))) {
-				throw new StatusException("B-160008", "学号被占用. 学号: " + studentCode);
+				throw new StatusException("160008", "学号被占用. 学号: " + studentCode);
 			}
 
 			if (null != student && null != student.getStudentCode()
 					&& (!studentCode.equalsIgnoreCase(student.getStudentCode()))) {
-				throw new StatusException("B-160005", "身份证号已关联学号");
+				throw new StatusException("160005", "身份证号已关联学号");
 			}
 		}
 		long updateTime = 0L;
@@ -153,7 +153,7 @@ public class StudentServiceImpl implements StudentService {
 		}
 		if (null != studentInfo.getName()) {
 			if (StringUtils.isBlank(studentInfo.getName())) {
-				throw new StatusException("B-160006", "姓名不能为空");
+				throw new StatusException("160006", "姓名不能为空");
 			}
 			student.setName(studentInfo.getName());
 		}
@@ -209,7 +209,7 @@ public class StudentServiceImpl implements StudentService {
 			String studentCode, String securityPhone) {
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-160250", "rootOrgId is null");
+			throw new StatusException("160250", "rootOrgId is null");
 		}
 
 		StudentEntity s = null;
@@ -232,12 +232,12 @@ public class StudentServiceImpl implements StudentService {
 		}
 
 		if (count > 1) {
-			throw new StatusException("B-160210",
+			throw new StatusException("160210",
 					"参数过多,只需要[studentId,identityNumber,studentCode,securityPhone]中的一个");
 		}
 
 		if (null == s) {
-			throw new StatusException("B-160211", "学生不存在");
+			throw new StatusException("160211", "学生不存在");
 		}
 
 		StudentInfo info = new StudentInfo();
@@ -258,7 +258,7 @@ public class StudentServiceImpl implements StudentService {
 		if (StringUtils.isNotBlank(s.getPhotoPath())) {
 			String basePath = PropertyHolder.getString(PropKeys.STUDENT_PHOTO_URL_PREFIX);
 			if (StringUtils.isBlank(basePath)) {
-				throw new StatusException("B-160212", "照片根路径未配置");
+				throw new StatusException("160212", "照片根路径未配置");
 			}
 			String path = UrlUtil.joinUrl(basePath, s.getPhotoPath());
 			info.setPhotoPath(path);
@@ -278,7 +278,7 @@ public class StudentServiceImpl implements StudentService {
 	public List<Long> unbindStudentCode(Long rootOrgId, String studentCode, String identityNumber) {
 
 		if (null == rootOrgId) {
-			throw new StatusException("B-120001", "rootOrgId is null");
+			throw new StatusException("120001", "rootOrgId is null");
 		}
 
 		List<StudentEntity> studentList = Lists.newArrayList();

+ 13 - 13
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/SysConfigServiceImpl.java

@@ -28,12 +28,12 @@ public class SysConfigServiceImpl implements SysConfigService {
 	@Override
 	public void set(String key, String value) {
 		if (StringUtils.isBlank(key)) {
-			throw new StatusException("B-350001", "key is blank");
+			throw new StatusException("350001", "key is blank");
 		}
 
 		SysConfigEntity sysConf = sysConfigRepo.getOne(key);
 		if (null == sysConf) {
-			throw new StatusException("B-350002", "key is wrong");
+			throw new StatusException("350002", "key is wrong");
 		}
 		DataType dataType = sysConf.getDataType();
 
@@ -45,20 +45,20 @@ public class SysConfigServiceImpl implements SysConfigService {
 			try {
 				sysConf.setValue(String.valueOf(Long.parseLong(value)));
 			} catch (NumberFormatException e) {
-				throw new StatusException("B-350002", "value is wrong");
+				throw new StatusException("350002", "value is wrong");
 			}
 		} else if (dataType.equals(DataType.INTEGER)) {
 			try {
 				sysConf.setValue(String.valueOf(Integer.parseInt(value)));
 			} catch (NumberFormatException e) {
-				throw new StatusException("B-350002", "value is wrong");
+				throw new StatusException("350002", "value is wrong");
 			}
 		} else if (dataType.equals(DataType.DATE)) {
 			try {
 				sysConf.setValue(DateUtil.format(DateUtil.parse(value, DatePatterns.CHINA_DEFAULT),
 						DatePatterns.CHINA_DEFAULT));
 			} catch (Exception e) {
-				throw new StatusException("B-350002", "value is wrong");
+				throw new StatusException("350002", "value is wrong");
 			}
 		} else if (dataType.equals(DataType.BOOLEAN)) {
 			if ("true".equals(value)) {
@@ -66,7 +66,7 @@ public class SysConfigServiceImpl implements SysConfigService {
 			} else if ("false".equals(value)) {
 				sysConf.setValue(value);
 			} else {
-				throw new StatusException("B-350002", "value is wrong");
+				throw new StatusException("350002", "value is wrong");
 			}
 		}
 
@@ -75,12 +75,12 @@ public class SysConfigServiceImpl implements SysConfigService {
 	@Override
 	public Object get(String key) {
 		if (StringUtils.isBlank(key)) {
-			throw new StatusException("B-350001", "key is blank");
+			throw new StatusException("350001", "key is blank");
 		}
 
 		SysConfigEntity sysConf = sysConfigRepo.getOne(key);
 		if (null == sysConf) {
-			throw new StatusException("B-350002", "key is wrong");
+			throw new StatusException("350002", "key is wrong");
 		}
 
 		String value = sysConf.getValue();
@@ -94,19 +94,19 @@ public class SysConfigServiceImpl implements SysConfigService {
 			try {
 				return Long.parseLong(value);
 			} catch (NumberFormatException e) {
-				throw new StatusException("B-350002", "value is wrong");
+				throw new StatusException("350002", "value is wrong");
 			}
 		} else if (dataType.equals(DataType.INTEGER)) {
 			try {
 				return Integer.parseInt(value);
 			} catch (NumberFormatException e) {
-				throw new StatusException("B-350002", "value is wrong");
+				throw new StatusException("350002", "value is wrong");
 			}
 		} else if (dataType.equals(DataType.DATE)) {
 			try {
 				return DateUtil.parse(value, DatePatterns.CHINA_DEFAULT);
 			} catch (Exception e) {
-				throw new StatusException("B-350002", "value is wrong");
+				throw new StatusException("350002", "value is wrong");
 			}
 		} else if (dataType.equals(DataType.BOOLEAN)) {
 			if ("true".equals(value)) {
@@ -114,10 +114,10 @@ public class SysConfigServiceImpl implements SysConfigService {
 			} else if ("false".equals(value)) {
 				return false;
 			} else {
-				throw new StatusException("B-350002", "value is wrong. value=" + value);
+				throw new StatusException("350002", "value is wrong. value=" + value);
 			}
 		} else {
-			throw new StatusException("B-350003", "dataType is undefined");
+			throw new StatusException("350003", "dataType is undefined");
 		}
 	}
 

+ 1 - 1
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/UserServiceImpl.java

@@ -26,7 +26,7 @@ public class UserServiceImpl implements UserService {
 		UserEntity one = userRepo.findByRootOrgIdAndLoginName(user.getRootOrgId(),
 				user.getLoginName());
 		if (one != null && (!one.getId().equals(user.getId()))) {
-			throw new StatusException("B-150002", "登录名已存在");
+			throw new StatusException("150002", "登录名已存在");
 		}
 
 		long updateTime = 0L;