修改无人机数据库表及其相关查询

This commit is contained in:
2025-12-26 03:30:48 +08:00
parent acb81d3b4d
commit 051bb7af47
2 changed files with 8 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ltgk.smartFishingPort.common.constant.Constants;
import com.ltgk.smartFishingPort.common.core.controller.BaseController;
import com.ltgk.smartFishingPort.common.core.domain.Response;
import com.ltgk.smartFishingPort.common.core.redis.RedisCache;
import com.ltgk.smartFishingPort.common.utils.MybatisUtil;
@@ -45,7 +46,7 @@ import java.util.concurrent.TimeUnit;
@Api(tags = {"监控设备模块"})
@RestController
@RequestMapping("/videoCamera")
public class VideoCameraController {
public class VideoCameraController extends BaseController {
@Autowired
RedisCache redisUtils;
@@ -73,6 +74,7 @@ public class VideoCameraController {
, @RequestParam(value = "pageSize", defaultValue = "15") Integer pageSize) {
IPage<UavEquipment> page = new Page<>(pageNo, pageSize);
QueryWrapper<UavEquipment> wrapper = MybatisUtil.notNullField(uavEquipment);
wrapper.orderByDesc("source_type");
IPage<UavEquipment> pageList = uavEquipmentMapper.selectPage(page, wrapper);
return Response.ok(pageList);
}

View File

@@ -29,7 +29,6 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("haishiju.uav_equipment")
@ApiModel(value="UavEquipment对象", description="无人机设备表")
public class UavEquipment extends Model<UavEquipment> {
@@ -180,22 +179,22 @@ public class UavEquipment extends Model<UavEquipment> {
private Integer isSdkControl;
@JsonProperty("gatewaySn")
@ApiModelProperty(value = "机巢sn")
@TableField(exist = false)
@TableField("gateway_sn")
private String gatewaySn;
@JsonProperty("droneSn")
@ApiModelProperty(value = "无人机sn")
@TableField(exist = false)
@TableField("drone_sn")
private String droneSn;
@JsonProperty("systemUuid")
@ApiModelProperty(value = "系统uuid")
@TableField(exist = false)
@TableField("system_uuid")
private String systemUuid;
@ApiModelProperty(value = "海波高度")
@TableField(exist = false)
@TableField("altitude")
@JsonProperty("altitude")
private BigDecimal altitude;
@ApiModelProperty(value = "离地高度")
@TableField(exist = false)
@TableField("height")
@JsonProperty("height")
private BigDecimal height;