Explorar el Código

调整中康问题

yfh hace 1 semana
padre
commit
b7e8cc4616

+ 4 - 1
fs-service/src/main/java/com/fs/course/mapper/FsCourseAnswerLogsMapper.java

@@ -117,8 +117,11 @@ public interface FsCourseAnswerLogsMapper
             "<if test = 'qwUserId !=null '> " +
             "and qw_user_id = #{qwUserId} " +
             "</if>" +
+            "<if test = 'project !=null '> " +
+            "and project = #{project} " +
+            "</if>" +
             "</script>"})
-    int selectErrorCountByCourseVideo(@Param("videoId") Long videoId,@Param("userId") Long userId,@Param("qwUserId") String qwUserId);
+    int selectErrorCountByCourseVideo(@Param("videoId") Long videoId, @Param("userId") Long userId, @Param("qwUserId") String qwUserId,@Param("project") Long project);
 
     Long selectRedStatus(@Param("userId") Long userId, @Param("videoId") Long videoId, @Param("periodId") Long periodId);
 

+ 5 - 6
fs-service/src/main/java/com/fs/course/service/impl/FsCourseQuestionBankServiceImpl.java

@@ -23,7 +23,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import javax.validation.constraints.Size;
 import java.util.*;
 import java.util.function.BiConsumer;
 import java.util.function.Function;
@@ -177,7 +176,7 @@ public class FsCourseQuestionBankServiceImpl implements IFsCourseQuestionBankSer
                 return R.ok("答题成功");
             }
         }
-        errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),param.getQwUserId());
+        errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),param.getQwUserId(),log.getProject());
 
 
 
@@ -263,7 +262,7 @@ public class FsCourseQuestionBankServiceImpl implements IFsCourseQuestionBankSer
             if (rightLog!=null){
                 return R.error("该课程已答题完成,不可重复答题");
             }
-            errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),null);
+            errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),null, null);
 
         }else {
             FsCourseWatchLog log;
@@ -284,7 +283,7 @@ public class FsCourseQuestionBankServiceImpl implements IFsCourseQuestionBankSer
             if (rightLog != null) {
                 return R.ok("答题成功");
             }
-            errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),param.getQwUserId());
+            errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),param.getQwUserId(), log.getProject());
         }
 
 
@@ -368,7 +367,7 @@ public class FsCourseQuestionBankServiceImpl implements IFsCourseQuestionBankSer
             if (rightLog!=null){
                 return R.error("该课程已答题完成,不可重复答题");
             }
-            errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),null);
+            errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),null, null);
 
         }else {
             FsCourseWatchLog log;
@@ -399,7 +398,7 @@ public class FsCourseQuestionBankServiceImpl implements IFsCourseQuestionBankSer
                     return R.ok("答题成功");
                 }
             }
-            errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),param.getQwUserId());
+            errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),param.getQwUserId(), log.getProject());
         }
 
 

+ 4 - 4
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -553,10 +553,10 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
         try{
             boolean locked = lock.tryLock(3, 10, TimeUnit.SECONDS);
 
-            if (!locked) {
-                logger.error("获取锁失败");
-                return R.error("[红包领取] 系统繁忙,请重试!");
-            }
+//            if (!locked) {
+//                logger.error("获取锁失败");
+//                return R.error("[红包领取] 系统繁忙,请重试!");
+//            }
 
 
             // 判断当前用户是否限流