WANG 6 tahun lalu
induk
melakukan
2126eaeb82
18 mengubah file dengan 75 tambahan dan 75 penghapusan
  1. 1 1
      examcloud-exchange-inner-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/controller/UpyunController.java
  2. 9 9
      examcloud-exchange-inner-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/provider/SendSmsProvider.java
  3. 5 5
      examcloud-exchange-inner-service/src/main/java/cn/com/qmth/examcloud/exchange/inner/service/impl/SendSmsServiceImpl.java
  4. 1 1
      examcloud-exchange-inner-service/src/main/java/cn/com/qmth/examcloud/exchange/inner/service/upyun/UpYunClient.java
  5. 6 6
      examcloud-exchange-inner-service/src/main/java/cn/com/qmth/examcloud/exchange/inner/service/upyun/UpyunSiteManager.java
  6. 8 8
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/controller/FaceController.java
  7. 1 1
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/CourseGroupOuterServiceProvider.java
  8. 1 1
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/ExamOuterServiceProvider.java
  9. 2 2
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/ExamStudentOuterServiceProvider.java
  10. 13 13
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/FaceOuterServiceProvider.java
  11. 2 2
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/GetExamRecordAuditInfoServiceProvider.java
  12. 9 9
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/GetScoreDataServiceProvider.java
  13. 2 2
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/QueryCapturePhotoServiceProvider.java
  14. 3 3
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/ScoreQueueServiceProvider.java
  15. 4 4
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/StudentOuterServiceProvider.java
  16. 3 3
      examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/cug/CugOuterServiceProvider.java
  17. 2 2
      examcloud-exchange-outer-service/src/main/java/cn/com/qmth/examcloud/exchange/outer/service/impl/CourseGroupServiceImpl.java
  18. 3 3
      examcloud-exchange-outer-service/src/main/java/cn/com/qmth/examcloud/exchange/outer/service/impl/FaceServiceImpl.java

+ 1 - 1
examcloud-exchange-inner-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/controller/UpyunController.java

@@ -45,7 +45,7 @@ public class UpyunController extends ControllerSupport {
 		User accessUser = getAccessUser();
 
 		if (!fileSuffix.matches("\\w+")) {
-			throw new StatusException("EX-600100", "fileSuffix is wrong");
+			throw new StatusException("600100", "fileSuffix is wrong");
 		}
 
 		fileSuffix = "." + fileSuffix;

+ 9 - 9
examcloud-exchange-inner-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/provider/SendSmsProvider.java

@@ -67,10 +67,10 @@ public class SendSmsProvider extends ControllerSupport implements SendSmsCloudSe
 	@RequestMapping(method = RequestMethod.POST, value = "/checkIdentifyingCode")
 	public CheckIdentifyingCodeResp checkIdentifyingCode(@RequestBody CheckSmsCodeReq checkSmsCodeReq){
 		if(StringUtils.isBlank(checkSmsCodeReq.getPhone())){
-			throw new StatusException("EX-CheckIdentifyingCodeResp-001", "手机号码不能为空");
+			throw new StatusException("CheckIdentifyingCodeResp-001", "手机号码不能为空");
 		}
 		if(StringUtils.isBlank(checkSmsCodeReq.getCode())){
-			throw new StatusException("EX-CheckIdentifyingCodeResp-002", "验证码不能为空");
+			throw new StatusException("CheckIdentifyingCodeResp-002", "验证码不能为空");
 		}
 		boolean success = sendSmsService.checkIdentifyingCode(checkSmsCodeReq.getPhone(), checkSmsCodeReq.getCode());
 		CheckIdentifyingCodeResp resp = new CheckIdentifyingCodeResp();
@@ -81,16 +81,16 @@ public class SendSmsProvider extends ControllerSupport implements SendSmsCloudSe
 
 	private void checkSendSmsReq(SendSmsReq sendSmsReq){
 		if(StringUtils.isBlank(sendSmsReq.getPhone())){
-			throw new StatusException("EX-SendSmsProvider-001", "手机号码不能为空");
+			throw new StatusException("SendSmsProvider-001", "手机号码不能为空");
 		}
 		if(StringUtils.isBlank(sendSmsReq.getCode())){
-			throw new StatusException("EX-SendSmsProvider-002", "短信验证码不能为空");
+			throw new StatusException("SendSmsProvider-002", "短信验证码不能为空");
 		}
 		if(StringUtils.isBlank(sendSmsReq.getSign())){
-			throw new StatusException("EX-SendSmsProvider-003", "短信签名不能为空");
+			throw new StatusException("SendSmsProvider-003", "短信签名不能为空");
 		}
 		if(StringUtils.isBlank(sendSmsReq.getTemplateCode())){
-			throw new StatusException("EX-SendSmsProvider-004", "短信模板code不能为空");
+			throw new StatusException("SendSmsProvider-004", "短信模板code不能为空");
 		}
 	}
 
@@ -112,13 +112,13 @@ public class SendSmsProvider extends ControllerSupport implements SendSmsCloudSe
 	private void checkCaptureFailedAlarmReq(
 			CaptureFailedAlarmReq captureFailedAlarmReq) {
 		if(StringUtils.isBlank(captureFailedAlarmReq.getPhone())){
-			throw new StatusException("EX-SendSmsProvider-001", "手机号码不能为空");
+			throw new StatusException("SendSmsProvider-001", "手机号码不能为空");
 		}
 		if(StringUtils.isBlank(captureFailedAlarmReq.getSign())){
-			throw new StatusException("EX-SendSmsProvider-003", "短信签名不能为空");
+			throw new StatusException("SendSmsProvider-003", "短信签名不能为空");
 		}
 		if(StringUtils.isBlank(captureFailedAlarmReq.getTemplateCode())){
-			throw new StatusException("EX-SendSmsProvider-004", "短信模板code不能为空");
+			throw new StatusException("SendSmsProvider-004", "短信模板code不能为空");
 		}
 	}
 	

+ 5 - 5
examcloud-exchange-inner-service/src/main/java/cn/com/qmth/examcloud/exchange/inner/service/impl/SendSmsServiceImpl.java

@@ -64,7 +64,7 @@ public class SendSmsServiceImpl implements SendSmsService {
 		if(smsCodeRedisInfo != null){
 			long createTime = smsCodeRedisInfo.getCreateTime();
 			if((System.currentTimeMillis()-createTime)<sendSmsInfo.getIntervalSeconds()*60*1000){
-				throw new StatusException("EX-sendIdentifyingCode-1","同一个手机号码,"+sendSmsInfo.getIntervalSeconds()+"秒内允许请求一次");
+				throw new StatusException("sendIdentifyingCode-1","同一个手机号码,"+sendSmsInfo.getIntervalSeconds()+"秒内允许请求一次");
 			}
 		}
 		
@@ -77,7 +77,7 @@ public class SendSmsServiceImpl implements SendSmsService {
 		try {
 			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
 		} catch (ClientException e) {
-			throw new StatusException("EX-sendIdentifyingCode-1", "DefaultProfile.addEndpoint failed");
+			throw new StatusException("sendIdentifyingCode-1", "DefaultProfile.addEndpoint failed");
 		}
 		IAcsClient acsClient = new DefaultAcsClient(profile);
 
@@ -105,12 +105,12 @@ public class SendSmsServiceImpl implements SendSmsService {
 			if("ok".equalsIgnoreCase(sendSmsResponse.getCode())){
 				setCodeInfoToRedis(sendSmsInfo);
 			}else{
-				throw new StatusException("EX-sendIdentifyingCode-2", "code:"+sendSmsResponse.getCode()+",message:"+sendSmsResponse.getMessage());
+				throw new StatusException("sendIdentifyingCode-2", "code:"+sendSmsResponse.getCode()+",message:"+sendSmsResponse.getMessage());
 			}
 		} catch (ServerException e) {
-			throw new StatusException("EX-sendIdentifyingCode-3", "send sms failed");
+			throw new StatusException("sendIdentifyingCode-3", "send sms failed");
 		} catch (ClientException e) {
-			throw new StatusException("EX-sendIdentifyingCode-3", "send sms failed");
+			throw new StatusException("sendIdentifyingCode-3", "send sms failed");
 		}
 	}
 	

+ 1 - 1
examcloud-exchange-inner-service/src/main/java/cn/com/qmth/examcloud/exchange/inner/service/upyun/UpYunClient.java

@@ -171,7 +171,7 @@ public class UpYunClient {
 
 			if (HttpStatus.SC_OK != statusCode) {
 				log.error("[upyun error] " + EntityUtils.toString(response.getEntity(), "UTF-8"));
-				throw new StatusException("EX-100001", "upyun upload failure");
+				throw new StatusException("100001", "upyun upload failure");
 			}
 		} catch (StatusException e) {
 			throw e;

+ 6 - 6
examcloud-exchange-inner-service/src/main/java/cn/com/qmth/examcloud/exchange/inner/service/upyun/UpyunSiteManager.java

@@ -42,7 +42,7 @@ public class UpyunSiteManager {
 			List<UpyunSite> obj = (List<UpyunSite>) xStream.fromXML(file);
 			list = obj;
 		} catch (Exception e) {
-			throw new StatusException("EX-520001", "upyun.xml is wrong", e);
+			throw new StatusException("520001", "upyun.xml is wrong", e);
 		}
 
 		for (UpyunSite upyunSite : list) {
@@ -55,15 +55,15 @@ public class UpyunSiteManager {
 			String password = PropertyHolder.getString("$upyun.site." + upyunId + ".password");
 
 			if (StringUtils.isBlank(bucketName)) {
-				throw new StatusException("EX-520002",
+				throw new StatusException("520002",
 						"bucketName is not configured. upyunId=" + upyunId);
 			}
 			if (StringUtils.isBlank(userName)) {
-				throw new StatusException("EX-520003",
+				throw new StatusException("520003",
 						"userName is not configured. upyunId=" + upyunId);
 			}
 			if (StringUtils.isBlank(password)) {
-				throw new StatusException("EX-520004",
+				throw new StatusException("520004",
 						"password is not configured. upyunId=" + upyunId);
 			}
 
@@ -85,7 +85,7 @@ public class UpyunSiteManager {
 		UpYunClient upYunClient = CLIENT_HOLDERS.get(siteId);
 
 		if (null == upYunClient) {
-			throw new StatusException("EX-520005", "upYunClient is null");
+			throw new StatusException("520005", "upYunClient is null");
 		}
 		return upYunClient;
 	}
@@ -101,7 +101,7 @@ public class UpyunSiteManager {
 		UpyunSite upyunSite = SITE_HOLDERS.get(siteId);
 
 		if (null == upyunSite) {
-			throw new StatusException("EX-520006", "upyunSite is null");
+			throw new StatusException("520006", "upyunSite is null");
 		}
 		return upyunSite;
 	}

+ 8 - 8
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/controller/FaceController.java

@@ -72,11 +72,11 @@ public class FaceController extends ControllerSupport {
 		String fileName = file.getOriginalFilename();
 
 		if (StringUtils.containsWhitespace(fileName)) {
-			throw new StatusException("EX-600100", "文件名不能含有空白字符");
+			throw new StatusException("600100", "文件名不能含有空白字符");
 		}
 
 		if (!fileName.matches("[^\\.\\s]+\\.[^\\.\\s]+")) {
-			throw new StatusException("EX-600101", "文件名不合法");
+			throw new StatusException("600101", "文件名不合法");
 		}
 		String identityNumber = fileName.substring(0, fileName.lastIndexOf("."));
 		String fileSuffix = fileName.substring(fileName.lastIndexOf("."));
@@ -104,11 +104,11 @@ public class FaceController extends ControllerSupport {
 		String filename = file.getOriginalFilename();
 
 		if (!filename.endsWith(".zip")) {
-			throw new StatusException("EX-620001", "文件格式不正确,必须是zip格式的压缩包");
+			throw new StatusException("620001", "文件格式不正确,必须是zip格式的压缩包");
 		}
 		// 文件大小限制
 		if (file.getSize() > ZIP_MAX_SIZE * 1024 * 1024) {
-			throw new StatusException("EX-620002", "文件大小超过50M,请分批导入");
+			throw new StatusException("620002", "文件大小超过50M,请分批导入");
 		}
 
 		List<Map<String, String>> ret = Lists.newArrayList();
@@ -119,13 +119,13 @@ public class FaceController extends ControllerSupport {
 		try {
 			ZipUtil.unzip(storeLocation, new File(tempDirPath));
 		} catch (Exception e) {
-			throw new StatusException("EX-620003", "zip文件损坏");
+			throw new StatusException("620003", "zip文件损坏");
 		}
 
 		File[] files = tempDir.listFiles();
 
 		if (null == files) {
-			throw new StatusException("EX-620004", "zip文件为空");
+			throw new StatusException("620004", "zip文件为空");
 		}
 
 		for (File f : files) {
@@ -141,11 +141,11 @@ public class FaceController extends ControllerSupport {
 			}
 			try {
 				if (StringUtils.containsWhitespace(fileName)) {
-					throw new StatusException("EX-600100", "文件名不能含有空白字符");
+					throw new StatusException("600100", "文件名不能含有空白字符");
 				}
 
 				if (!fileName.matches("[^\\.\\s]+\\.[^\\.\\s]+")) {
-					throw new StatusException("EX-600101", "文件名不合法");
+					throw new StatusException("600101", "文件名不合法");
 				}
 				String identityNumber = fileName.substring(0, fileName.lastIndexOf("."));
 				String fileSuffix = fileName.substring(fileName.lastIndexOf("."));

+ 1 - 1
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/CourseGroupOuterServiceProvider.java

@@ -56,7 +56,7 @@ public class CourseGroupOuterServiceProvider extends ControllerSupport
 		String courseGroupName = req.getCourseGroupName();
 
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 
 		List<Course> courseList = courseGroupService.getCourseList(rootOrgId, courseGroupName);

+ 1 - 1
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/ExamOuterServiceProvider.java

@@ -57,7 +57,7 @@ public class ExamOuterServiceProvider extends ControllerSupport implements ExamO
 			@RequestBody @ApiParam(required = true) OuterSaveExamReq req) {
 
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 
 		Date beginTime = req.getBeginTime();

+ 2 - 2
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/ExamStudentOuterServiceProvider.java

@@ -60,7 +60,7 @@ public class ExamStudentOuterServiceProvider extends ControllerSupport
 			@RequestBody @ApiParam(required = true) OuterSaveExamStudentReq req) {
 
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 
 		SaveExamStudentReq request = new SaveExamStudentReq();
@@ -118,7 +118,7 @@ public class ExamStudentOuterServiceProvider extends ControllerSupport
 	public BatchOuterSaveExamStudentResp batchSaveExamStudent(
 			@RequestBody @ApiParam(required = true) OuterBatchSaveExamStudentReq req) {
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 
 		List<ExamStudent4BatchBean> examStudentList = req.getExamStudentList();

+ 13 - 13
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/FaceOuterServiceProvider.java

@@ -69,7 +69,7 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
 			@RequestParam @ApiParam(value = "操作者", required = true) String operator) {
 
 		if (!getSecurityRootOrgId().equals(rootOrgId)) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 
 		if (photoUrl.startsWith("http")) {
@@ -77,7 +77,7 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
 
 			int lastIndexOf = photoUrl.lastIndexOf(".");
 			if (0 > lastIndexOf) {
-				throw new StatusException("EX-100002",
+				throw new StatusException("100002",
 						"photoPath is not end with photo file suffix.");
 			}
 			String fileSuffix = photoUrl.substring(lastIndexOf);
@@ -89,7 +89,7 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
 			try {
 				FileUtils.writeByteArrayToFile(temp, bs);
 			} catch (IOException e) {
-				throw new StatusException("EX-100003", "文件读写失败");
+				throw new StatusException("100003", "文件读写失败");
 			}
 
 			faceService.processFace(rootOrgId, identityNumber, fileSuffix, temp, operator);
@@ -107,7 +107,7 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
 			@RequestParam @ApiParam(value = "学生照片文件(文件名称=身份证号码+文件后缀) 如:xxxxxxxxxx.jpg", required = true) CommonsMultipartFile file) {
 
 		if (!getSecurityRootOrgId().equals(rootOrgId)) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 
 		DiskFileItem item = (DiskFileItem) file.getFileItem();
@@ -115,11 +115,11 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
 		String fileName = file.getOriginalFilename();
 
 		if (StringUtils.containsWhitespace(fileName)) {
-			throw new StatusException("EX-600100", "文件名不能含有空白字符");
+			throw new StatusException("600100", "文件名不能含有空白字符");
 		}
 
 		if (!fileName.matches("[^\\.\\s]+\\.[^\\.\\s]+")) {
-			throw new StatusException("EX-600101", "文件名不合法");
+			throw new StatusException("600101", "文件名不合法");
 		}
 		String fileSuffix = fileName.substring(fileName.lastIndexOf("."));
 
@@ -135,7 +135,7 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
 			@RequestParam @ApiParam(value = "学生照片文件(身份证号码+文件后缀)压缩包(ZIP文件,压缩包内不含目录)", required = true) CommonsMultipartFile file) {
 
 		if (!getSecurityRootOrgId().equals(rootOrgId)) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 
 		DiskFileItem item = (DiskFileItem) file.getFileItem();
@@ -143,11 +143,11 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
 		String filename = file.getOriginalFilename();
 
 		if (!filename.endsWith(".zip")) {
-			throw new StatusException("EX-620001", "文件格式不正确,必须是zip格式的压缩包");
+			throw new StatusException("620001", "文件格式不正确,必须是zip格式的压缩包");
 		}
 		// 文件大小限制
 		if (file.getSize() > ZIP_MAX_SIZE * 1024 * 1024) {
-			throw new StatusException("EX-620002", "文件大小超过50M,请分批导入");
+			throw new StatusException("620002", "文件大小超过50M,请分批导入");
 		}
 
 		List<Map<String, String>> ret = Lists.newArrayList();
@@ -158,13 +158,13 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
 		try {
 			ZipUtil.unzip(storeLocation, new File(tempDirPath));
 		} catch (Exception e) {
-			throw new StatusException("EX-620003", "zip文件损坏");
+			throw new StatusException("620003", "zip文件损坏");
 		}
 
 		File[] files = tempDir.listFiles();
 
 		if (null == files) {
-			throw new StatusException("EX-620004", "zip文件为空");
+			throw new StatusException("620004", "zip文件为空");
 		}
 
 		for (File f : files) {
@@ -180,11 +180,11 @@ public class FaceOuterServiceProvider extends ControllerSupport implements FaceO
 			}
 			try {
 				if (StringUtils.containsWhitespace(fileName)) {
-					throw new StatusException("EX-600100", "文件名不能含有空白字符");
+					throw new StatusException("600100", "文件名不能含有空白字符");
 				}
 
 				if (!fileName.matches("[^\\.\\s]+\\.[^\\.\\s]+")) {
-					throw new StatusException("EX-600101", "文件名不合法");
+					throw new StatusException("600101", "文件名不合法");
 				}
 				String identityNumber = fileName.substring(0, fileName.lastIndexOf("."));
 				String fileSuffix = fileName.substring(fileName.lastIndexOf("."));

+ 2 - 2
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/GetExamRecordAuditInfoServiceProvider.java

@@ -41,10 +41,10 @@ public class GetExamRecordAuditInfoServiceProvider  extends ControllerSupport im
 	@Override
 	public OuterGetExamRecordAuditInfoResp getExamRecordAuditInfo(@RequestBody OuterGetExamRecordAuditInfoReq req) {
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 		if (req.getExamRecordDataId()==null) {
-			throw new StatusException("EX-1000002", "examRecordDataId is null");
+			throw new StatusException("1000002", "examRecordDataId is null");
 		}
 		GetAuditDataReq getAuditDataReq = new GetAuditDataReq();
 		getAuditDataReq.setExamRecordDataId(req.getExamRecordDataId());

+ 9 - 9
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/GetScoreDataServiceProvider.java

@@ -51,13 +51,13 @@ public class GetScoreDataServiceProvider extends ControllerSupport implements Ge
 	@Override
 	public OuterGetScoreDataResp getScoreData(@RequestBody OuterGetScoreDataReq req) {
 		if(req.getRootOrgId() == null){
-			throw new StatusException("EX-1000001", "rootOrgId不能为空");
+			throw new StatusException("1000001", "rootOrgId不能为空");
 		}
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000002", "rootOrgId错误");
+			throw new StatusException("1000002", "rootOrgId错误");
 		}
 		if (req.getExamRecordDataId()==null) {
-			throw new StatusException("EX-1000003", "examRecordDataId不能为空");
+			throw new StatusException("1000003", "examRecordDataId不能为空");
 		}
 		GetScoreDataReq getScoreDataReq = new GetScoreDataReq();
 		getScoreDataReq.setExamRecordDataId(req.getExamRecordDataId());
@@ -88,22 +88,22 @@ public class GetScoreDataServiceProvider extends ControllerSupport implements Ge
 	@Override
 	public OuterQueryScoreDataResp queryScoreData(@RequestBody OuterQueryScoreDataReq req) {
 		if(req.getRootOrgId() == null){
-			throw new StatusException("EX-1000001", "rootOrgId不能为空");
+			throw new StatusException("1000001", "rootOrgId不能为空");
 		}
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000002", "rootOrgId错误");
+			throw new StatusException("1000002", "rootOrgId错误");
 		}
 		if(StringUtils.isBlank(req.getExamName())){
-			throw new StatusException("EX-1000003", "考试名称不能为空");
+			throw new StatusException("1000003", "考试名称不能为空");
 		}
 		if(StringUtils.isBlank(req.getCourseCode())){
-			throw new StatusException("EX-1000004", "课程code不能为空");
+			throw new StatusException("1000004", "课程code不能为空");
 		}
 		if(req.getRootOrgId() == null){
-			throw new StatusException("EX-1000005", "rootOrgId不能为空");
+			throw new StatusException("1000005", "rootOrgId不能为空");
 		}
 		if(StringUtils.isBlank(req.getIdentityNumber()) && StringUtils.isBlank(req.getStudentCode())){
-			throw new StatusException("EX-1000006", "身份证号和学号不能都为空");
+			throw new StatusException("1000006", "身份证号和学号不能都为空");
 		}
 		QueryScoreDataReq queryScoreDataReq = new QueryScoreDataReq();
 		queryScoreDataReq.setCourseCode(req.getCourseCode());

+ 2 - 2
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/QueryCapturePhotoServiceProvider.java

@@ -46,10 +46,10 @@ public class QueryCapturePhotoServiceProvider extends ControllerSupport implemen
 	@Override
 	public OuterQueryCapturePhotoResp queryCapturePhotoList(@RequestBody OuterQueryCapturePhotoReq req) {
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 		if (req.getExamRecordDataId()==null) {
-			throw new StatusException("EX-1000002", "examRecordDataId is null");
+			throw new StatusException("1000002", "examRecordDataId is null");
 		}
 		QueryCapturePhotoReq queryCapturePhotoReq = new QueryCapturePhotoReq();
 		queryCapturePhotoReq.setExamRecordDataId(req.getExamRecordDataId());

+ 3 - 3
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/ScoreQueueServiceProvider.java

@@ -52,7 +52,7 @@ public class ScoreQueueServiceProvider extends ControllerSupport implements Scor
 	@Override
 	public OuterGetScoreQueueTopResp getScoreQueueTop(@RequestBody OuterGetScoreQueueTopReq req) {
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 		GetTopExamScoreQueueReq getTopExamScoreQueueReq = new GetTopExamScoreQueueReq();
 		getTopExamScoreQueueReq.setRootOrgId(req.getRootOrgId());
@@ -90,14 +90,14 @@ public class ScoreQueueServiceProvider extends ControllerSupport implements Scor
 	@Override
 	public OuterDeleteScoreQueueTopResp deleteScoreQueueTop(@RequestBody OuterDeleteScoreQueueTopReq req) {
 		if (!getSecurityRootOrgId().equals(req.getRootOrgId())) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 		GetTopExamScoreQueueReq getTopExamScoreQueueReq = new GetTopExamScoreQueueReq();
 		getTopExamScoreQueueReq.setRootOrgId(req.getRootOrgId());
 		GetTopExamScoreQueueResp getTopExamScoreQueueResp = examScoreObtainQueueCloudService.getTopExamScoreQueue(getTopExamScoreQueueReq);
 
 		if(getTopExamScoreQueueResp.getQueueId()==null || (getTopExamScoreQueueResp.getQueueId()!=null && !getTopExamScoreQueueResp.getQueueId().equals(req.getQueueId()))){
-			throw new StatusException("EX-1000003", "queueId is wrong");
+			throw new StatusException("1000003", "queueId is wrong");
 		}
 		
 		DeleteExamScoreQueueReq deleteExamScoreQueueReq = new DeleteExamScoreQueueReq();

+ 4 - 4
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/StudentOuterServiceProvider.java

@@ -69,7 +69,7 @@ public class StudentOuterServiceProvider extends ControllerSupport implements St
 		trim(req);
 		Long rootOrgId = req.getRootOrgId();
 		if (!getSecurityRootOrgId().equals(rootOrgId)) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 
 		SaveStudentReq request = new SaveStudentReq();
@@ -115,7 +115,7 @@ public class StudentOuterServiceProvider extends ControllerSupport implements St
 
 			int lastIndexOf = photoUrl.lastIndexOf(".");
 			if (0 > lastIndexOf) {
-				throw new StatusException("EX-100002",
+				throw new StatusException("100002",
 						"photoPath is not end with photo file suffix.");
 			}
 			String fileSuffix = photoUrl.substring(lastIndexOf);
@@ -132,7 +132,7 @@ public class StudentOuterServiceProvider extends ControllerSupport implements St
 				} catch (IOException ex) {
 					// ignore
 				}
-				throw new StatusException("EX-100003", "文件读写失败", e);
+				throw new StatusException("100003", "文件读写失败", e);
 			}
 
 			try {
@@ -156,7 +156,7 @@ public class StudentOuterServiceProvider extends ControllerSupport implements St
 	public BatchOuterSaveStudentResp batchSaveStudent(
 			@RequestBody @ApiParam(required = true) OuterBatchSaveStudentReq outerBatchSaveStudentReq) {
 		if (!getSecurityRootOrgId().equals(outerBatchSaveStudentReq.getRootOrgId())) {
-			throw new StatusException("EX-1000001", "rootOrgId is wrong");
+			throw new StatusException("1000001", "rootOrgId is wrong");
 		}
 		List<Student4BatchBean> studentList = outerBatchSaveStudentReq.getStudentList();
 

+ 3 - 3
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/cug/CugOuterServiceProvider.java

@@ -113,12 +113,12 @@ public class CugOuterServiceProvider extends ControllerSupport implements CugOut
 			try {
 				bs = HttpClientUtil.get(photoUrl);
 			} catch (Exception e) {
-				throw new StatusException("EX-100002", "photoUrl is wrong");
+				throw new StatusException("100002", "photoUrl is wrong");
 			}
 
 			int lastIndexOf = photoUrl.lastIndexOf(".");
 			if (0 > lastIndexOf) {
-				throw new StatusException("EX-100002",
+				throw new StatusException("100002",
 						"photoPath is not end with photo file suffix.");
 			}
 			String fileSuffix = photoUrl.substring(lastIndexOf);
@@ -135,7 +135,7 @@ public class CugOuterServiceProvider extends ControllerSupport implements CugOut
 				} catch (IOException ex) {
 					// ignore
 				}
-				throw new StatusException("EX-100003", "文件读写失败");
+				throw new StatusException("100003", "文件读写失败");
 			}
 
 			try {

+ 2 - 2
examcloud-exchange-outer-service/src/main/java/cn/com/qmth/examcloud/exchange/outer/service/impl/CourseGroupServiceImpl.java

@@ -69,7 +69,7 @@ public class CourseGroupServiceImpl implements CourseGroupService {
 			List<CourseGroup> obj = (List<CourseGroup>) xStream.fromXML(file);
 			list = obj;
 		} catch (Exception e) {
-			throw new StatusException("EX-620001", "配置文件错误", e);
+			throw new StatusException("620001", "配置文件错误", e);
 		}
 
 		for (CourseGroup cur : list) {
@@ -78,7 +78,7 @@ public class CourseGroupServiceImpl implements CourseGroupService {
 			}
 		}
 
-		throw new StatusException("EX-860001", "课程组未配置");
+		throw new StatusException("860001", "课程组未配置");
 	}
 
 }

+ 3 - 3
examcloud-exchange-outer-service/src/main/java/cn/com/qmth/examcloud/exchange/outer/service/impl/FaceServiceImpl.java

@@ -159,7 +159,7 @@ public class FaceServiceImpl implements FaceService {
 						"[Face++ Response]. statusCode=" + statusCode + "; respBody=" + respBody);
 
 				if (respBody.contains("QUOTA_EXCEEDED")) {
-					throw new StatusException("EX-620006", "faceset is full");
+					throw new StatusException("620006", "faceset is full");
 				}
 
 				if (statusCode == HttpStatus.SC_OK) {
@@ -225,7 +225,7 @@ public class FaceServiceImpl implements FaceService {
 		String faceToken = null;
 		while (true) {
 			if (times > 5) {
-				throw new StatusException("EX-620005", "人脸检测失败");
+				throw new StatusException("620005", "人脸检测失败");
 			}
 			CloseableHttpClient httpClient = HttpClients.createDefault();
 			CloseableHttpResponse httpResponse = null;
@@ -251,7 +251,7 @@ public class FaceServiceImpl implements FaceService {
 					JSONObject jsonObject = JSON.parseObject(respBody);
 					JSONArray faces = jsonObject.getJSONArray("faces");
 					if (1 != faces.size()) {
-						throw new StatusException("EX-620009", "检测到多张人脸. photoUrl=" + photoUrl);
+						throw new StatusException("620009", "检测到多张人脸. photoUrl=" + photoUrl);
 					}
 
 					JSONObject face = faces.getJSONObject(0);