|
|
|
@ -49,11 +49,13 @@ import java.util.List;
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class TerminalVideoServiceImpl implements TerminalVideoService {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
TerminalPhotoDao terminalPhotoDao;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<String> updateVideoParam(VideoParamsVo vo) {
|
|
|
|
|
String cmd = Constants.CMD+"videoparams --flag=1 --preset=255 --cmdid="+vo.getCmdId()+ " --channel=" + vo.getChannel()+ " --format=" +
|
|
|
|
|
vo.getFormat()+ " --time=" +vo.getTime();
|
|
|
|
|
String cmd = Constants.CMD + "videoparams --flag=1 --preset=255 --cmdid=" + vo.getCmdId() + " --channel=" + vo.getChannel() + " --format=" +
|
|
|
|
|
vo.getFormat() + " --time=" + vo.getTime();
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
return Asserts.success("修改完成");
|
|
|
|
|
}
|
|
|
|
@ -61,14 +63,21 @@ public class TerminalVideoServiceImpl implements TerminalVideoService {
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<GetModel> videoParamGet(VideoGetVo vo) {
|
|
|
|
|
GetModel model = new GetModel();
|
|
|
|
|
String cmd = Constants.CMD+"videoparams --clientid=10 --flag=0 --cmdid="+vo.getCmdId()+ "\t"+"--reqid="+Constants.REQUEST_ID+"\t"+"--channel="+vo.getChannelId();
|
|
|
|
|
String cmd = Constants.CMD + "videoparams --clientid=10 --flag=0 --cmdid=" + vo.getCmdId() + "\t" + "--reqid=" + Constants.REQUEST_ID + "\t" + "--channel=" + vo.getChannelId();
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
model.setRequestId(Integer.parseInt( Constants.REQUEST_ID.toString()));
|
|
|
|
|
model.setRequestId(Integer.parseInt(Constants.REQUEST_ID.toString()));
|
|
|
|
|
Constants.REQUEST_ID.addAndGet(1);
|
|
|
|
|
return Asserts.success(model);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<TerminalVideoParamsModel> selectVideoParam(Integer requestId) {
|
|
|
|
|
return null;
|
|
|
|
|
String result = terminalPhotoDao.getRequestResult(requestId);//待修改
|
|
|
|
|
TerminalVideoParamsModel model = new TerminalVideoParamsModel();
|
|
|
|
|
if (StringUtils.isNotBlank(result)) {
|
|
|
|
|
model = JSONObject.parseObject(result, TerminalVideoParamsModel.class);
|
|
|
|
|
model.setIsNew(true);
|
|
|
|
|
}
|
|
|
|
|
return Asserts.success(model);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|