Commit 2a7a1825641078a1fca34c7512a35b4925cb5d00

Authored by 王明元
1 parent e2be3e7b

2022年5月26日17:21:35

src/main/java/cn/fw/freya/dao/LivePoolDao.java
... ... @@ -34,4 +34,13 @@ public interface LivePoolDao extends JpaRepository<LivePool, Long> {
34 34 */
35 35 @Query("select live from LivePool live where live.playbackUrl is null and live.roomId is not null and live.type = ?1 and live.duration >= ?2")
36 36 List<LivePool> getWithoutPlaybackLive(Integer type, Double durationThreshold);
  37 +
  38 + /**
  39 + * 获取没有拿到回播的直播
  40 + *
  41 + * @param accountNo 账户号
  42 + * @return
  43 + */
  44 + @Query("select live from LivePool live where live.phoneNo = ?1")
  45 + List<LivePool> getLiveByAccountNo(String accountNo);
37 46 }
... ...
src/main/java/cn/fw/freya/task/DataCaptureTask.java
... ... @@ -133,7 +133,7 @@ public class DataCaptureTask {
133 133 }
134 134 if (flag) {
135 135 final ArrayList<LivePool> livePools = new ArrayList<>();
136   - for (LivePool item : list) {// 该人有一次成功就证明已经处理过该人的所有直播了, 将他所有直播进行标记
  136 + for (LivePool item : livePoolDao.getLiveByAccountNo(accountNo)) {// 该人有一次成功就证明已经处理过该人的所有直播了, 将他所有直播进行标记
137 137 final LivePool livePool = PublicUtil.copy(item, LivePool.class);// 对象拷贝
138 138 livePool.setGetPlaybackFailTimes(-1);
139 139 livePools.add(livePool);
... ...