diff --git a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java index 4c51743..9bc9f14 100644 --- a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java @@ -76,14 +76,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl classDictDO.getLimitHour() * 3600) { - int playLength = classDictDO.getLimitHour() * 3600 - total; + if (total + vodPlayHistoryDO.getPlayLength() > 6 * 3600) { + int playLength = 6 * 3600 - total; vodPlayHistoryDO.setPlayLength(playLength); vodPlayHistoryDO.setPlayCount(1); if (playLength > 5) { this.baseMapper.insert(vodPlayHistoryDO); } - throw new HttpException(13001); +// throw new HttpException(13001); }else { vodPlayHistoryDO.setPlayCount(1); this.baseMapper.insert(vodPlayHistoryDO); @@ -114,14 +114,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl classDictDO.getLimitHour() * 3600) { - int playLength = classDictDO.getLimitHour() * 3600 - total; + if (total + vodPlayHistoryDO.getPlayLength() > 6 * 3600) { + int playLength = 6 * 3600 - total; vodPlayHistoryDO.setPlayLength(playLength); vodPlayHistoryDO.setPlayCount(1); if (playLength > 5) { this.baseMapper.insert(vodPlayHistoryDO); } - throw new HttpException(13001); +// throw new HttpException(13001); } }else { vodPlayHistoryDO.setPlayCount(1); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 559f4ed..50ca700 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ # 环境配置 -spring.profiles.active=dev +spring.profiles.active=prod #和CPU数 spring.server.acceptorThreadCount=600 spring.server.minSpareThreads=100