1078-存储多媒体数据检索接口
This commit is contained in:
@@ -41,6 +41,7 @@ public class JT1078Template {
|
||||
private static final String H8608 = "8608";
|
||||
private static final String H8702 = "8702";
|
||||
private static final String H8801 = "8801";
|
||||
private static final String H8802 = "8802";
|
||||
private static final String H9101 = "9101";
|
||||
private static final String H9102 = "9102";
|
||||
private static final String H9201 = "9201";
|
||||
@@ -62,6 +63,7 @@ public class JT1078Template {
|
||||
private static final String H0500 = "0500";
|
||||
private static final String H0608 = "0608";
|
||||
private static final String H0702 = "0702";
|
||||
private static final String H0802 = "0802";
|
||||
private static final String H0805 = "0805";
|
||||
private static final String H1205 = "1205";
|
||||
|
||||
@@ -580,4 +582,15 @@ public class JT1078Template {
|
||||
.build();
|
||||
return SessionManager.INSTANCE.request(cmd, timeOut);
|
||||
}
|
||||
|
||||
public Object queryMediaData(String devId, J8802 j8802, int timeOut) {
|
||||
Cmd cmd = new Cmd.Builder()
|
||||
.setDevId(devId)
|
||||
.setPackageNo(randomInt())
|
||||
.setMsgId(H8802)
|
||||
.setRespId(H0802)
|
||||
.setRs(j8802)
|
||||
.build();
|
||||
return SessionManager.INSTANCE.request(cmd, timeOut);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -763,5 +763,19 @@ public class JT1078Controller {
|
||||
return WVPResult.fail(ErrorCode.ERROR100);
|
||||
}
|
||||
}
|
||||
|
||||
@Operation(summary = "1078-存储多媒体数据检索", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@Parameter(name = "param", description = "存储多媒体数据参数", required = true)
|
||||
@PostMapping("/shooting")
|
||||
public WVPResult<List<JTMediaDataInfo>> queryMediaData(@RequestBody QueryMediaDataParam param){
|
||||
|
||||
logger.info("[1078-存储多媒体数据检索] param: {}", param );
|
||||
List<JTMediaDataInfo> ids = service.queryMediaData(param.getDeviceId(), param.getQueryMediaDataCommand());
|
||||
if (ids != null) {
|
||||
return WVPResult.success(ids);
|
||||
}else {
|
||||
return WVPResult.fail(ErrorCode.ERROR100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.genersoft.iot.vmp.jt1078.controller.bean;
|
||||
|
||||
import com.genersoft.iot.vmp.jt1078.bean.JTQueryMediaDataCommand;
|
||||
import com.genersoft.iot.vmp.jt1078.bean.JTShootingCommand;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "存储多媒体数据参数")
|
||||
public class QueryMediaDataParam {
|
||||
|
||||
@Schema(description = "设备")
|
||||
private String deviceId;
|
||||
|
||||
@Schema(description = "存储多媒体数据参数")
|
||||
private JTQueryMediaDataCommand queryMediaDataCommand;
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public JTQueryMediaDataCommand getQueryMediaDataCommand() {
|
||||
return queryMediaDataCommand;
|
||||
}
|
||||
|
||||
public void setQueryMediaDataCommand(JTQueryMediaDataCommand queryMediaDataCommand) {
|
||||
this.queryMediaDataCommand = queryMediaDataCommand;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "QueryMediaDataParam{" +
|
||||
"deviceId='" + deviceId + '\'' +
|
||||
", queryMediaDataCommand=" + queryMediaDataCommand +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "设置区域")
|
||||
@Schema(description = "设置区域参数")
|
||||
public class SetAreaParam {
|
||||
|
||||
@Schema(description = "设备")
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.genersoft.iot.vmp.jt1078.controller.bean;
|
||||
|
||||
import com.genersoft.iot.vmp.jt1078.bean.JTShootingCommand;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@Schema(description = "设备")
|
||||
@Schema(description = "摄像头立即拍摄命令参数")
|
||||
public class ShootingParam {
|
||||
|
||||
@Schema(description = "设备")
|
||||
|
||||
@@ -98,4 +98,5 @@ public interface Ijt1078Service {
|
||||
|
||||
List<Long> shooting(String deviceId, JTShootingCommand shootingCommand);
|
||||
|
||||
List<JTMediaDataInfo> queryMediaData(String deviceId, JTQueryMediaDataCommand queryMediaDataCommand);
|
||||
}
|
||||
|
||||
@@ -713,4 +713,11 @@ public class jt1078ServiceImpl implements Ijt1078Service {
|
||||
j8801.setCommand(shootingCommand);
|
||||
return (List<Long>)jt1078Template.shooting(deviceId, j8801, 300);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JTMediaDataInfo> queryMediaData(String deviceId, JTQueryMediaDataCommand queryMediaDataCommand) {
|
||||
J8802 j8802 = new J8802();
|
||||
j8802.setCommand(queryMediaDataCommand);
|
||||
return (List<JTMediaDataInfo>)jt1078Template.queryMediaData(deviceId, j8802, 300);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user