|
@@ -500,8 +500,9 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
|
|
|
DefaultAcsClient client = RAMConnectUtils.initVodClient();
|
|
|
int start = (selectDTO.getPageIndex() - 1) * selectDTO.getPageSize();
|
|
|
int pageSize = selectDTO.getPageSize();
|
|
|
- String filterSql = " and v.doctor_id is not null and v.recommend_status= 0 ";
|
|
|
- List<Video> videoList = videoMapper.getVideoByHome(userId, filterSql, start, pageSize);
|
|
|
+ String filterSql = " and v.doctor_id is not null and v.recommend_status= 0";
|
|
|
+ String filterSortSql = filterSql + " order by si.id desc , v.create_time desc ";
|
|
|
+ List<Video> videoList = videoMapper.getVideoByHome(userId, filterSortSql, start, pageSize);
|
|
|
for (Video video : videoList) {
|
|
|
GetPlayInfoResponse playInfo = PlayUtils.getPlayInfo(client, video.getVideoId());
|
|
|
if(!Objects.isNull(playInfo)){
|
|
@@ -520,8 +521,9 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
|
|
|
DefaultAcsClient client = RAMConnectUtils.initVodClient();
|
|
|
int start = (selectDTO.getPageIndex() - 1) * selectDTO.getPageSize();
|
|
|
int pageSize = selectDTO.getPageSize();
|
|
|
- String filterSql = "and v.recommend_status = 2 and v.doctor_id is not null ";
|
|
|
- List<Video> videoList = videoMapper.getVideoByHome(userId, filterSql, start, pageSize);
|
|
|
+ String filterSql = "and v.recommend_status = 2 and v.doctor_id is not null";
|
|
|
+ String filterSortSql = filterSql + " order by si.id desc , v.create_time desc ";
|
|
|
+ List<Video> videoList = videoMapper.getVideoByHome(userId, filterSortSql, start, pageSize);
|
|
|
for (Video video : videoList) {
|
|
|
GetPlayInfoResponse playInfo = PlayUtils.getPlayInfo(client, video.getVideoId());
|
|
|
if(!Objects.isNull(playInfo)){
|
|
@@ -549,7 +551,8 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
|
|
|
if(!StringUtils.isEmpty(departmentName)){
|
|
|
filterSql += " and (select array_to_string(ARRAY[array_agg(departmentname)], ',') from hospitaldepartments where id in (select department_id from video_department vd where vd.video_id =v.id)) like '%"+departmentName+"%'";
|
|
|
}
|
|
|
- List<Video> videoList = videoMapper.getVideoByHome(userId, filterSql, start, pageSize);
|
|
|
+ String filterSortSql = filterSql + " order by v.cover_photo asc ";
|
|
|
+ List<Video> videoList = videoMapper.getVideoByHome(userId, filterSortSql,start, pageSize);
|
|
|
for (Video video : videoList) {
|
|
|
GetPlayInfoResponse playInfo = PlayUtils.getPlayInfo(client, video.getVideoId());
|
|
|
if(!Objects.isNull(playInfo)){
|
|
@@ -571,7 +574,8 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
|
|
|
int pageSize = selectDTO.getPageSize();
|
|
|
String doctorId = selectDTO.getName();
|
|
|
String filterSql = " and v.doctor_id = '"+doctorId +"' and v.recommend_status != -1 and v.recommend_status!= 1 ";
|
|
|
- List<Video> videoList = videoMapper.getVideoByHome(userId, filterSql, start, pageSize);
|
|
|
+ String filterSortSql = filterSql + " order by v.create_time desc ";
|
|
|
+ List<Video> videoList = videoMapper.getVideoByHome(userId, filterSortSql, start, pageSize);
|
|
|
for (Video video : videoList) {
|
|
|
GetPlayInfoResponse playInfo = PlayUtils.getPlayInfo(client, video.getVideoId());
|
|
|
if(!Objects.isNull(playInfo)){
|
|
@@ -591,7 +595,8 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
|
|
|
int start = (selectDTO.getPageIndex() - 1) * selectDTO.getPageSize();
|
|
|
int pageSize = selectDTO.getPageSize();
|
|
|
String filterSql = " and li.id is not null and v.recommend_status!= 1 and v.recommend_status!= -1";
|
|
|
- List<Video> videoList = videoMapper.getVideoByHome(userId, filterSql, start, pageSize);
|
|
|
+ String filterSortSql = filterSql + " order by v.create_time desc ";
|
|
|
+ List<Video> videoList = videoMapper.getVideoByHome(userId, filterSortSql, start, pageSize);
|
|
|
for (Video video : videoList) {
|
|
|
GetPlayInfoResponse playInfo = PlayUtils.getPlayInfo(client, video.getVideoId());
|
|
|
if(!Objects.isNull(playInfo)){
|
|
@@ -610,7 +615,8 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
|
|
|
int start = (selectDTO.getPageIndex() - 1) * selectDTO.getPageSize();
|
|
|
int pageSize = selectDTO.getPageSize();
|
|
|
String filterSql = " and v.doctor_id::uuid='"+doctorId+"' and v.recommend_status=1 ";
|
|
|
- List<Video> videoList = videoMapper.getVideoByHome(userId, filterSql, start, pageSize);
|
|
|
+ String filterSortSql = filterSql + " order by v.create_time desc ";
|
|
|
+ List<Video> videoList = videoMapper.getVideoByHome(userId, filterSortSql, start, pageSize);
|
|
|
//TODO 遍历获取视频播放地址?
|
|
|
int total = videoMapper.countVideoByHome(userId, filterSql);
|
|
|
return PageResultInfo.createSuccessPage("获取医生的上传且正在转码视频列表成功",videoList,total,selectDTO.getPageIndex(),selectDTO.getPageSize());
|
|
@@ -624,7 +630,8 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
|
|
|
int start = (selectDTO.getPageIndex() - 1) * selectDTO.getPageSize();
|
|
|
int pageSize = selectDTO.getPageSize();
|
|
|
String filterSql = " and v.doctor_id::uuid='"+doctorId+"' and ( v.recommend_status = 0 or v.recommend_status = 2 ) ";
|
|
|
- List<Video> videoList = videoMapper.getVideoByHome(userId, filterSql, start, pageSize);
|
|
|
+ String filterSortSql = filterSql + " order by v.create_time desc ";
|
|
|
+ List<Video> videoList = videoMapper.getVideoByHome(userId, filterSortSql, start, pageSize);
|
|
|
for (Video video : videoList) {
|
|
|
GetPlayInfoResponse playInfo = PlayUtils.getPlayInfo(client, video.getVideoId());
|
|
|
if(!Objects.isNull(playInfo)){
|