Browse Source

新增视频流配置表单

zhongwei
ty 12 months ago
parent
commit
1b0c0ebcc2
  1. 41
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/VideoConfigEntity.java
  2. 41
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java
  3. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/VideoConfigMapper.java
  4. 20
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/VideoConfigMapper.xml
  5. 13
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/VideoConfigService.java
  6. 17
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/VideoConfigServiceImpl.java

41
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/VideoConfigEntity.java

@ -0,0 +1,41 @@
package com.hnac.hzims.operational.station.entity;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.support.QueryField;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("hzims_flv_video_config")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "视频配置对象", description = "视频配置表")
public class VideoConfigEntity extends TenantEntity {
private static final long serialVersionUID = 8694213320261034807L;
@QueryField(condition = SqlCondition.LIKE)
@ApiModelProperty("视频源配置名称")
private String name;
@QueryField(condition = SqlCondition.EQUAL)
@ApiModelProperty("时间间隔")
private String time;
@QueryField(condition = SqlCondition.LIKE)
@ApiModelProperty("配置json")
private String configEntity;
@QueryField(condition = SqlCondition.EQUAL)
@ApiModelProperty("视频类型")
private String type;
@QueryField(condition = SqlCondition.EQUAL)
@ApiModelProperty("保存人姓名")
private String savePeople;
}

41
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java

@ -3,6 +3,7 @@ package com.hnac.hzims.operational.station.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
@ -11,10 +12,12 @@ import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.station.dto.StationVideoTypeDTO; import com.hnac.hzims.operational.station.dto.StationVideoTypeDTO;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity; import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity;
import com.hnac.hzims.operational.station.entity.VideoConfigEntity;
import com.hnac.hzims.operational.station.response.HikDeviceResp; import com.hnac.hzims.operational.station.response.HikDeviceResp;
import com.hnac.hzims.operational.station.response.HikMonitorResp; import com.hnac.hzims.operational.station.response.HikMonitorResp;
import com.hnac.hzims.operational.station.service.IStationService; import com.hnac.hzims.operational.station.service.IStationService;
import com.hnac.hzims.operational.station.service.IStationVideoTypeService; import com.hnac.hzims.operational.station.service.IStationVideoTypeService;
import com.hnac.hzims.operational.station.service.VideoConfigService;
import com.hnac.hzims.operational.station.utils.ArtemisPostUtils; import com.hnac.hzims.operational.station.utils.ArtemisPostUtils;
import com.hnac.hzims.operational.station.vo.StationVO; import com.hnac.hzims.operational.station.vo.StationVO;
import com.hnac.hzims.operational.station.vo.StationVideoTypeVO; import com.hnac.hzims.operational.station.vo.StationVideoTypeVO;
@ -56,6 +59,7 @@ public class StationVideoTypeController extends BladeController {
private final ISysClient sysClient; private final ISysClient sysClient;
private final IStationService stationService; private final IStationService stationService;
private final VideoConfigService videoConfigService;
/** 秘钥appKey **/ /** 秘钥appKey **/
@Value("${hzims.videoProperties.appKey}") @Value("${hzims.videoProperties.appKey}")
@ -233,6 +237,43 @@ public class StationVideoTypeController extends BladeController {
page.getRecords().forEach(getFlvVideo); page.getRecords().forEach(getFlvVideo);
return R.data(page); return R.data(page);
} }
@ApiLog
@GetMapping("/getFlvVideoConfig")
@ApiOperationSupport(order = 120)
@ApiOperation(value = "获取Flv配置列表", notes = "获取Flv配置列表")
public R getFlvVideoConfig(VideoConfigEntity req,Query query) {
LambdaQueryWrapper<VideoConfigEntity> queryWrapper = com.hnac.hzims.common.utils.Condition.getQueryWrapper(VideoConfigEntity.class, req);
IPage<VideoConfigEntity> page = videoConfigService.page(com.hnac.hzims.common.utils.Condition.getPage(query), queryWrapper);
return R.data(page);
}
@ApiLog
@PostMapping ("/updateFlvVideoConfig")
@ApiOperationSupport(order = 120)
@ApiOperation(value = "更新Flv配置列表", notes = "更新Flv配置列表")
public R updateFlvVideoConfig(@RequestBody VideoConfigEntity req) {
if (ObjectUtil.isNotEmpty(req)) {
boolean b = videoConfigService.saveOrUpdate(req);
if (b) {
return R.success("更新视频配置成功");
}
}
return R.fail("更新视频配置失败");
}
@ApiLog
@PostMapping("/deleteFlvVideoConfig")
@ApiOperationSupport(order = 120)
@ApiOperation(value = "删除Flv配置列表", notes = "删除Flv配置列表")
public R deleteFlvVideoConfig(@RequestBody List<String> ids) {
if (CollectionUtils.isNotEmpty(ids)) {
boolean flag = videoConfigService.removeByIds(ids);
if (flag) {
return R.success("删除成功");
}
}
return R.fail("删除失败");
}
@ApiLog @ApiLog
@GetMapping("/getMonitorsByStation") @GetMapping("/getMonitorsByStation")
@ApiOperationSupport(order = 130) @ApiOperationSupport(order = 130)

12
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/VideoConfigMapper.java

@ -0,0 +1,12 @@
package com.hnac.hzims.operational.station.mapper;
import com.hnac.hzims.operational.station.entity.VideoConfigEntity;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/**
* @author ty
*/
public interface VideoConfigMapper extends UserDataScopeBaseMapper<VideoConfigEntity> {
}

20
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/VideoConfigMapper.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.operational.station.mapper.VideoConfigMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.hnac.hzims.operational.station.entity.HzimsAnalyzeModelStationEntity">
<id column="ID" property="id" />
<result column="TENANT_ID" property="tenantId" />
<result column="STATION_ID" property="stationId" />
<result column="INSTANCE_CODE" property="instanceCode" />
<result column="REMARK" property="remark" />
<result column="CREATE_TIME" property="createTime" />
<result column="UPDATE_TIME" property="updateTime" />
<result column="CREATE_USER" property="createUser" />
<result column="UPDATE_USER" property="updateUser" />
<result column="IS_DELETED" property="isDeleted" />
<result column="STATUS" property="status" />
<result column="CREATE_DEPT" property="createDept" />
</resultMap>
</mapper>

13
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/VideoConfigService.java

@ -0,0 +1,13 @@
package com.hnac.hzims.operational.station.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.operational.station.entity.VideoConfigEntity;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/8 16:14
*/
public interface VideoConfigService extends IService<VideoConfigEntity> {
}

17
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/VideoConfigServiceImpl.java

@ -0,0 +1,17 @@
package com.hnac.hzims.operational.station.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.operational.station.entity.VideoConfigEntity;
import com.hnac.hzims.operational.station.mapper.VideoConfigMapper;
import com.hnac.hzims.operational.station.service.VideoConfigService;
import org.springframework.stereotype.Service;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/8/8 16:17
*/
@Service
public class VideoConfigServiceImpl extends ServiceImpl<VideoConfigMapper, VideoConfigEntity> implements VideoConfigService {
}
Loading…
Cancel
Save