소스 검색

fix downloadStatus

guozhaoshun 6 년 전
부모
커밋
85235ad9dc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      rankin-user-service/src/main/java/cn/rankin/userservice/repository/DownloadInfoRepository.java

+ 1 - 1
rankin-user-service/src/main/java/cn/rankin/userservice/repository/DownloadInfoRepository.java

@@ -29,7 +29,7 @@ public interface DownloadInfoRepository extends BasicJpaRepository<DownloadInfo,
     int setUpdateByLessonId(String lessonId, BaseStatusEnum status);
 
     @Modifying
-    @Query(value = "update DownloadInfo info set info.downloadStatus = ?3 where info.userId = ?1 AND info.mac = ?2")
+    @Query(value = "update DownloadInfo info set info.downloadStatus = ?3 where info.userId = ?1 AND info.mac = ?2 AND info.downloadStatus = 2")
     int updateDownloadFail(String uid, String mac, int failDownload);
 
     @Query(value = "select info from DownloadInfo info where info.userId = ?1 AND info.lessonId = ?2  AND info.mac = ?3 AND info.downloadStatus = 2 ORDER BY info.gmtCreated DESC ")