weiwenhai 6 rokov pred
rodič
commit
39437e861a

+ 10 - 0
src/main/java/cn/com/qmth/examcloud/app/service/PropertyService.java

@@ -24,6 +24,8 @@ public class PropertyService {
     private String examAdminUrl;//考务服务
     @Value("${examcloud.net.exam.url}")
     private String netExamUrl;//网考服务
+    @Value("${examcloud.admin.exam.url}")
+    private String netAdminExamUrl;//网考后端服务
     @Value("${examcloud.question.pool.url}")
     private String questionPoolUrl;//题库服务
     @Value("${examcloud.user.auth.url}")
@@ -73,4 +75,12 @@ public class PropertyService {
         return smsTemplate;
     }
 
+	public String getNetAdminExamUrl() {
+		return netAdminExamUrl;
+	}
+
+	public void setNetAdminExamUrl(String netAdminExamUrl) {
+		this.netAdminExamUrl = netAdminExamUrl;
+	}
+    
 }

+ 2 - 2
src/main/java/cn/com/qmth/examcloud/app/service/impl/NetExamServiceImpl.java

@@ -209,7 +209,7 @@ public class NetExamServiceImpl implements NetExamService {
     @Override
 	public Result findExamRecordDataEntity(String key, String token, Long examRecordDataId) throws Exception {
 		//封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_admin/exam/record/data/findExamRecordDataEntity?examRecordDataId=%s", propertyService.getNetExamUrl(), examRecordDataId);
+        final String requestUrl = String.format("%s/api/ecs_oe_admin/exam/record/data/findExamRecordDataEntity?examRecordDataId=%s", propertyService.getNetAdminExamUrl(), examRecordDataId);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //过滤掉为空的属性
@@ -221,7 +221,7 @@ public class NetExamServiceImpl implements NetExamService {
     @Override
 	public Result getExamRecordQuestions(String key, String token, Long examRecordDataId) throws Exception {
 		//封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_admin/examRecordQuestions/getExamRecordQuestions?examRecordDataId=%s", propertyService.getNetExamUrl(), examRecordDataId);
+        final String requestUrl = String.format("%s/api/ecs_oe_admin/examRecordQuestions/getExamRecordQuestions?examRecordDataId=%s", propertyService.getNetAdminExamUrl(), examRecordDataId);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //过滤掉为空的属性

+ 2 - 0
src/main/resources/application-dev.properties

@@ -32,6 +32,8 @@ examcloud.base.info.url=http://192.168.10.39:8000
 examcloud.exam.admin.url=http://192.168.10.39:8001
 # ���������ַ
 examcloud.net.exam.url=http://192.168.10.39:8003
+#网考后端
+examcloud.admin.exam.url=http://192.168.10.39:8013
 # �������ַ
 examcloud.question.pool.url=http://192.168.10.39:8868
 # ��֤���ķ����ַ