From 299f8afc3f2b58dd1ea93d31f17e65238ce8503b Mon Sep 17 00:00:00 2001 From: qichengbin Date: Thu, 8 Jan 2026 21:32:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=86=E9=A2=91=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=86=85=E5=AE=B9=EF=BC=8C=E5=B9=B6=E4=BA=8E=E6=A2=A6?= =?UTF-8?q?=E8=9B=9F=E8=81=94=E8=B0=83=EF=BC=8C=E4=BB=A5=E4=BF=9D=E8=AF=81?= =?UTF-8?q?CCTV=E8=BD=AE=E8=AF=A2=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E7=9A=84=E6=AD=A3=E5=B8=B8=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DsVideoController.java | 5 +-- .../domain/entity/DsVideo.java | 35 ++++++++++++------- .../service/impl/DsVideoServiceImpl.java | 2 +- .../main/resources/mapper/DsVideoMapper.xml | 2 ++ 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/controller/DsVideoController.java b/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/controller/DsVideoController.java index 4e434f9..2b3933a 100644 --- a/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/controller/DsVideoController.java +++ b/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/controller/DsVideoController.java @@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.google.common.collect.Lists; import com.ltgk.smartFishingPort.common.core.controller.BaseController; import com.ltgk.smartFishingPort.common.core.domain.AjaxResult; +import com.ltgk.smartFishingPort.common.core.page.TableDataInfo; import com.ltgk.smartFishingPort.common.utils.MybatisUtil; import com.ltgk.smartFishingPort.common.utils.StringUtils; import com.ltgk.smartFishingPort.domain.dto.DsArtemisDTO; @@ -54,7 +55,7 @@ public class DsVideoController extends BaseController { @ApiOperation(value = "查询列表数据") @PostMapping("/getList") - public Object getList(@RequestBody DsVideo dsVideo) { + public AjaxResult getList(@RequestBody DsVideo dsVideo) { QueryWrapper queryWrapper = MybatisUtil.notNullField(dsVideo); List list = dsVideoService.list(queryWrapper); return success(list); @@ -80,7 +81,7 @@ public class DsVideoController extends BaseController { @ApiOperation(value = "分页查询") @PostMapping("/page") - public Object page(@RequestBody DsVideo dsVideo) { + public TableDataInfo page(@RequestBody DsVideo dsVideo) { QueryWrapper queryWrapper = MybatisUtil.notNullField(dsVideo); startPage(dsVideo.getPageNum(), dsVideo.getPageSize()); List list = dsVideoService.list(queryWrapper); diff --git a/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/domain/entity/DsVideo.java b/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/domain/entity/DsVideo.java index 935f334..e55658f 100644 --- a/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/domain/entity/DsVideo.java +++ b/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/domain/entity/DsVideo.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.extension.activerecord.Model; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -12,6 +13,7 @@ import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.constraints.Min; import java.math.BigDecimal; import java.util.Date; @@ -33,8 +35,8 @@ public class DsVideo extends Model { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "主键") - @TableId(value = "id", type = IdType.ASSIGN_ID) - private String id; + @TableId(value = "id", type = IdType.AUTO) + private Long id; @ApiModelProperty(value = "监控编号") @TableField(value = "video_code", condition = SqlCondition.LIKE) @@ -147,19 +149,18 @@ public class DsVideo extends Model { @ApiModelProperty(value = "行政区域名称") private String areaName; - /** - * 页容量 - */ - @TableField(exist = false) - @JsonIgnore - private Integer pageSize; - /** - * 页码 - */ + @JsonProperty(value = "pageNum") + @ApiModelProperty(value = "页码") + @Min(value = 1, message = "页码必须大于0") @TableField(exist = false) - @JsonIgnore - private Integer pageNum; + private Integer pageNum = 1; + + @JsonProperty(value = "pageSize") + @ApiModelProperty(value = "页长") + @Min(value = 1, message = "页长必须大于0") + @TableField(exist = false) + private Integer pageSize = 15; /** * 热成像设备最大变倍参数 @@ -236,7 +237,15 @@ public class DsVideo extends Model { @TableField(value = "whether_to_turn_on_the_view") private Integer whetherToTurnOnTheView; + @ApiModelProperty(value = "是否轮询:0-否,1-是") + @TableField(value = "be_play") + private Integer bePlay; + @ApiModelProperty(value = "轮询顺序,页面轮询使用") @TableField(value = "play_index") private Integer playIndex; + + @ApiModelProperty(value = "摄像头轮询时间") + @TableField(value = "play_time") + private Integer playTime; } diff --git a/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/service/impl/DsVideoServiceImpl.java b/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/service/impl/DsVideoServiceImpl.java index d422ebb..c228dec 100644 --- a/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/service/impl/DsVideoServiceImpl.java +++ b/smartFishingPort-kechuang/src/main/java/com/ltgk/smartFishingPort/service/impl/DsVideoServiceImpl.java @@ -349,7 +349,7 @@ public class DsVideoServiceImpl extends ServiceImpl impl @Override public DsVideo getVideoInfo(DsVideo dsVideo) { - DsVideo dbDsVideo = dsVideoService.getById(Long.parseLong(dsVideo.getId())); + DsVideo dbDsVideo = dsVideoService.getById(dsVideo.getId()); return getDsVideoPTZ(dbDsVideo); } diff --git a/smartFishingPort-kechuang/src/main/resources/mapper/DsVideoMapper.xml b/smartFishingPort-kechuang/src/main/resources/mapper/DsVideoMapper.xml index 2f71003..e93343f 100644 --- a/smartFishingPort-kechuang/src/main/resources/mapper/DsVideoMapper.xml +++ b/smartFishingPort-kechuang/src/main/resources/mapper/DsVideoMapper.xml @@ -42,6 +42,8 @@ + +