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

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

View File

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