视频缩略图修改

jni
liuguijing 2 years ago
parent b4db61f241
commit 161f5b4cc8

@ -113,9 +113,12 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
if (item.getMediaType() == 0) { if (item.getMediaType() == 0) {
photoBean.setPath(photoaddress + item.getPath()); photoBean.setPath(photoaddress + item.getPath());
} else { } else {
photoBean.setPath(videoaddress + item.getPath()); photoBean.setPath(videoaddress + item.getPath());
if (item.getThumb() != null) {
photoBean.setThumb(videoaddress + item.getThumb()); photoBean.setThumb(videoaddress + item.getThumb());
} }
}
photoBean.setId(item.getId()); photoBean.setId(item.getId());
photoBean.setTermId(item.getTermId()); photoBean.setTermId(item.getTermId());
photoBean.setWidth(item.getWidth()); photoBean.setWidth(item.getWidth());
@ -328,38 +331,39 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
List<TermAndChannelLatestPhotoMapperDto> list2 = terminalPhotoDao.selectTermAndChannelLatestPhotoList(termidlist); List<TermAndChannelLatestPhotoMapperDto> list2 = terminalPhotoDao.selectTermAndChannelLatestPhotoList(termidlist);
List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>(); List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>();
for (ChannelAndTermDto item : list) { for (ChannelAndTermDto item : list) {
for (int y = 0; y < list2.size(); y++) {
TermAndChannelLatestPhotoMapperDto item2 = list2.get(y);
if (item.getTermid().intValue() == item2.getTermid().intValue() && item.getChannelid().intValue() == item2.getChannelid().intValue()) {
TerminalPhotosModel.PhotosBean photosBean = new TerminalPhotosModel.PhotosBean(); TerminalPhotosModel.PhotosBean photosBean = new TerminalPhotosModel.PhotosBean();
photosBean.setTermid(item.getTermid()); photosBean.setTermid(item.getTermid());
photosBean.setLineid(item.getLineid()); photosBean.setLineid(item.getLineid());
photosBean.setChannnelname(item.getChannelname()); photosBean.setChannnelname(item.getChannelname());
photosBean.setChannelid(item.getChannelid()); photosBean.setChannelid(item.getChannelid());
photosBean.setDisplayname(item.getDisplayname()); photosBean.setDisplayname(item.getDisplayname());
for (int z = 0; z < lines.size(); z++) {
Lines lines1 = lines.get(z);
if (item.getLineid() == lines1.getId()) {
photosBean.setLinename(lines1.getName());
break;
}
}
for (int y = 0; y < list2.size(); y++) {
TermAndChannelLatestPhotoMapperDto item2 = list2.get(y);
if (item.getTermid().intValue() == item2.getTermid().intValue() && item.getChannelid().intValue() == item2.getChannelid().intValue()) {
photosBean.setPath(item2.getPath()); photosBean.setPath(item2.getPath());
BigInteger recvtime = MyDateUtils.TimeSecond2MillSecond(item2.getRecvTime().longValue()); BigInteger recvtime = MyDateUtils.TimeSecond2MillSecond(item2.getRecvTime().longValue());
photosBean.setRecvTime(MyDateUtils.date(recvtime.longValue())); photosBean.setRecvTime(MyDateUtils.date(recvtime.longValue()));
BigInteger phototime = MyDateUtils.TimeSecond2MillSecond(item2.getPhotoTime().longValue()); BigInteger phototime = MyDateUtils.TimeSecond2MillSecond(item2.getPhotoTime().longValue());
photosBean.setPhotoTime(MyDateUtils.date(phototime.longValue())); photosBean.setPhotoTime(MyDateUtils.date(phototime.longValue()));
photosBean.setMediatype(item2.getMediatype()); photosBean.setMediatype(item2.getMediatype());
if (item2.getMediatype().intValue() == 0) {
photosBean.setPath(photoaddress + item2.getPath());
} else {
photosBean.setPath(videoaddress + item2.getPath());
}
photosBean.setOrginalid(item2.getOrginalid()); photosBean.setOrginalid(item2.getOrginalid());
photosBean.setPresetId(item2.getPresetId()); photosBean.setPresetId(item2.getPresetId());
for (int z = 0; z < lines.size(); z++) {
Lines lines1 = lines.get(z);
if (item.getLineid() == lines1.getId()) {
photosBean.setLinename(lines1.getName());
break; break;
} }
} }
beans.add(photosBean); beans.add(photosBean);
break;
}
}
} }
model.setList(beans); model.setList(beans);
PageInfo pageData = PageUtils.getPageData(list); PageInfo pageData = PageUtils.getPageData(list);
@ -372,11 +376,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
model.setPagesize(pageSize); model.setPagesize(pageSize);
int pages = pageData.getPages(); int pages = pageData.getPages();
model.setTotalpage(pages); model.setTotalpage(pages);
return Asserts.success(model); return Asserts.success(model);
} }
@Override @Override

Loading…
Cancel
Save