|
|
|
@ -113,9 +113,12 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
if (item.getMediaType() == 0) {
|
|
|
|
|
photoBean.setPath(photoaddress + item.getPath());
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
photoBean.setPath(videoaddress + item.getPath());
|
|
|
|
|
if (item.getThumb() != null) {
|
|
|
|
|
photoBean.setThumb(videoaddress + item.getThumb());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
photoBean.setId(item.getId());
|
|
|
|
|
photoBean.setTermId(item.getTermId());
|
|
|
|
|
photoBean.setWidth(item.getWidth());
|
|
|
|
@ -328,38 +331,39 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
List<TermAndChannelLatestPhotoMapperDto> list2 = terminalPhotoDao.selectTermAndChannelLatestPhotoList(termidlist);
|
|
|
|
|
List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>();
|
|
|
|
|
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();
|
|
|
|
|
photosBean.setTermid(item.getTermid());
|
|
|
|
|
photosBean.setLineid(item.getLineid());
|
|
|
|
|
photosBean.setChannnelname(item.getChannelname());
|
|
|
|
|
photosBean.setChannelid(item.getChannelid());
|
|
|
|
|
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());
|
|
|
|
|
|
|
|
|
|
BigInteger recvtime = MyDateUtils.TimeSecond2MillSecond(item2.getRecvTime().longValue());
|
|
|
|
|
photosBean.setRecvTime(MyDateUtils.date(recvtime.longValue()));
|
|
|
|
|
|
|
|
|
|
BigInteger phototime = MyDateUtils.TimeSecond2MillSecond(item2.getPhotoTime().longValue());
|
|
|
|
|
photosBean.setPhotoTime(MyDateUtils.date(phototime.longValue()));
|
|
|
|
|
|
|
|
|
|
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.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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
beans.add(photosBean);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
model.setList(beans);
|
|
|
|
|
PageInfo pageData = PageUtils.getPageData(list);
|
|
|
|
@ -372,11 +376,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
model.setPagesize(pageSize);
|
|
|
|
|
int pages = pageData.getPages();
|
|
|
|
|
model.setTotalpage(pages);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Asserts.success(model);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|