diff --git a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java index 470fa3c..98abba5 100644 --- a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java @@ -631,7 +631,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl testPlays(VodPlayHistoryDO vodPlayHistoryDO) { - String classIds = "286,292,350,355,302,366,379,367,368,371,374,373"; + String classIds = "374,375,376,377,378,379,382,383,384,385,386,387,388,389,390,391,392,393,394,395"; String[] classIdArr = classIds.split(","); @@ -647,20 +647,20 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl vodPlayStateVO.getStartDate().getTime() && vodPlayStateVO.getPlayLength() >= 3) { //这一条数据有问题 - System.out.println("111111111111111111111" + vodPlayStateVO); -// //查看这个人 这个课程 当天的全部数据 按照createDate升序排序 -// List vodPlayHistoryDOS = this.baseMapper.getVodPlayDay(Long.valueOf(classId), classMemberMappingDO.getMemberId(), vodPlayStateVO.getStartDate()); -// //从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推 -// for (int l = 0; l < vodPlayHistoryDOS.size() - 1; l++) { -// VodPlayHistoryDO vph1 = vodPlayHistoryDOS.get(l); //第一条 -// if (l==0){ -// vph1.setPlayDate(vph1.getCreateDate()); -// } -// VodPlayHistoryDO vph2 = vodPlayHistoryDOS.get(l + 1); //第二条 -// LocalDateTime dateTmp = vph1.getPlayDate().plusSeconds(vph2.getPlayLength()+getRandom1_2()); -// vph2.setPlayDate(dateTmp); -// this.baseMapper.updateById(vph2); -// } +// System.out.println("111111111111111111111" + vodPlayStateVO); + //查看这个人 这个课程 当天的全部数据 按照createDate升序排序 + List vodPlayHistoryDOS = this.baseMapper.getVodPlayDay(Long.valueOf(classId), classMemberMappingDO.getMemberId(), vodPlayStateVO.getStartDate()); + //从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推 + for (int l = 0; l < vodPlayHistoryDOS.size() - 1; l++) { + VodPlayHistoryDO vph1 = vodPlayHistoryDOS.get(l); //第一条 + if (l==0){ + vph1.setPlayDate(vph1.getCreateDate()); + } + VodPlayHistoryDO vph2 = vodPlayHistoryDOS.get(l + 1); //第二条 + LocalDateTime dateTmp = vph1.getPlayDate().plusSeconds(vph2.getPlayLength()+getRandom1_2()); + vph2.setPlayDate(dateTmp); + this.baseMapper.updateById(vph2); + } result.add(vodPlayStateVO.getId()); // break; } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7174a8a..50ca700 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ # 环境配置 -spring.profiles.active=online +spring.profiles.active=prod #和CPU数 spring.server.acceptorThreadCount=600 spring.server.minSpareThreads=100