Browse Source

小程序:添加日志

dev
wangzijian 1 year ago
parent
commit
81f2b90788

+ 4
- 1
src/main/java/com/cirle/scientific/controller/miniapp/CourseStudyController.java View File

@@ -78,6 +78,7 @@ public class CourseStudyController {
78 78
                                                 @ApiParam(name = "objType", value = "类型1:理论课程 2 :技能课程") @RequestParam(name = "objType") Integer objType,
79 79
                                                 @ApiParam(name = "studyAccomplish", value = "是否看完 0:未看完 1:已看完") @RequestParam(name = "studyAccomplish") Integer studyAccomplish
80 80
     ) {
81
+        log.info("saveRecord memCard:{} objId:{} objType:{} studyAccomplish:{}", memCard, objId, objType, studyAccomplish);
81 82
         if (StringUtils.isBlank(memCard)) {
82 83
             return Result.failed(BizCodeEnum.NO_LOGIN);
83 84
         }
@@ -94,6 +95,7 @@ public class CourseStudyController {
94 95
                                                         @ApiParam(name = "duration", value = "总时长") @RequestParam(name = "duration") Integer duration,
95 96
                                                         @ApiParam(name = "currentTime", value = "当前时长") @RequestParam(name = "currentTime") Integer currentTime
96 97
     ) {
98
+        log.info("saveRecordProgress memCard:{} objId:{} objType:{} duration:{} currentTime:{}", memCard, objId, objType, duration, currentTime);
97 99
         if (StringUtils.isBlank(memCard)) {
98 100
             return Result.failed(BizCodeEnum.NO_LOGIN);
99 101
         }
@@ -109,6 +111,7 @@ public class CourseStudyController {
109 111
                                                 @ApiParam(name = "objId", value = "课程ID") @RequestParam(name = "objId") Long objId,
110 112
                                                 @ApiParam(name = "objType", value = "类型1:理论课程 2 :技能课程") @RequestParam(name = "objType") Integer objType
111 113
     ) {
114
+        log.info("saveRecordProgress memCard:{} objId:{} objType:{}", memCard, objId, objType);
112 115
         if (StringUtils.isBlank(memCard)) {
113 116
             return Result.failed(BizCodeEnum.NO_LOGIN);
114 117
         }
@@ -222,7 +225,7 @@ public class CourseStudyController {
222 225
             for (QkjQuestionAnswerApp answerApp : questionAnswerApp) {
223 226
                 Integer quId = answerApp.getQuId();
224 227
                 RightDTO rightDTO = rightDTOMap.get(quId);
225
-                if (Objects.equals(answerApp.getOptionId(), rightDTO.getOptionId())) {
228
+                if (Objects.equals(rightDTO.getOptionId() ,answerApp.getOptionId())) {
226 229
                     score = score + rightDTO.getScore();
227 230
                 } else {
228 231
                     WrongQuestionAnalysisDTO build = WrongQuestionAnalysisDTO.builder()

+ 1
- 0
src/main/java/com/cirle/scientific/service/impl/CourseAppServiceImpl.java View File

@@ -112,6 +112,7 @@ public class CourseAppServiceImpl implements CourseAppService {
112 112
             qkjStudyRecordApp.setObjId(objId);
113 113
             qkjStudyRecordApp.setDuration(duration);
114 114
             qkjStudyRecordApp.setPresentTime(currentTime);
115
+            qkjStudyRecordApp.setStudyAccomplish(0);
115 116
             studyRecordApp = qkjStudyRecordAppDao.save(qkjStudyRecordApp);
116 117
         }else {
117 118
             studyRecordApp.setDuration(duration);

Loading…
Cancel
Save