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 @@ + +