Commit 28fc8087 by 涂亚平

插入视频逻辑修改

1 parent 716cd459
...@@ -76,14 +76,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -76,14 +76,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
} }
//是否超过时长 没超过 false 超过 true //是否超过时长 没超过 false 超过 true
if (total + vodPlayHistoryDO.getPlayLength() > classDictDO.getLimitHour() * 3600) { if (total + vodPlayHistoryDO.getPlayLength() > 6 * 3600) {
int playLength = classDictDO.getLimitHour() * 3600 - total; int playLength = 6 * 3600 - total;
vodPlayHistoryDO.setPlayLength(playLength); vodPlayHistoryDO.setPlayLength(playLength);
vodPlayHistoryDO.setPlayCount(1); vodPlayHistoryDO.setPlayCount(1);
if (playLength > 5) { if (playLength > 5) {
this.baseMapper.insert(vodPlayHistoryDO); this.baseMapper.insert(vodPlayHistoryDO);
} }
throw new HttpException(13001); // throw new HttpException(13001);
}else { }else {
vodPlayHistoryDO.setPlayCount(1); vodPlayHistoryDO.setPlayCount(1);
this.baseMapper.insert(vodPlayHistoryDO); this.baseMapper.insert(vodPlayHistoryDO);
...@@ -114,14 +114,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -114,14 +114,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
} }
//是否超过时长 没超过 false 超过 true //是否超过时长 没超过 false 超过 true
if (total + vodPlayHistoryDO.getPlayLength() > classDictDO.getLimitHour() * 3600) { if (total + vodPlayHistoryDO.getPlayLength() > 6 * 3600) {
int playLength = classDictDO.getLimitHour() * 3600 - total; int playLength = 6 * 3600 - total;
vodPlayHistoryDO.setPlayLength(playLength); vodPlayHistoryDO.setPlayLength(playLength);
vodPlayHistoryDO.setPlayCount(1); vodPlayHistoryDO.setPlayCount(1);
if (playLength > 5) { if (playLength > 5) {
this.baseMapper.insert(vodPlayHistoryDO); this.baseMapper.insert(vodPlayHistoryDO);
} }
throw new HttpException(13001); // throw new HttpException(13001);
} }
}else { }else {
vodPlayHistoryDO.setPlayCount(1); vodPlayHistoryDO.setPlayCount(1);
......
# 环境配置 # 环境配置
spring.profiles.active=dev spring.profiles.active=prod
#和CPU数 #和CPU数
spring.server.acceptorThreadCount=600 spring.server.acceptorThreadCount=600
spring.server.minSpareThreads=100 spring.server.minSpareThreads=100
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!