视频缩略图修改

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
@ -416,7 +416,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
@Override @Override
public ServiceBody<TerminalStatusGetModel> getPhotoQueryParam(ReturnedPhotoParamsGetVo vo) { public ServiceBody<TerminalStatusGetModel> getPhotoQueryParam(ReturnedPhotoParamsGetVo vo) {
TerminalStatusGetModel model = new TerminalStatusGetModel(); TerminalStatusGetModel model = new TerminalStatusGetModel();
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=imgparams --cmdid="+vo.getCmdId() +"\t" +"--clientid=10 --reqid="+Constants.REQUEST_ID+"\t" +"--flag=0 --rf=7 --channel=" + vo.getChannelId(); String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=imgparams --cmdid=" + vo.getCmdId() + "\t" + "--clientid=10 --reqid=" + Constants.REQUEST_ID + "\t" + "--flag=0 --rf=7 --channel=" + vo.getChannelId();
ProcessExecUtils.exec(cmd); ProcessExecUtils.exec(cmd);
model.setRequestId(Integer.parseInt(Constants.REQUEST_ID.toString())); model.setRequestId(Integer.parseInt(Constants.REQUEST_ID.toString()));
Constants.REQUEST_ID.addAndGet(1); Constants.REQUEST_ID.addAndGet(1);
@ -484,7 +484,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
@Override @Override
public ServiceBody<CmaBackModel> selectPhotoTimeGet(TerminalPhotoTimeGetVo vo) { public ServiceBody<CmaBackModel> selectPhotoTimeGet(TerminalPhotoTimeGetVo vo) {
CmaBackModel model = new CmaBackModel(); CmaBackModel model = new CmaBackModel();
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=schedule --cmdid=" +vo.getCmdId() + "\t" + "--reqid=" + Constants.REQUEST_ID + "\t" + "--clientid=10 --flag=0 --rf=7 --channel="+vo.getChannel(); String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=schedule --cmdid=" + vo.getCmdId() + "\t" + "--reqid=" + Constants.REQUEST_ID + "\t" + "--clientid=10 --flag=0 --rf=7 --channel=" + vo.getChannel();
ProcessExecUtils.exec(cmd); ProcessExecUtils.exec(cmd);
Integer requestId = Integer.parseInt(Constants.REQUEST_ID.toString()); Integer requestId = Integer.parseInt(Constants.REQUEST_ID.toString());
model.setRequestId(requestId); model.setRequestId(requestId);

Loading…
Cancel
Save