Răsfoiți Sursa

仅修改接口和方法名称,未做任何实现变更

deason 6 ani în urmă
părinte
comite
6a49483e92
20 a modificat fișierele cu 159 adăugiri și 159 ștergeri
  1. 3 3
      src/main/java/cn/com/qmth/examcloud/app/controller/DeviceRecordController.java
  2. 9 9
      src/main/java/cn/com/qmth/examcloud/app/controller/OfflineExamController.java
  3. 28 28
      src/main/java/cn/com/qmth/examcloud/app/controller/PracticeExamRestController.java
  4. 7 7
      src/main/java/cn/com/qmth/examcloud/app/controller/SystemRestController.java
  5. 14 14
      src/main/java/cn/com/qmth/examcloud/app/controller/UserAuthRestController.java
  6. 8 8
      src/main/java/cn/com/qmth/examcloud/app/core/SysProperty.java
  7. 4 4
      src/main/java/cn/com/qmth/examcloud/app/core/config/FilterConfig.java
  8. 10 10
      src/main/java/cn/com/qmth/examcloud/app/core/config/TokenFilter.java
  9. 1 1
      src/main/java/cn/com/qmth/examcloud/app/service/CoreAuthService.java
  10. 1 1
      src/main/java/cn/com/qmth/examcloud/app/service/CoreBasicService.java
  11. 1 1
      src/main/java/cn/com/qmth/examcloud/app/service/CoreExamWorkService.java
  12. 1 1
      src/main/java/cn/com/qmth/examcloud/app/service/CoreOeService.java
  13. 1 1
      src/main/java/cn/com/qmth/examcloud/app/service/CoreQuestionService.java
  14. 13 13
      src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreAuthServiceImpl.java
  15. 6 6
      src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreBasicServiceImpl.java
  16. 10 10
      src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreExamWorkServiceImpl.java
  17. 25 25
      src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreOeServiceImpl.java
  18. 8 8
      src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreQuestionServiceImpl.java
  19. 6 6
      src/main/java/cn/com/qmth/examcloud/app/service/impl/SmsServiceImpl.java
  20. 3 3
      src/main/java/cn/com/qmth/examcloud/app/service/impl/UpYunServiceImpl.java

+ 3 - 3
src/main/java/cn/com/qmth/examcloud/app/controller/DeviceRecordController.java

@@ -10,8 +10,8 @@ package cn.com.qmth.examcloud.app.controller;
 import cn.com.qmth.examcloud.app.model.DeviceRecord;
 import cn.com.qmth.examcloud.app.model.DeviceRecordQuery;
 import cn.com.qmth.examcloud.app.model.Result;
+import cn.com.qmth.examcloud.app.service.CoreAuthService;
 import cn.com.qmth.examcloud.app.service.DeviceRecordService;
-import cn.com.qmth.examcloud.app.service.UserAuthService;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -34,7 +34,7 @@ public class DeviceRecordController {
     @Autowired
     private DeviceRecordService deviceRecordService;
     @Autowired
-    private UserAuthService userAuthService;
+    private CoreAuthService authService;
 
     @RequestMapping(value = "/list", method = RequestMethod.GET)
     public String list(@RequestParam String key, @RequestParam String token, Model model) throws Exception {
@@ -51,7 +51,7 @@ public class DeviceRecordController {
         if (StringUtils.isBlank(key) || StringUtils.isBlank(token)) {
             throw new IllegalArgumentException("[Param] key or token must be not null.");
         }
-        /*LoginInfo loginInfo = userAuthService.getLoginInfo(key);
+        /*LoginInfo loginInfo = authService.getLoginInfo(key);
         if (loginInfo == null || !token.equals(loginInfo.getToken())) {
             throw new IllegalArgumentException("[Param] key or token is wrong.");
         }*/

+ 9 - 9
src/main/java/cn/com/qmth/examcloud/app/controller/OfflineExamController.java

@@ -8,8 +8,8 @@
 package cn.com.qmth.examcloud.app.controller;
 
 import cn.com.qmth.examcloud.app.model.Result;
-import cn.com.qmth.examcloud.app.service.NetExamService;
-import cn.com.qmth.examcloud.app.service.QuestionPoolService;
+import cn.com.qmth.examcloud.app.service.CoreOeService;
+import cn.com.qmth.examcloud.app.service.CoreQuestionService;
 import cn.com.qmth.examcloud.app.service.UpYunService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -39,9 +39,9 @@ import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
 public class OfflineExamController {
     private static Logger log = LoggerFactory.getLogger(OfflineExamController.class);
     @Autowired
-    private NetExamService netExamService;
+    private CoreOeService oeService;
     @Autowired
-    private QuestionPoolService questionPoolService;
+    private CoreQuestionService questionService;
     @Autowired
     private UpYunService upYunService;
 
@@ -49,14 +49,14 @@ public class OfflineExamController {
     @ApiOperation(value = "获取当前用户参加的离线课程列表接口")
     @RequestMapping(value = "/course/list", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getOfflineExamCourseList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
-        return netExamService.getOfflineExamCourseList(key, token);
+        return oeService.getOfflineExamCourseList(key, token);
     }
 
     @ResponseBody
     @ApiOperation(value = "离线考试的抽取考题接口")
     @RequestMapping(value = "/record/start", method = {RequestMethod.GET, RequestMethod.POST})
     public Result startOfflineExamRecord(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examStudentId) throws Exception {
-        return netExamService.startOfflineExamRecord(key, token, examStudentId);
+        return oeService.startOfflineExamRecord(key, token, examStudentId);
     }
 
     @ResponseBody
@@ -73,20 +73,20 @@ public class OfflineExamController {
         if (multipart == null) {
             return new Result().error("请选择要上传文件!");
         }
-        return netExamService.uploadPaperAnswer(key, token, examRecordId, multipart.getBytes(), multipart.getOriginalFilename(), md5);
+        return oeService.uploadPaperAnswer(key, token, examRecordId, multipart.getBytes(), multipart.getOriginalFilename(), md5);
     }
 
     @ResponseBody
     @ApiOperation(value = "获取某份试卷的详细信息接口")
     @RequestMapping(value = "/paper/detail", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getPaperDetail(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String paperId) throws Exception {
-        return questionPoolService.getPaperDetail(key, token, paperId);
+        return questionService.getPaperDetail(key, token, paperId);
     }
 
     @ApiOperation(value = "下载考题接口")
     @RequestMapping(value = "/paper/download", method = {RequestMethod.GET})
     public String downloadPaper(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String paperId, @RequestParam String orgName) throws Exception {
-        String requestUrl = "redirectPermanent:" + questionPoolService.downloadPaper(key, token, paperId, orgName);
+        String requestUrl = "redirectPermanent:" + questionService.downloadPaper(key, token, paperId, orgName);
         log.debug(requestUrl);
         return requestUrl;
     }

+ 28 - 28
src/main/java/cn/com/qmth/examcloud/app/controller/PracticeExamRestController.java

@@ -8,9 +8,9 @@
 package cn.com.qmth.examcloud.app.controller;
 
 import cn.com.qmth.examcloud.app.model.Result;
-import cn.com.qmth.examcloud.app.service.ExamAdminService;
-import cn.com.qmth.examcloud.app.service.NetExamService;
-import cn.com.qmth.examcloud.app.service.QuestionPoolService;
+import cn.com.qmth.examcloud.app.service.CoreExamWorkService;
+import cn.com.qmth.examcloud.app.service.CoreOeService;
+import cn.com.qmth.examcloud.app.service.CoreQuestionService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,143 +31,143 @@ import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
 @Api(tags = "在线练习相关接口")
 public class PracticeExamRestController {
     @Autowired
-    private ExamAdminService examAdminService;
+    private CoreExamWorkService examWorkService;
     @Autowired
-    private NetExamService netExamService;
+    private CoreOeService oeService;
     @Autowired
-    private QuestionPoolService questionPoolService;
+    private CoreQuestionService questionService;
 
     @ApiOperation(value = "获取某考生的“考试批次”列表接口")
     @RequestMapping(value = "/exam/practice/list", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getPracticeExamList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String studentId) throws Exception {
-        return examAdminService.getPracticeExamList(key, token, studentId);
+        return examWorkService.getPracticeExamList(key, token, studentId);
     }
 
     @ApiOperation(value = "获取某考试批次下的课程列表接口")
     @RequestMapping(value = "/exam/practice/course/list", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getPracticeExamCourseList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examId) throws Exception {
-        return netExamService.getPracticeExamCourseList(key, token, examId);
+        return oeService.getPracticeExamCourseList(key, token, examId);
     }
 
     @ApiOperation(value = "获取当前练习的剩余作答时间接口")
     @RequestMapping(value = "/exam/record/heartbeat", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getExamRecordHeartbeat(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
-        return netExamService.getExamRecordHeartbeat(key, token);
+        return oeService.getExamRecordHeartbeat(key, token);
     }
 
     @ApiOperation(value = "考生“开始练习”接口")
     @RequestMapping(value = "/exam/record/start", method = {RequestMethod.GET, RequestMethod.POST})
     public Result startPracticeExamRecord(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examStudentId) throws Exception {
-        return netExamService.startPracticeExamRecord(key, token, examStudentId);
+        return oeService.startPracticeExamRecord(key, token, examStudentId);
     }
 
     @ApiOperation(value = "获取当前练习的试卷大题结构信息接口")
     @RequestMapping(value = "/exam/record/paper/struct/list", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getExamRecordPaperStructList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examRecordId) throws Exception {
-        return netExamService.getExamRecordPaperStructList(key, token, examRecordId);
+        return oeService.getExamRecordPaperStructList(key, token, examRecordId);
     }
 
     @ApiOperation(value = "获取当前练习的考试基本信息接口")
     @RequestMapping(value = "/exam/info/{examId}", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getExamInfo(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examId) throws Exception {
-        return examAdminService.getExamInfo(key, token, examId);
+        return examWorkService.getExamInfo(key, token, examId);
     }
 
     @ApiOperation(value = "获取当前练习的试卷试题列表接口")
     @RequestMapping(value = "/exam/record/paper/question/list", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getExamRecordPaperQuestionList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
-        return netExamService.getExamRecordPaperQuestionList(key, token);
+        return oeService.getExamRecordPaperQuestionList(key, token);
     }
 
     @ApiOperation(value = "获取考生作答的某个试题的详细信息接口")
     @RequestMapping(value = "/exam/record/paper/question/detail/{questionId}/{examRecordId}", method = {RequestMethod.GET, RequestMethod.POST})
     public Result questionDetail(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable String questionId, @PathVariable String examRecordId) throws Exception {
-        return netExamService.getExamRecordPaperQuestionDetail(key, token, questionId, examRecordId);
+        return oeService.getExamRecordPaperQuestionDetail(key, token, questionId, examRecordId);
     }
 
     @ApiOperation(value = "保存或更新考生作答的某个试题答案接口")
     @RequestMapping(value = "/exam/record/paper/question/answer/update", method = {RequestMethod.GET, RequestMethod.POST})
     public Result updateExamRecordPaperQuestionAnswer(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam Integer order, @RequestParam String studentAnswer) throws Exception {
-        return netExamService.updateExamRecordPaperQuestionAnswer(key, token, order, studentAnswer);
+        return oeService.updateExamRecordPaperQuestionAnswer(key, token, order, studentAnswer);
     }
 
     @ApiOperation(value = "当前练习的交卷接口")
     @RequestMapping(value = "/exam/record/submit", method = {RequestMethod.GET, RequestMethod.POST})
     public Result submitPracticeExamRecord(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
-        return netExamService.submitPracticeExamRecord(key, token);
+        return oeService.submitPracticeExamRecord(key, token);
     }
 
     @ApiOperation(value = "检查考生当前是否有正在进行的练习记录接口")
     @RequestMapping(value = "/exam/record/online/check", method = {RequestMethod.GET, RequestMethod.POST})
     public Result checkOnlineExamRecord(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
-        return netExamService.checkOnlineExamRecord(key, token);
+        return oeService.checkOnlineExamRecord(key, token);
     }
 
     @ApiOperation(value = "获取当前考生的当前课程的历史练习记录接口")
     @RequestMapping(value = "/exam/record/practice/course/history/list", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getExamRecordPracticeHistoryList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examStudentId) throws Exception {
-        return netExamService.getExamRecordPracticeHistoryList(key, token, examStudentId);
+        return oeService.getExamRecordPracticeHistoryList(key, token, examStudentId);
     }
 
     @ApiOperation(value = "获取成绩报告的答题情况统计接口")
     @RequestMapping(value = "/exam/record/total", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getExamRecordTotalInfo(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examRecordId) throws Exception {
-        return netExamService.getExamRecordTotalInfo(key, token, examRecordId);
+        return oeService.getExamRecordTotalInfo(key, token, examRecordId);
     }
 
     @ApiOperation(value = "获取作答的题列表接口")
     @RequestMapping(value = "/exam/record/paper/question/detail/list", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getExamRecordQuestionDetailList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examRecordId) throws Exception {
-        return netExamService.getExamRecordQuestionDetailList(key, token, examRecordId);
+        return oeService.getExamRecordQuestionDetailList(key, token, examRecordId);
     }
 
     @ApiOperation(value = "获取当前试题的音频已播放次数接口")
     @RequestMapping(value = "/exam/record/paper/question/get/playtimes", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getExamRecordQuestionAudioPlayTimes(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String questionId) throws Exception {
-        return netExamService.getExamRecordQuestionAudioPlayTimes(key, token, questionId);
+        return oeService.getExamRecordQuestionAudioPlayTimes(key, token, questionId);
     }
 
     @ApiOperation(value = "更新当前试题的音频已播放次数接口")
     @RequestMapping(value = "/exam/record/paper/question/update/playtimes", method = {RequestMethod.GET, RequestMethod.POST})
     public Result updateExamRecordQuestionAudioPlayTimes(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String questionId, @RequestParam String mediaName) throws Exception {
-        return netExamService.updateExamRecordQuestionAudioPlayTimes(key, token, questionId, mediaName);
+        return oeService.updateExamRecordQuestionAudioPlayTimes(key, token, questionId, mediaName);
     }
 
     @ApiOperation(value = "开考前查询“考试说明”")
     @RequestMapping(value = "/exam/practice/before/{examId}/{type}", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getBeforeExamRemark(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examId, @PathVariable String type) throws Exception {
-        return examAdminService.getBeforeExamRemark(key, token, examId, type);
+        return examWorkService.getBeforeExamRemark(key, token, examId, type);
     }
 
     @ApiOperation(value = "查询练习记录配置信息")
     @RequestMapping(value = "/exam/practice/end/findExamRecordDataEntity/{examRecordDataId}", method = {RequestMethod.GET, RequestMethod.POST})
     public Result findExamRecordDataEntity(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examRecordDataId) throws Exception {
-        return netExamService.findExamRecordDataEntity(key, token, examRecordDataId);
+        return oeService.findExamRecordDataEntity(key, token, examRecordDataId);
     }
 
     @ApiOperation(value = "查询练习记录试题列表")
     @RequestMapping(value = "/exam/practice/end/getExamRecordQuestions/{examRecordDataId}", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getExamRecordQuestions(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examRecordDataId) throws Exception {
-        return netExamService.getExamRecordQuestions(key, token, examRecordDataId);
+        return oeService.getExamRecordQuestions(key, token, examRecordDataId);
     }
 
     @ApiOperation(value = "查询某个试题内容")
     @RequestMapping(value = "/exam/practice/end/question", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getQuestion(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String courseCode,
                               @RequestParam Long examId, @RequestParam String groupCode, @RequestParam String questionId) throws Exception {
-        return questionPoolService.getQuestion(key, token, courseCode, examId, groupCode, questionId);
+        return questionService.getQuestion(key, token, courseCode, examId, groupCode, questionId);
     }
 
     @ApiOperation(value = "获取冻结时间")
     @RequestMapping(value = "/exam/practice/getFreezeTime", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getFreezeTime(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam Long examId) throws Exception {
-        return examAdminService.getFreezeTime(key, token, examId);
+        return examWorkService.getFreezeTime(key, token, examId);
     }
 
     @ApiOperation(value = "获取文件上传类型")
     @RequestMapping(value = "/exam/practice/getUpLoadType/{examId}", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getUpLoadType(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examId) throws Exception {
-        return examAdminService.getUpLoadType(key, token, examId);
+        return examWorkService.getUpLoadType(key, token, examId);
     }
 
 }

+ 7 - 7
src/main/java/cn/com/qmth/examcloud/app/controller/SystemRestController.java

@@ -8,9 +8,9 @@
 package cn.com.qmth.examcloud.app.controller;
 
 import cn.com.qmth.examcloud.app.model.Result;
-import cn.com.qmth.examcloud.app.service.NetExamService;
+import cn.com.qmth.examcloud.app.service.CoreOeService;
 import cn.com.qmth.examcloud.app.service.SmsService;
-import cn.com.qmth.examcloud.app.service.UserAuthService;
+import cn.com.qmth.examcloud.app.service.CoreAuthService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,28 +31,28 @@ import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
 @Api(tags = "系统服务相关接口")
 public class SystemRestController {
     @Autowired
-    private NetExamService netExamService;
+    private CoreOeService oeService;
     @Autowired
-    private UserAuthService userAuthService;
+    private CoreAuthService authService;
     @Autowired
     private SmsService smsService;
 
     @ApiOperation(value = "获取服务器当前时间接口")
     @RequestMapping(value = "/system/currentTime", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getCurrentTime(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
-        return netExamService.getCurrentTime(key, token);
+        return oeService.getCurrentTime(key, token);
     }
 
     @ApiOperation(value = "获取短信验证码接口")
     @RequestMapping(value = "/send/sms/code", method = {RequestMethod.GET, RequestMethod.POST})
     public Result sendSmsCode(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String phone) throws Exception {
-        return userAuthService.sendSmsCode(key, token, phone);
+        return authService.sendSmsCode(key, token, phone);
     }
 
     @ApiOperation(value = "获取短信验证码接口(不带token)")
     @RequestMapping(value = "/send/sms/code4Student", method = {RequestMethod.GET, RequestMethod.POST})
     public Result sendSmsCode(@RequestParam String phone) throws Exception {
-        return userAuthService.code4Student(phone, true);
+        return authService.code4Student(phone, true);
     }
 
     @ApiOperation(value = "校验短信验证码接口", hidden = true)

+ 14 - 14
src/main/java/cn/com/qmth/examcloud/app/controller/UserAuthRestController.java

@@ -11,8 +11,8 @@ import cn.com.qmth.examcloud.app.model.LoginInfo;
 import cn.com.qmth.examcloud.app.model.LoginType;
 import cn.com.qmth.examcloud.app.model.Result;
 import cn.com.qmth.examcloud.app.model.UserInfo;
-import cn.com.qmth.examcloud.app.service.BaseInfoService;
-import cn.com.qmth.examcloud.app.service.UserAuthService;
+import cn.com.qmth.examcloud.app.service.CoreBasicService;
+import cn.com.qmth.examcloud.app.service.CoreAuthService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
@@ -36,16 +36,16 @@ import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
 public class UserAuthRestController {
     private final static Logger log = LoggerFactory.getLogger(UserAuthRestController.class);
     @Autowired
-    private UserAuthService userAuthService;
+    private CoreAuthService authService;
     @Autowired
-    private BaseInfoService baseInfoService;
+    private CoreBasicService basicService;
 
     @ApiOperation(value = "登录接口", notes = "参数accountType值说明:学生身份证号类型=STUDENT_IDENTITY_NUMBER,学生学号类型=STUDENT_CODE,学生手机号类型=STUDENT_PHONE")
     @RequestMapping(value = "/user/login", method = {RequestMethod.GET, RequestMethod.POST})
     public Result<UserInfo> login(@RequestParam String account, @RequestParam String password, @RequestParam String accountType, @RequestParam(required = false) Long rootOrgId,
                                   @RequestParam(required = false) String domain, @RequestHeader String deviceId) throws Exception {
         LoginInfo loginInfo = new LoginInfo(account, password, accountType, rootOrgId, domain, deviceId, null);
-        Result<UserInfo> result = userAuthService.login(loginInfo);
+        Result<UserInfo> result = authService.login(loginInfo);
         if (result.isSuccess() && result.getData() != null) {
             //登录成功后缓存Token信息
             UserInfo userInfo = result.getData();
@@ -53,7 +53,7 @@ public class UserAuthRestController {
             loginInfo.setKey(userInfo.getKey());
             loginInfo.setToken(userInfo.getToken());
             loginInfo.setAppToken(userInfo.getToken());
-            userAuthService.cacheLoginInfo(loginInfo, userInfo.getKey());
+            authService.cacheLoginInfo(loginInfo, userInfo.getKey());
             log.info(String.format("key:%s token:%s", userInfo.getKey(), userInfo.getToken()));
         }
         return result;
@@ -64,7 +64,7 @@ public class UserAuthRestController {
     public Result<UserInfo> verifyLogin(@RequestParam String account, @RequestParam String smsCode, @RequestParam(required = false) Long rootOrgId,
                                         @RequestParam(required = false) String domain, @RequestHeader String deviceId) throws Exception {
         LoginInfo loginInfo = new LoginInfo(account, null, LoginType.STUDENT_PHONE.name(), rootOrgId, domain, deviceId, smsCode);
-        Result<UserInfo> result = userAuthService.login(loginInfo);
+        Result<UserInfo> result = authService.login(loginInfo);
         if (result.isSuccess() && result.getData() != null) {
             //登录成功后缓存Token信息
             UserInfo userInfo = result.getData();
@@ -72,7 +72,7 @@ public class UserAuthRestController {
             loginInfo.setToken(userInfo.getToken());
             loginInfo.setKey(userInfo.getKey());
             loginInfo.setAppToken(userInfo.getToken());
-            userAuthService.cacheLoginInfo(loginInfo, userInfo.getKey());
+            authService.cacheLoginInfo(loginInfo, userInfo.getKey());
             log.info(String.format("key:%s token:%s", userInfo.getKey(), userInfo.getToken()));
         }
         return result;
@@ -81,33 +81,33 @@ public class UserAuthRestController {
     @ApiOperation(value = "登出接口")
     @RequestMapping(value = "/user/logout", method = {RequestMethod.GET, RequestMethod.POST})
     public Result logout(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
-        return userAuthService.logout(key, token);
+        return authService.logout(key, token);
     }
 
     @ApiOperation(value = "获取用户信息接口")
     @RequestMapping(value = "/user/info", method = {RequestMethod.GET, RequestMethod.POST})
     public Result getUserInfo(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
-        //return userAuthService.getUserInfo(key, token);
-        return baseInfoService.getStudentInfo(key, token);
+        //return authService.getUserInfo(key, token);
+        return basicService.getStudentInfo(key, token);
     }
 
     @ApiOperation(value = "修改密码接口")
     @RequestMapping(value = "/user/update/password", method = {RequestMethod.GET, RequestMethod.POST})
     public Result updatePassword(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam Long studentId, @RequestParam String password,
                                  @RequestParam String newPassword) throws Exception {
-        return userAuthService.updateStudentPassword(key, token, studentId, password, newPassword);
+        return authService.updateStudentPassword(key, token, studentId, password, newPassword);
     }
 
     @ApiOperation(value = "重置密码接口")
     @RequestMapping(value = "/user/reset/password", method = {RequestMethod.GET, RequestMethod.POST})
     public Result updateNewPassword(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String newPassword) throws Exception {
-        return userAuthService.resetStudentPassword(key, token, newPassword);
+        return authService.resetStudentPassword(key, token, newPassword);
     }
 
     @ApiOperation(value = "保存用户绑定的手机号接口")
     @RequestMapping(value = "/user/binding/phone", method = {RequestMethod.GET, RequestMethod.POST})
     public Result userBindingPhone(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String phone, @RequestParam String code) throws Exception {
-        return userAuthService.userBindingPhone(key, token, phone, code);
+        return authService.userBindingPhone(key, token, phone, code);
     }
 
 }

+ 8 - 8
src/main/java/cn/com/qmth/examcloud/app/core/PropertyService.java → src/main/java/cn/com/qmth/examcloud/app/core/SysProperty.java

@@ -17,8 +17,8 @@ import org.springframework.stereotype.Component;
  * 属性配置服务类
  */
 @Component
-public class PropertyService {
-    private static Logger log = LoggerFactory.getLogger(PropertyService.class);
+public class SysProperty {
+    private static Logger log = LoggerFactory.getLogger(SysProperty.class);
     @Autowired
     private CloudDiscoveryClient discoveryClient;
 
@@ -34,27 +34,27 @@ public class PropertyService {
     @Value("${examcloud.sms.template}")
     private String smsTemplate;//短信模板Code
 
-    public String getBaseInfoUrl() {
+    public String getCoreBasicUrl() {
         return discoveryClient.getInstanceUrl(Constants.EC_CORE_BASIC);
     }
 
-    public String getExamAdminUrl() {
+    public String getCoreExamWorkUrl() {
         return discoveryClient.getInstanceUrl(Constants.EC_CORE_EXAMWORK);
     }
 
-    public String getNetExamUrl() {
+    public String getCoreOeStudentUrl() {
         return discoveryClient.getInstanceUrl(Constants.EC_CORE_OE_STUDENT);
     }
 
-    public String getNetAdminExamUrl() {
+    public String getCoreOeAdminUrl() {
         return discoveryClient.getInstanceUrl(Constants.EC_CORE_OE_ADMIN);
     }
 
-    public String getQuestionPoolUrl() {
+    public String getCoreQuestionUrl() {
         return discoveryClient.getInstanceUrl(Constants.EC_CORE_QUESTION);
     }
 
-    public String getUserAuthUrl() {
+    public String getCoreAuthUrl() {
         return discoveryClient.getInstanceUrl(Constants.EC_CORE_BASIC);
     }
 

+ 4 - 4
src/main/java/cn/com/qmth/examcloud/app/core/config/FilterConfig.java

@@ -7,7 +7,7 @@
 
 package cn.com.qmth.examcloud.app.core.config;
 
-import cn.com.qmth.examcloud.app.service.UserAuthService;
+import cn.com.qmth.examcloud.app.service.CoreAuthService;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.web.servlet.FilterRegistrationBean;
 import org.springframework.context.annotation.Bean;
@@ -26,11 +26,11 @@ import java.util.List;
 public class FilterConfig {
 
     @Bean
-    @ConditionalOnBean({UserAuthService.class})
-    public FilterRegistrationBean filterRegistrationBean(UserAuthService userAuthService) {
+    @ConditionalOnBean({CoreAuthService.class})
+    public FilterRegistrationBean filterRegistrationBean(CoreAuthService authService) {
         FilterRegistrationBean registrationBean = new FilterRegistrationBean();
         TokenFilter tokenFilter = new TokenFilter();
-        tokenFilter.setUserAuthService(userAuthService);
+        tokenFilter.setAuthService(authService);
         registrationBean.setFilter(tokenFilter);
         List<String> urlPatterns = new ArrayList<>();
         //过滤器UrlPatterns通配符为一个"*"

+ 10 - 10
src/main/java/cn/com/qmth/examcloud/app/core/config/TokenFilter.java

@@ -11,7 +11,7 @@ import cn.com.qmth.examcloud.app.model.Constants;
 import cn.com.qmth.examcloud.app.model.LoginInfo;
 import cn.com.qmth.examcloud.app.model.Result;
 import cn.com.qmth.examcloud.app.model.UserInfo;
-import cn.com.qmth.examcloud.app.service.UserAuthService;
+import cn.com.qmth.examcloud.app.service.CoreAuthService;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -35,7 +35,7 @@ import static cn.com.qmth.examcloud.app.model.Constants.PLATFORM_SESSION_EXPIRE_
  */
 public class TokenFilter implements Filter {
     private final static Logger log = LoggerFactory.getLogger(TokenFilter.class);
-    private UserAuthService userAuthService;
+    private CoreAuthService authService;
 
     @Override
     public void init(FilterConfig filterConfig) throws ServletException {
@@ -88,7 +88,7 @@ public class TokenFilter implements Filter {
                 //ignore
             }
 
-            boolean isDoing = userAuthService.isDoingExam(rootOrgId, accountType, account);
+            boolean isDoing = authService.isDoingExam(rootOrgId, accountType, account);
             if (isDoing) {
                 reqContinue.yes = false;
                 this.renderError(response, new Result().error("尚在考试中不允许登录!").toString());
@@ -104,7 +104,7 @@ public class TokenFilter implements Filter {
         }
 
         //通过key获取原始登录信息
-        LoginInfo loginInfo = userAuthService.getLoginInfo(appKey);
+        LoginInfo loginInfo = authService.getLoginInfo(appKey);
         if (loginInfo == null) {
             //原始登录信息为空,则代表尚未登录不用处理
             return null;
@@ -121,7 +121,7 @@ public class TokenFilter implements Filter {
         boolean isAllow = this.filterAccessUrl(url);
         if (!isAllow) {
             if (loginInfo.hasExpired(PLATFORM_SESSION_EXPIRE_TIME)) {
-                boolean isDoing = userAuthService.isDoingExam(loginInfo.getRootOrgId(), loginInfo.getAccountType(), loginInfo.getAccount());
+                boolean isDoing = authService.isDoingExam(loginInfo.getRootOrgId(), loginInfo.getAccountType(), loginInfo.getAccount());
                 if (isDoing) {
                     reqContinue.yes = false;
                     this.renderError(response, new Result().error("尚在考试中不允许登录!").toString());
@@ -138,13 +138,13 @@ public class TokenFilter implements Filter {
         customRequest.addHeader(Constants.PARAM_APP_TOKEN, loginInfo.getToken());
 
         //初始化内部接口请求鉴权
-        userAuthService.initRequestTrace();
+        authService.initRequestTrace();
         return customRequest;
     }
 
     private void reLogin(LoginInfo loginInfo) {
         try {
-            Result<UserInfo> result = userAuthService.login(loginInfo);
+            Result<UserInfo> result = authService.login(loginInfo);
             UserInfo userInfo = result.getData();
             if (userInfo == null) {
                 log.debug("reLogin failed,Maybe user's password has changed.");
@@ -155,7 +155,7 @@ public class TokenFilter implements Filter {
             loginInfo.setUserName(userInfo.getDisplayName());
             loginInfo.setToken(userInfo.getToken());
             loginInfo.setCreateTime(new Date());
-            userAuthService.cacheLoginInfo(loginInfo, userInfo.getKey());
+            authService.cacheLoginInfo(loginInfo, userInfo.getKey());
         } catch (Exception e) {
             log.error(e.getMessage());
         }
@@ -190,8 +190,8 @@ public class TokenFilter implements Filter {
         }
     }
 
-    public void setUserAuthService(UserAuthService userAuthService) {
-        this.userAuthService = userAuthService;
+    public void setAuthService(CoreAuthService authService) {
+        this.authService = authService;
     }
 
     class Continue {

+ 1 - 1
src/main/java/cn/com/qmth/examcloud/app/service/UserAuthService.java → src/main/java/cn/com/qmth/examcloud/app/service/CoreAuthService.java

@@ -17,7 +17,7 @@ import cn.com.qmth.examcloud.app.model.UserInfo;
  * @author: fengdesheng
  * @since: 2018/7/31
  */
-public interface UserAuthService {
+public interface CoreAuthService {
 
     /**
      * 检查某考生是否存在正在(在线考试类型)考试中

+ 1 - 1
src/main/java/cn/com/qmth/examcloud/app/service/BaseInfoService.java → src/main/java/cn/com/qmth/examcloud/app/service/CoreBasicService.java

@@ -15,7 +15,7 @@ import cn.com.qmth.examcloud.app.model.Result;
  * @author: fengdesheng
  * @since: 2018/7/31
  */
-public interface BaseInfoService {
+public interface CoreBasicService {
 
     /**
      * 获取学生用户信息

+ 1 - 1
src/main/java/cn/com/qmth/examcloud/app/service/ExamAdminService.java → src/main/java/cn/com/qmth/examcloud/app/service/CoreExamWorkService.java

@@ -15,7 +15,7 @@ import cn.com.qmth.examcloud.app.model.Result;
  * @author: fengdesheng
  * @since: 2018/7/31
  */
-public interface ExamAdminService {
+public interface CoreExamWorkService {
 
     /**
      * 获取某考生的“考试批次”列表

+ 1 - 1
src/main/java/cn/com/qmth/examcloud/app/service/NetExamService.java → src/main/java/cn/com/qmth/examcloud/app/service/CoreOeService.java

@@ -15,7 +15,7 @@ import cn.com.qmth.examcloud.app.model.Result;
  * @author: fengdesheng
  * @since: 2018/7/31
  */
-public interface NetExamService {
+public interface CoreOeService {
 
     /**
      * 获取服务器当前时间

+ 1 - 1
src/main/java/cn/com/qmth/examcloud/app/service/QuestionPoolService.java → src/main/java/cn/com/qmth/examcloud/app/service/CoreQuestionService.java

@@ -15,7 +15,7 @@ import cn.com.qmth.examcloud.app.model.Result;
  * @author: fengdesheng
  * @since: 2018/7/31
  */
-public interface QuestionPoolService {
+public interface CoreQuestionService {
 
     /**
      * 下载考题

+ 13 - 13
src/main/java/cn/com/qmth/examcloud/app/service/impl/UserAuthServiceImpl.java → src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreAuthServiceImpl.java

@@ -13,9 +13,9 @@ import cn.com.qmth.examcloud.app.core.utils.HttpUtils;
 import cn.com.qmth.examcloud.app.core.utils.JsonMapper;
 import cn.com.qmth.examcloud.app.core.utils.ThreadUtils;
 import cn.com.qmth.examcloud.app.model.*;
-import cn.com.qmth.examcloud.app.core.PropertyService;
+import cn.com.qmth.examcloud.app.core.SysProperty;
 import cn.com.qmth.examcloud.app.service.RedisService;
-import cn.com.qmth.examcloud.app.service.UserAuthService;
+import cn.com.qmth.examcloud.app.service.CoreAuthService;
 import okhttp3.*;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -36,10 +36,10 @@ import static cn.com.qmth.examcloud.app.model.Constants.*;
  * @since: 2018/7/16
  */
 @Service
-public class UserAuthServiceImpl implements UserAuthService {
-    private static Logger log = LoggerFactory.getLogger(UserAuthServiceImpl.class);
+public class CoreAuthServiceImpl implements CoreAuthService {
+    private static Logger log = LoggerFactory.getLogger(CoreAuthServiceImpl.class);
     @Autowired
-    private PropertyService propertyService;
+    private SysProperty sysProperty;
     @Autowired
     private RedisService redisService;
 
@@ -63,7 +63,7 @@ public class UserAuthServiceImpl implements UserAuthService {
         }
 
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/getStudentOnLineExamInfo", propertyService.getNetExamUrl());
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/getStudentOnLineExamInfo", sysProperty.getCoreOeStudentUrl());
         try {
             //执行请求
             String json = new JsonMapper().toJson(params);
@@ -93,7 +93,7 @@ public class UserAuthServiceImpl implements UserAuthService {
             loginInfo.setAccountType(LoginType.STUDENT_PHONE.name());
         }
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_core/auth/login", propertyService.getBaseInfoUrl());
+        final String requestUrl = String.format("%s/api/ecs_core/auth/login", sysProperty.getCoreBasicUrl());
         Map<String, String> params = new HashMap<>();
         params.put("accountValue", loginInfo.getAccount());
         params.put("password", loginInfo.getPassword());
@@ -127,7 +127,7 @@ public class UserAuthServiceImpl implements UserAuthService {
     @Override
     public Result logout(String key, String token) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_core/auth/logout", propertyService.getUserAuthUrl());
+        final String requestUrl = String.format("%s/api/ecs_core/auth/logout", sysProperty.getCoreAuthUrl());
         RequestBody formBody = new FormBody.Builder()
                 .add(PARAM_KEY, key)
                 .add(PARAM_TOKEN, token)
@@ -142,7 +142,7 @@ public class UserAuthServiceImpl implements UserAuthService {
     public Result updateStudentPassword(String key, String token, Long studentId, String password, String newPassword) throws Exception {
         Assert.notNull(studentId, "StudentId must be not null.");
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_core/student/password", propertyService.getUserAuthUrl());
+        final String requestUrl = String.format("%s/api/ecs_core/student/password", sysProperty.getCoreAuthUrl());
         RequestBody formBody = new FormBody.Builder()
                 .add("studentId", studentId.toString())
                 .add("password", password)
@@ -154,7 +154,7 @@ public class UserAuthServiceImpl implements UserAuthService {
     @Override
     public Result resetStudentPassword(String key, String token, String newPassword) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_core/student/password/direct", propertyService.getUserAuthUrl());
+        final String requestUrl = String.format("%s/api/ecs_core/student/password/direct", sysProperty.getCoreAuthUrl());
         RequestBody formBody = new FormBody.Builder()
                 .add("newPassword", newPassword)
                 .build();
@@ -164,7 +164,7 @@ public class UserAuthServiceImpl implements UserAuthService {
     @Override
     public Result sendSmsCode(String key, String token, String phone) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_core/auth/sendVerificationCode", propertyService.getUserAuthUrl());
+        final String requestUrl = String.format("%s/api/ecs_core/auth/sendVerificationCode", sysProperty.getCoreAuthUrl());
         RequestBody formBody = new FormBody.Builder()
                 .add("phone", phone)
                 .build();
@@ -174,7 +174,7 @@ public class UserAuthServiceImpl implements UserAuthService {
     @Override
     public Result code4Student(String phone, Boolean bound) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_core/auth/sendVerificationCode4Student", propertyService.getUserAuthUrl());
+        final String requestUrl = String.format("%s/api/ecs_core/auth/sendVerificationCode4Student", sysProperty.getCoreAuthUrl());
         RequestBody formBody = new FormBody.Builder()
                 .add("phone", phone)
                 .add("bound", bound.toString())
@@ -193,7 +193,7 @@ public class UserAuthServiceImpl implements UserAuthService {
     @Override
     public Result userBindingPhone(String key, String token, String phone, String code) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_core/auth/bindSecurityPhone", propertyService.getUserAuthUrl());
+        final String requestUrl = String.format("%s/api/ecs_core/auth/bindSecurityPhone", sysProperty.getCoreAuthUrl());
         RequestBody formBody = new FormBody.Builder()
                 .add("phone", phone)
                 .add("verificationCode", code)

+ 6 - 6
src/main/java/cn/com/qmth/examcloud/app/service/impl/BaseInfoServiceImpl.java → src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreBasicServiceImpl.java

@@ -9,8 +9,8 @@ package cn.com.qmth.examcloud.app.service.impl;
 
 import cn.com.qmth.examcloud.app.core.utils.HttpUtils;
 import cn.com.qmth.examcloud.app.model.Result;
-import cn.com.qmth.examcloud.app.service.BaseInfoService;
-import cn.com.qmth.examcloud.app.core.PropertyService;
+import cn.com.qmth.examcloud.app.service.CoreBasicService;
+import cn.com.qmth.examcloud.app.core.SysProperty;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -23,15 +23,15 @@ import org.springframework.stereotype.Service;
  * @since: 2018/7/16
  */
 @Service
-public class BaseInfoServiceImpl implements BaseInfoService {
-    private static Logger log = LoggerFactory.getLogger(BaseInfoServiceImpl.class);
+public class CoreBasicServiceImpl implements CoreBasicService {
+    private static Logger log = LoggerFactory.getLogger(CoreBasicServiceImpl.class);
     @Autowired
-    private PropertyService propertyService;
+    private SysProperty sysProperty;
 
     @Override
     public Result getStudentInfo(String key, String token) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_core/student/getStudentInfoBySession", propertyService.getBaseInfoUrl());
+        final String requestUrl = String.format("%s/api/ecs_core/student/getStudentInfoBySession", sysProperty.getCoreBasicUrl());
         //包含头像、手机号等字段
         return HttpUtils.doGet(requestUrl, key, token);
     }

+ 10 - 10
src/main/java/cn/com/qmth/examcloud/app/service/impl/ExamAdminServiceImpl.java → src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreExamWorkServiceImpl.java

@@ -9,8 +9,8 @@ package cn.com.qmth.examcloud.app.service.impl;
 
 import cn.com.qmth.examcloud.app.core.utils.HttpUtils;
 import cn.com.qmth.examcloud.app.model.Result;
-import cn.com.qmth.examcloud.app.service.ExamAdminService;
-import cn.com.qmth.examcloud.app.core.PropertyService;
+import cn.com.qmth.examcloud.app.service.CoreExamWorkService;
+import cn.com.qmth.examcloud.app.core.SysProperty;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -24,15 +24,15 @@ import org.springframework.stereotype.Service;
  * @since: 2018/7/16
  */
 @Service
-public class ExamAdminServiceImpl implements ExamAdminService {
-    private static Logger log = LoggerFactory.getLogger(ExamAdminServiceImpl.class);
+public class CoreExamWorkServiceImpl implements CoreExamWorkService {
+    private static Logger log = LoggerFactory.getLogger(CoreExamWorkServiceImpl.class);
     @Autowired
-    private PropertyService propertyService;
+    private SysProperty sysProperty;
 
     @Override
     public Result getPracticeExamList(String key, String token, String studentId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/queryByNameLike?name=&examTypes=PRACTICE&studentId=%s", propertyService.getExamAdminUrl(), studentId);
+        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/queryByNameLike?name=&examTypes=PRACTICE&studentId=%s", sysProperty.getCoreExamWorkUrl(), studentId);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             String data = result.getData();
@@ -48,7 +48,7 @@ public class ExamAdminServiceImpl implements ExamAdminService {
     @Override
     public Result getExamInfo(String key, String token, Long examId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/%s", propertyService.getExamAdminUrl(), examId);
+        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/%s", sysProperty.getCoreExamWorkUrl(), examId);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //过滤掉为空的属性
@@ -60,7 +60,7 @@ public class ExamAdminServiceImpl implements ExamAdminService {
     @Override
     public Result getBeforeExamRemark(String key, String token, Long examId, String type) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/examOrgProperty/%s/%s", propertyService.getExamAdminUrl(), examId, type);
+        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/examOrgProperty/%s/%s", sysProperty.getCoreExamWorkUrl(), examId, type);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //过滤掉为空的属性
@@ -72,7 +72,7 @@ public class ExamAdminServiceImpl implements ExamAdminService {
     @Override
     public Result getFreezeTime(String key, String token, Long examId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/examOrgProperty/%s/FREEZE_TIME", propertyService.getExamAdminUrl(), examId);
+        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/examOrgProperty/%s/FREEZE_TIME", sysProperty.getCoreExamWorkUrl(), examId);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //过滤掉为空的属性
@@ -84,7 +84,7 @@ public class ExamAdminServiceImpl implements ExamAdminService {
     @Override
     public Result getUpLoadType(String key, String token, Long examId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/examOrgProperty/%s/OFFLINE_UPLOAD_FILE_TYPE", propertyService.getExamAdminUrl(), examId);
+        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/examOrgProperty/%s/OFFLINE_UPLOAD_FILE_TYPE", sysProperty.getCoreExamWorkUrl(), examId);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //过滤掉为空的属性

+ 25 - 25
src/main/java/cn/com/qmth/examcloud/app/service/impl/NetExamServiceImpl.java → src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreOeServiceImpl.java

@@ -13,8 +13,8 @@ import cn.com.qmth.examcloud.app.core.utils.HttpUtils;
 import cn.com.qmth.examcloud.app.core.utils.JsonMapper;
 import cn.com.qmth.examcloud.app.model.Constants;
 import cn.com.qmth.examcloud.app.model.Result;
-import cn.com.qmth.examcloud.app.service.NetExamService;
-import cn.com.qmth.examcloud.app.core.PropertyService;
+import cn.com.qmth.examcloud.app.service.CoreOeService;
+import cn.com.qmth.examcloud.app.core.SysProperty;
 import okhttp3.FormBody;
 import okhttp3.MediaType;
 import okhttp3.MultipartBody;
@@ -41,15 +41,15 @@ import static cn.com.qmth.examcloud.app.model.Constants.FILE_TYPE_ZIP;
  * @since: 2018/7/16
  */
 @Service
-public class NetExamServiceImpl implements NetExamService {
-    private static Logger log = LoggerFactory.getLogger(NetExamServiceImpl.class);
+public class CoreOeServiceImpl implements CoreOeService {
+    private static Logger log = LoggerFactory.getLogger(CoreOeServiceImpl.class);
     @Autowired
-    private PropertyService propertyService;
+    private SysProperty sysProperty;
 
     @Override
     public Result getCurrentTime(String key, String token) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/currentTime", propertyService.getNetExamUrl());
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/currentTime", sysProperty.getCoreOeStudentUrl());
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //转换日期格式
@@ -61,14 +61,14 @@ public class NetExamServiceImpl implements NetExamService {
     @Override
     public Result getOfflineExamCourseList(String key, String token) throws Exception {
         //封装请求参数									
-        final String requestUrl = String.format("%s/api/ecs_oe_student/offlineExam/getOfflineCourse", propertyService.getNetExamUrl());
+        final String requestUrl = String.format("%s/api/ecs_oe_student/offlineExam/getOfflineCourse", sysProperty.getCoreOeStudentUrl());
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result startOfflineExamRecord(String key, String token, String examStudentId) throws Exception {
         //封装请求参数									
-        final String requestUrl = String.format("%s/api/ecs_oe_student/offlineExam/startOfflineExam?examStudentId=%s", propertyService.getNetExamUrl(), examStudentId);
+        final String requestUrl = String.format("%s/api/ecs_oe_student/offlineExam/startOfflineExam?examStudentId=%s", sysProperty.getCoreOeStudentUrl(), examStudentId);
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
@@ -84,7 +84,7 @@ public class NetExamServiceImpl implements NetExamService {
             throw new ApiException("File must be not empty.");
         }
         //封装请求参数									
-        final String requestUrl = String.format("%s/api/ecs_oe_student/offlineExam/submitPaper?examRecordDataId=%s", propertyService.getNetExamUrl(), examRecordId);
+        final String requestUrl = String.format("%s/api/ecs_oe_student/offlineExam/submitPaper?examRecordDataId=%s", sysProperty.getCoreOeStudentUrl(), examRecordId);
         MultipartBody.Builder form = new MultipartBody.Builder().setType(MultipartBody.FORM);
         RequestBody body = RequestBody.create(MediaType.parse("application/octet-stream"), fileBytes);
         form.addFormDataPart("file", fileName, body);
@@ -96,49 +96,49 @@ public class NetExamServiceImpl implements NetExamService {
     @Override
     public Result getPracticeExamCourseList(String key, String token, String examId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/practice/queryPracticeCourseList?examId=%s", propertyService.getNetExamUrl(), examId);
+        final String requestUrl = String.format("%s/api/ecs_oe_student/practice/queryPracticeCourseList?examId=%s", sysProperty.getCoreOeStudentUrl(), examId);
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result getExamRecordHeartbeat(String key, String token) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/examHeartbeat", propertyService.getNetExamUrl());
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/examHeartbeat", sysProperty.getCoreOeStudentUrl());
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result startPracticeExamRecord(String key, String token, String examStudentId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/startExam?examStudentId=%s", propertyService.getNetExamUrl(), examStudentId);
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/startExam?examStudentId=%s", sysProperty.getCoreOeStudentUrl(), examStudentId);
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result getExamRecordPaperStructList(String key, String token, String examRecordId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examRecordPaperStruct/getExamRecordPaperStruct?examRecordDataId=%s", propertyService.getNetExamUrl(), examRecordId);
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examRecordPaperStruct/getExamRecordPaperStruct?examRecordDataId=%s", sysProperty.getCoreOeStudentUrl(), examRecordId);
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result getExamRecordPaperQuestionList(String key, String token) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examQuestion/findExamQuestionList", propertyService.getNetExamUrl());
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examQuestion/findExamQuestionList", sysProperty.getCoreOeStudentUrl());
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result getExamRecordPaperQuestionDetail(String key, String token, String questionId, String examRecordId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examQuestion/getQuestionContent?questionId=%s&exam_record_id=%s", propertyService.getNetExamUrl(), questionId, examRecordId);
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examQuestion/getQuestionContent?questionId=%s&exam_record_id=%s", sysProperty.getCoreOeStudentUrl(), questionId, examRecordId);
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result updateExamRecordPaperQuestionAnswer(String key, String token, Integer order, String studentAnswer) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examQuestion/submitQuestionAnswer", propertyService.getNetExamUrl());
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examQuestion/submitQuestionAnswer", sysProperty.getCoreOeStudentUrl());
         List<Map> paramsList = new ArrayList<Map>();
         Map<String, Object> params = new HashMap<>();
         params.put("order", order);
@@ -152,49 +152,49 @@ public class NetExamServiceImpl implements NetExamService {
     @Override
     public Result submitPracticeExamRecord(String key, String token) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/endExam", propertyService.getNetExamUrl());
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/endExam", sysProperty.getCoreOeStudentUrl());
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result checkOnlineExamRecord(String key, String token) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/checkExamInProgress", propertyService.getNetExamUrl());
+        final String requestUrl = String.format("%s/api/ecs_oe_student/examControl/checkExamInProgress", sysProperty.getCoreOeStudentUrl());
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result getExamRecordPracticeHistoryList(String key, String token, String examStudentId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/practice/queryPracticeRecordList?examStudentId=%s", propertyService.getNetExamUrl(), examStudentId);
+        final String requestUrl = String.format("%s/api/ecs_oe_student/practice/queryPracticeRecordList?examStudentId=%s", sysProperty.getCoreOeStudentUrl(), examStudentId);
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result getExamRecordTotalInfo(String key, String token, String examRecordId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe_student/practice/getPracticeDetailInfo?examRecordDataId=%s", propertyService.getNetExamUrl(), examRecordId);
+        final String requestUrl = String.format("%s/api/ecs_oe_student/practice/getPracticeDetailInfo?examRecordDataId=%s", sysProperty.getCoreOeStudentUrl(), examRecordId);
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result getExamRecordQuestionDetailList(String key, String token, String examRecordId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_oe/report/exam_detail_report/paper_question?exam_record_id=%s", propertyService.getNetExamUrl(), examRecordId);
+        final String requestUrl = String.format("%s/api/ecs_oe/report/exam_detail_report/paper_question?exam_record_id=%s", sysProperty.getCoreOeStudentUrl(), examRecordId);
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result getExamRecordQuestionAudioPlayTimes(String key, String token, String questionId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/exam_question_playtimes?questionId=%s", propertyService.getNetExamUrl(), questionId);
+        final String requestUrl = String.format("%s/api/exam_question_playtimes?questionId=%s", sysProperty.getCoreOeStudentUrl(), questionId);
         return HttpUtils.doGet(requestUrl, key, token);
     }
 
     @Override
     public Result updateExamRecordQuestionAudioPlayTimes(String key, String token, String questionId, String mediaName) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/exam_question_playtimes", propertyService.getNetExamUrl());
+        final String requestUrl = String.format("%s/api/exam_question_playtimes", sysProperty.getCoreOeStudentUrl());
         RequestBody formBody = new FormBody.Builder()
                 .add("questionId", questionId)
                 .add("mediaName", mediaName)
@@ -205,7 +205,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.getNetAdminExamUrl(), examRecordDataId);
+        final String requestUrl = String.format("%s/api/ecs_oe_admin/exam/record/data/findExamRecordDataEntity?examRecordDataId=%s", sysProperty.getCoreOeAdminUrl(), examRecordDataId);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //过滤掉为空的属性
@@ -217,7 +217,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.getNetAdminExamUrl(), examRecordDataId);
+        final String requestUrl = String.format("%s/api/ecs_oe_admin/examRecordQuestions/getExamRecordQuestions?examRecordDataId=%s", sysProperty.getCoreOeAdminUrl(), examRecordDataId);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //过滤掉为空的属性

+ 8 - 8
src/main/java/cn/com/qmth/examcloud/app/service/impl/QuestionPoolServiceImpl.java → src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreQuestionServiceImpl.java

@@ -12,8 +12,8 @@ import cn.com.qmth.examcloud.app.core.utils.JsonMapper;
 import cn.com.qmth.examcloud.app.model.Constants;
 import cn.com.qmth.examcloud.app.model.ResBody;
 import cn.com.qmth.examcloud.app.model.Result;
-import cn.com.qmth.examcloud.app.core.PropertyService;
-import cn.com.qmth.examcloud.app.service.QuestionPoolService;
+import cn.com.qmth.examcloud.app.core.SysProperty;
+import cn.com.qmth.examcloud.app.service.CoreQuestionService;
 import okhttp3.FormBody;
 import okhttp3.MediaType;
 import okhttp3.RequestBody;
@@ -34,22 +34,22 @@ import java.util.Map;
  * @since: 2018/7/16
  */
 @Service
-public class QuestionPoolServiceImpl implements QuestionPoolService {
-    private static Logger log = LoggerFactory.getLogger(QuestionPoolServiceImpl.class);
+public class CoreQuestionServiceImpl implements CoreQuestionService {
+    private static Logger log = LoggerFactory.getLogger(CoreQuestionServiceImpl.class);
     @Autowired
-    private PropertyService propertyService;
+    private SysProperty sysProperty;
 
     @Override
     public String downloadPaper(String key, String token, String paperId, String orgName) throws Exception {
         //封装请求参数
         orgName = URLEncoder.encode(orgName, "utf-8");
-        return String.format("%s/api/ecs_ques/paper/export/%s/PAPER/%s/%s/offLine?$key=%s&$token=%s", propertyService.getQuestionPoolUrl(), paperId, orgName, paperId, key, token);
+        return String.format("%s/api/ecs_ques/paper/export/%s/PAPER/%s/%s/offLine?$key=%s&$token=%s", sysProperty.getCoreQuestionUrl(), paperId, orgName, paperId, key, token);
     }
 
     @Override
     public Result getPaperDetail(String key, String token, String paperId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_ques/paper/%s", propertyService.getQuestionPoolUrl(), paperId);
+        final String requestUrl = String.format("%s/api/ecs_ques/paper/%s", sysProperty.getCoreQuestionUrl(), paperId);
         Result<String> result = HttpUtils.doGet(requestUrl, key, token);
         if (result.isSuccess()) {
             //过滤掉为空的属性
@@ -61,7 +61,7 @@ public class QuestionPoolServiceImpl implements QuestionPoolService {
     @Override
     public Result getQuestion(String key, String token, String courseCode, Long examId, String groupCode, String questionId) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/ecs_ques/default_question/question", propertyService.getQuestionPoolUrl());
+        final String requestUrl = String.format("%s/api/ecs_ques/default_question/question", sysProperty.getCoreQuestionUrl());
         Map<String, Object> params = new HashMap<>();
         params.put("courseCode", courseCode);
         params.put("examId", examId);

+ 6 - 6
src/main/java/cn/com/qmth/examcloud/app/service/impl/SmsServiceImpl.java

@@ -13,7 +13,7 @@ import cn.com.qmth.examcloud.app.core.utils.StrUtils;
 import cn.com.qmth.examcloud.app.model.Constants;
 import cn.com.qmth.examcloud.app.model.ResBody;
 import cn.com.qmth.examcloud.app.model.Result;
-import cn.com.qmth.examcloud.app.core.PropertyService;
+import cn.com.qmth.examcloud.app.core.SysProperty;
 import cn.com.qmth.examcloud.app.service.SmsService;
 import okhttp3.FormBody;
 import okhttp3.MediaType;
@@ -37,7 +37,7 @@ import java.util.Map;
 public class SmsServiceImpl implements SmsService {
     private static Logger log = LoggerFactory.getLogger(SmsServiceImpl.class);
     @Autowired
-    private PropertyService propertyService;
+    private SysProperty sysProperty;
 
     @Override
     public Result<String> sendSmsCode(String key, String token, String phone) throws Exception {
@@ -46,12 +46,12 @@ public class SmsServiceImpl implements SmsService {
         //生成code
         String code = StrUtils.randomNumber().toString();
         //封装请求参数
-        final String requestUrl = String.format("%s/api/exchange/inner/sendSms/sendIdentifyingCode", propertyService.getSmsUrl());
+        final String requestUrl = String.format("%s/api/exchange/inner/sendSms/sendIdentifyingCode", sysProperty.getSmsUrl());
         Map<String, String> params = new HashMap<>();
         params.put("phone", phone);//手机号码
         params.put("code", code);//验证码
-        params.put("sign", propertyService.getSmsSign());//签名
-        params.put("templateCode", propertyService.getSmsTemplate());//短信模板
+        params.put("sign", sysProperty.getSmsSign());//签名
+        params.put("templateCode", sysProperty.getSmsTemplate());//短信模板
         String json = new JsonMapper().toJson(params);
         RequestBody formBody = FormBody.create(MediaType.parse(Constants.CHARSET_JSON_UTF8), json);
         //发送短信
@@ -62,7 +62,7 @@ public class SmsServiceImpl implements SmsService {
     @Override
     public Result<String> checkSmsCode(String key, String token, String phone, String code) throws Exception {
         //封装请求参数
-        final String requestUrl = String.format("%s/api/exchange/inner/sendSms/checkIdentifyingCode", propertyService.getSmsUrl());
+        final String requestUrl = String.format("%s/api/exchange/inner/sendSms/checkIdentifyingCode", sysProperty.getSmsUrl());
         Map<String, String> params = new HashMap<>();
         params.put("phone", phone);
         params.put("code", code);

+ 3 - 3
src/main/java/cn/com/qmth/examcloud/app/service/impl/UpYunServiceImpl.java

@@ -7,7 +7,7 @@
 
 package cn.com.qmth.examcloud.app.service.impl;
 
-import cn.com.qmth.examcloud.app.core.PropertyService;
+import cn.com.qmth.examcloud.app.core.SysProperty;
 import cn.com.qmth.examcloud.app.service.UpYunService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -24,12 +24,12 @@ import org.springframework.stereotype.Service;
 public class UpYunServiceImpl implements UpYunService {
     private static Logger log = LoggerFactory.getLogger(UpYunServiceImpl.class);
     @Autowired
-    private PropertyService propertyService;
+    private SysProperty sysProperty;
 
     @Override
     public String downloadPaperAnswer(String filePath) throws Exception {
         //封装请求参数
-        return String.format("%s/%s", propertyService.getUpYunUrl(), filePath);
+        return String.format("%s/%s", sysProperty.getUpYunUrl(), filePath);
     }
 
 }