Browse Source

解决没设置活动时间查询后端视频列表报错问题

JiangChongBo 2 năm trước cách đây
mục cha
commit
a613a54e3d

+ 11 - 2
src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

@@ -1372,7 +1372,12 @@ public class AuthServiceImpl implements AuthService {
         if(StringUtils.isNotEmpty(startTIme)&&StringUtils.isNotEmpty(endTime)){
             listChallengeRoundVo=authMapper.getPublishedVideo(mobile,authParty,status,authUserId,startTIme,endTime);
         }else{
-            listChallengeRoundVo=authMapper.getPublishedVideo(mobile,authParty,status,authUserId,activityTime.getStartTime(),activityTime.getEndTime());
+            if(activityTime!=null){
+                listChallengeRoundVo=authMapper.getPublishedVideo(mobile,authParty,status,authUserId,activityTime.getStartTime(),activityTime.getEndTime());
+            }else{
+                listChallengeRoundVo=authMapper.getPublishedVideo(mobile,authParty,status,authUserId,null,null);
+
+            }
         }
         PageInfo<ChallengeRoundVo> pageData = new PageInfo<>(listChallengeRoundVo);
         //调用抖音api获取视频数据
@@ -1439,7 +1444,11 @@ public class AuthServiceImpl implements AuthService {
         if(StringUtils.isNotEmpty(startTIme)&&StringUtils.isNotEmpty(endTime)){
             publishedVideoListNoRanking = authMapper.getPublishedVideoNoRanking(mobile,authParty,status,authUserId,startTIme,endTime);
         }else{
-            publishedVideoListNoRanking = authMapper.getPublishedVideoNoRanking(mobile,authParty,status,authUserId,activityTime.getStartTime(),activityTime.getEndTime());
+            if(activityTime!=null){
+                publishedVideoListNoRanking = authMapper.getPublishedVideoNoRanking(mobile,authParty,status,authUserId,activityTime.getStartTime(),activityTime.getEndTime());
+            }else{
+                publishedVideoListNoRanking = authMapper.getPublishedVideoNoRanking(mobile,authParty,status,authUserId,null,null);
+            }
         }
         //获取不排名的数据
         if(publishedVideoListNoRanking.size()>0&&listChallengeRoundVo.size()>0){