|
@@ -9,14 +9,10 @@ import cn.reghao.tnb.auth.api.iface.AccountQuery;
|
|
|
import cn.reghao.tnb.common.util.StringUtil;
|
|
import cn.reghao.tnb.common.util.StringUtil;
|
|
|
import cn.reghao.tnb.content.api.constant.VideoStatus;
|
|
import cn.reghao.tnb.content.api.constant.VideoStatus;
|
|
|
import cn.reghao.tnb.content.api.dto.*;
|
|
import cn.reghao.tnb.content.api.dto.*;
|
|
|
-import cn.reghao.tnb.content.app.vod.db.mapper.SiteNoticeMapper;
|
|
|
|
|
import cn.reghao.tnb.content.app.vod.db.mapper.VideoPostMapper;
|
|
import cn.reghao.tnb.content.app.vod.db.mapper.VideoPostMapper;
|
|
|
import cn.reghao.tnb.content.app.vod.db.repository.VideoRepository;
|
|
import cn.reghao.tnb.content.app.vod.db.repository.VideoRepository;
|
|
|
import cn.reghao.tnb.content.app.vod.model.dto.CategoryAdd;
|
|
import cn.reghao.tnb.content.app.vod.model.dto.CategoryAdd;
|
|
|
-import cn.reghao.tnb.content.app.vod.model.dto.NoticeAdd;
|
|
|
|
|
-import cn.reghao.tnb.content.app.vod.model.dto.SearchCriteria;
|
|
|
|
|
import cn.reghao.tnb.content.app.vod.model.po.BannerVideo;
|
|
import cn.reghao.tnb.content.app.vod.model.po.BannerVideo;
|
|
|
-import cn.reghao.tnb.content.app.vod.model.po.SiteNotice;
|
|
|
|
|
import cn.reghao.tnb.content.app.vod.model.po.VideoFile;
|
|
import cn.reghao.tnb.content.app.vod.model.po.VideoFile;
|
|
|
import cn.reghao.tnb.content.app.vod.model.po.VideoPost;
|
|
import cn.reghao.tnb.content.app.vod.model.po.VideoPost;
|
|
|
import cn.reghao.tnb.content.app.vod.model.query.VideoQuery;
|
|
import cn.reghao.tnb.content.app.vod.model.query.VideoQuery;
|
|
@@ -48,31 +44,18 @@ public class AdminVodService {
|
|
|
private MessageService messageService;
|
|
private MessageService messageService;
|
|
|
|
|
|
|
|
private RabbitTemplate rabbitTemplate;
|
|
private RabbitTemplate rabbitTemplate;
|
|
|
- private SiteNoticeMapper siteNoticeMapper;
|
|
|
|
|
private VideoPostMapper videoPostMapper;
|
|
private VideoPostMapper videoPostMapper;
|
|
|
private VideoRepository videoRepository;
|
|
private VideoRepository videoRepository;
|
|
|
private CategoryService categoryService;
|
|
private CategoryService categoryService;
|
|
|
|
|
|
|
|
- public AdminVodService(RabbitTemplate rabbitTemplate, SiteNoticeMapper siteNoticeMapper, VideoPostMapper videoPostMapper,
|
|
|
|
|
|
|
+ public AdminVodService(RabbitTemplate rabbitTemplate, VideoPostMapper videoPostMapper,
|
|
|
VideoRepository videoRepository, CategoryService categoryService) {
|
|
VideoRepository videoRepository, CategoryService categoryService) {
|
|
|
this.rabbitTemplate = rabbitTemplate;
|
|
this.rabbitTemplate = rabbitTemplate;
|
|
|
- this.siteNoticeMapper = siteNoticeMapper;
|
|
|
|
|
this.videoPostMapper = videoPostMapper;
|
|
this.videoPostMapper = videoPostMapper;
|
|
|
this.videoRepository = videoRepository;
|
|
this.videoRepository = videoRepository;
|
|
|
this.categoryService = categoryService;
|
|
this.categoryService = categoryService;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void setSiteNotice(NoticeAdd noticeAdd) {
|
|
|
|
|
- long createBy = 10001;
|
|
|
|
|
- SiteNotice siteNotice = new SiteNotice(noticeAdd.getContent(), createBy);
|
|
|
|
|
- siteNoticeMapper.save(siteNotice);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public String getSiteNotice() {
|
|
|
|
|
- SiteNotice siteNotice = siteNoticeMapper.findLatest();
|
|
|
|
|
- return siteNotice != null ? siteNotice.getContent() : "N/A";
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
public PageList<AdminVideo> getUserVideoPosts(VideoSearch videoSearch) {
|
|
public PageList<AdminVideo> getUserVideoPosts(VideoSearch videoSearch) {
|
|
|
PageList<AdminVideo> pageList = getVideoPosts(videoSearch);
|
|
PageList<AdminVideo> pageList = getVideoPosts(videoSearch);
|
|
|
return pageList;
|
|
return pageList;
|
|
@@ -152,15 +135,11 @@ public class AdminVodService {
|
|
|
return PageList.pageList(pageNumber, pageSize, total, list);
|
|
return PageList.pageList(pageNumber, pageSize, total, list);
|
|
|
}*/
|
|
}*/
|
|
|
VideoQuery videoQuery = new VideoQuery.Builder()
|
|
VideoQuery videoQuery = new VideoQuery.Builder()
|
|
|
- .status(null)
|
|
|
|
|
- .scope(null)
|
|
|
|
|
.orderBy(videoSearch.getOrderBy())
|
|
.orderBy(videoSearch.getOrderBy())
|
|
|
.orderDirection(videoSearch.getOrderDirection())
|
|
.orderDirection(videoSearch.getOrderDirection())
|
|
|
.build();
|
|
.build();
|
|
|
if (title != null && !title.isEmpty()) {
|
|
if (title != null && !title.isEmpty()) {
|
|
|
videoQuery = new VideoQuery.Builder()
|
|
videoQuery = new VideoQuery.Builder()
|
|
|
- .status(null)
|
|
|
|
|
- .scope(null)
|
|
|
|
|
.title(title)
|
|
.title(title)
|
|
|
.orderBy(videoSearch.getOrderBy())
|
|
.orderBy(videoSearch.getOrderBy())
|
|
|
.orderDirection(videoSearch.getOrderDirection())
|
|
.orderDirection(videoSearch.getOrderDirection())
|
|
@@ -170,7 +149,6 @@ public class AdminVodService {
|
|
|
if (videoSearch.getStatus() != null) {
|
|
if (videoSearch.getStatus() != null) {
|
|
|
videoQuery = new VideoQuery.Builder()
|
|
videoQuery = new VideoQuery.Builder()
|
|
|
.status(videoSearch.getStatus())
|
|
.status(videoSearch.getStatus())
|
|
|
- .scope(null)
|
|
|
|
|
.orderBy(videoSearch.getOrderBy())
|
|
.orderBy(videoSearch.getOrderBy())
|
|
|
.orderDirection(videoSearch.getOrderDirection())
|
|
.orderDirection(videoSearch.getOrderDirection())
|
|
|
.build();
|
|
.build();
|