添加IOT的MAPPER
This commit is contained in:
parent
35d61801fe
commit
aed6203e78
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.device.mapper;
|
||||
|
||||
import com.ruoyi.device.mapper.entity.AircraftEntity;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 无人机表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface AircraftMapper
|
||||
{
|
||||
/**
|
||||
* 根据无人机主键查询无人机
|
||||
*
|
||||
* @param aircraftId 无人机主键
|
||||
* @return 无人机信息
|
||||
*/
|
||||
AircraftEntity selectAircraftByAircraftId(Long aircraftId);
|
||||
|
||||
/**
|
||||
* 根据设备主键查询无人机列表
|
||||
*
|
||||
* @param deviceId 设备主键
|
||||
* @return 无人机列表
|
||||
*/
|
||||
List<AircraftEntity> selectAircraftListByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询无人机列表
|
||||
*
|
||||
* @param aircraft 无人机信息
|
||||
* @return 无人机集合
|
||||
*/
|
||||
List<AircraftEntity> selectAircraftList(AircraftEntity aircraft);
|
||||
|
||||
/**
|
||||
* 新增无人机
|
||||
*
|
||||
* @param aircraft 无人机信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertAircraft(AircraftEntity aircraft);
|
||||
|
||||
/**
|
||||
* 修改无人机
|
||||
*
|
||||
* @param aircraft 无人机信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updateAircraft(AircraftEntity aircraft);
|
||||
|
||||
/**
|
||||
* 删除无人机
|
||||
*
|
||||
* @param aircraftId 无人机主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteAircraftByAircraftId(Long aircraftId);
|
||||
|
||||
/**
|
||||
* 批量删除无人机
|
||||
*
|
||||
* @param aircraftIds 需要删除的无人机主键集合
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteAircraftByAircraftIds(Long[] aircraftIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.ruoyi.device.mapper;
|
||||
|
||||
import com.ruoyi.device.mapper.entity.AircraftPayloadEntity;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 无人机挂载关联表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface AircraftPayloadMapper
|
||||
{
|
||||
/**
|
||||
* 根据关联主键查询无人机挂载关联
|
||||
*
|
||||
* @param id 关联主键
|
||||
* @return 无人机挂载关联信息
|
||||
*/
|
||||
AircraftPayloadEntity selectAircraftPayloadById(Long id);
|
||||
|
||||
/**
|
||||
* 根据无人机主键查询无人机挂载关联列表
|
||||
*
|
||||
* @param aircraftId 无人机主键
|
||||
* @return 无人机挂载关联列表
|
||||
*/
|
||||
List<AircraftPayloadEntity> selectAircraftPayloadListByAircraftId(Long aircraftId);
|
||||
|
||||
/**
|
||||
* 根据挂载主键查询无人机挂载关联列表
|
||||
*
|
||||
* @param payloadId 挂载主键
|
||||
* @return 无人机挂载关联列表
|
||||
*/
|
||||
List<AircraftPayloadEntity> selectAircraftPayloadListByPayloadId(Long payloadId);
|
||||
|
||||
/**
|
||||
* 根据机场主键查询无人机挂载关联列表
|
||||
*
|
||||
* @param dockId 机场主键
|
||||
* @return 无人机挂载关联列表
|
||||
*/
|
||||
List<AircraftPayloadEntity> selectAircraftPayloadListByDockId(Long dockId);
|
||||
|
||||
/**
|
||||
* 查询无人机挂载关联列表
|
||||
*
|
||||
* @param aircraftPayload 无人机挂载关联信息
|
||||
* @return 无人机挂载关联集合
|
||||
*/
|
||||
List<AircraftPayloadEntity> selectAircraftPayloadList(AircraftPayloadEntity aircraftPayload);
|
||||
|
||||
/**
|
||||
* 新增无人机挂载关联
|
||||
*
|
||||
* @param aircraftPayload 无人机挂载关联信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertAircraftPayload(AircraftPayloadEntity aircraftPayload);
|
||||
|
||||
/**
|
||||
* 修改无人机挂载关联
|
||||
*
|
||||
* @param aircraftPayload 无人机挂载关联信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updateAircraftPayload(AircraftPayloadEntity aircraftPayload);
|
||||
|
||||
/**
|
||||
* 删除无人机挂载关联
|
||||
*
|
||||
* @param id 关联主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteAircraftPayloadById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除无人机挂载关联
|
||||
*
|
||||
* @param ids 需要删除的关联主键集合
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteAircraftPayloadByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.device.mapper;
|
||||
|
||||
import com.ruoyi.device.mapper.entity.DeviceEntity;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface DeviceMapper
|
||||
{
|
||||
/**
|
||||
* 根据设备主键查询设备
|
||||
*
|
||||
* @param deviceId 设备主键
|
||||
* @return 设备信息
|
||||
*/
|
||||
DeviceEntity selectDeviceByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*
|
||||
* @param device 设备信息
|
||||
* @return 设备集合
|
||||
*/
|
||||
List<DeviceEntity> selectDeviceList(DeviceEntity device);
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*
|
||||
* @param device 设备信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertDevice(DeviceEntity device);
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*
|
||||
* @param device 设备信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updateDevice(DeviceEntity device);
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*
|
||||
* @param deviceId 设备主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteDeviceByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*
|
||||
* @param deviceIds 需要删除的设备主键集合
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteDeviceByDeviceIds(Long[] deviceIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.ruoyi.device.mapper;
|
||||
|
||||
import com.ruoyi.device.mapper.entity.DockAircraftEntity;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机场无人机关联表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface DockAircraftMapper
|
||||
{
|
||||
/**
|
||||
* 根据关联主键查询机场无人机关联
|
||||
*
|
||||
* @param id 关联主键
|
||||
* @return 机场无人机关联信息
|
||||
*/
|
||||
DockAircraftEntity selectDockAircraftById(Long id);
|
||||
|
||||
/**
|
||||
* 根据机场主键查询机场无人机关联列表
|
||||
*
|
||||
* @param dockId 机场主键
|
||||
* @return 机场无人机关联列表
|
||||
*/
|
||||
List<DockAircraftEntity> selectDockAircraftListByDockId(Long dockId);
|
||||
|
||||
/**
|
||||
* 根据无人机主键查询机场无人机关联列表
|
||||
*
|
||||
* @param aircraftId 无人机主键
|
||||
* @return 机场无人机关联列表
|
||||
*/
|
||||
List<DockAircraftEntity> selectDockAircraftListByAircraftId(Long aircraftId);
|
||||
|
||||
/**
|
||||
* 查询机场无人机关联列表
|
||||
*
|
||||
* @param dockAircraft 机场无人机关联信息
|
||||
* @return 机场无人机关联集合
|
||||
*/
|
||||
List<DockAircraftEntity> selectDockAircraftList(DockAircraftEntity dockAircraft);
|
||||
|
||||
/**
|
||||
* 新增机场无人机关联
|
||||
*
|
||||
* @param dockAircraft 机场无人机关联信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertDockAircraft(DockAircraftEntity dockAircraft);
|
||||
|
||||
/**
|
||||
* 修改机场无人机关联
|
||||
*
|
||||
* @param dockAircraft 机场无人机关联信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updateDockAircraft(DockAircraftEntity dockAircraft);
|
||||
|
||||
/**
|
||||
* 删除机场无人机关联
|
||||
*
|
||||
* @param id 关联主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteDockAircraftById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除机场无人机关联
|
||||
*
|
||||
* @param ids 需要删除的关联主键集合
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteDockAircraftByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.ruoyi.device.mapper;
|
||||
|
||||
import com.ruoyi.device.mapper.entity.DockGroupEntity;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机场分组关联表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface DockGroupMapper
|
||||
{
|
||||
/**
|
||||
* 根据关联主键查询机场分组关联
|
||||
*
|
||||
* @param id 关联主键
|
||||
* @return 机场分组关联信息
|
||||
*/
|
||||
DockGroupEntity selectDockGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 根据机场主键查询机场分组关联列表
|
||||
*
|
||||
* @param dockId 机场主键
|
||||
* @return 机场分组关联列表
|
||||
*/
|
||||
List<DockGroupEntity> selectDockGroupListByDockId(Long dockId);
|
||||
|
||||
/**
|
||||
* 根据分组主键查询机场分组关联列表
|
||||
*
|
||||
* @param groupId 分组主键
|
||||
* @return 机场分组关联列表
|
||||
*/
|
||||
List<DockGroupEntity> selectDockGroupListByGroupId(Long groupId);
|
||||
|
||||
/**
|
||||
* 查询机场分组关联列表
|
||||
*
|
||||
* @param dockGroup 机场分组关联信息
|
||||
* @return 机场分组关联集合
|
||||
*/
|
||||
List<DockGroupEntity> selectDockGroupList(DockGroupEntity dockGroup);
|
||||
|
||||
/**
|
||||
* 新增机场分组关联
|
||||
*
|
||||
* @param dockGroup 机场分组关联信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertDockGroup(DockGroupEntity dockGroup);
|
||||
|
||||
/**
|
||||
* 修改机场分组关联
|
||||
*
|
||||
* @param dockGroup 机场分组关联信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updateDockGroup(DockGroupEntity dockGroup);
|
||||
|
||||
/**
|
||||
* 删除机场分组关联
|
||||
*
|
||||
* @param id 关联主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteDockGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除机场分组关联
|
||||
*
|
||||
* @param ids 需要删除的关联主键集合
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteDockGroupByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.device.mapper;
|
||||
|
||||
import com.ruoyi.device.mapper.entity.DockEntity;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机场表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface DockMapper
|
||||
{
|
||||
/**
|
||||
* 根据机场主键查询机场
|
||||
*
|
||||
* @param dockId 机场主键
|
||||
* @return 机场信息
|
||||
*/
|
||||
DockEntity selectDockByDockId(Long dockId);
|
||||
|
||||
/**
|
||||
* 根据设备主键查询机场列表
|
||||
*
|
||||
* @param deviceId 设备主键
|
||||
* @return 机场列表
|
||||
*/
|
||||
List<DockEntity> selectDockListByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询机场列表
|
||||
*
|
||||
* @param dock 机场信息
|
||||
* @return 机场集合
|
||||
*/
|
||||
List<DockEntity> selectDockList(DockEntity dock);
|
||||
|
||||
/**
|
||||
* 新增机场
|
||||
*
|
||||
* @param dock 机场信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertDock(DockEntity dock);
|
||||
|
||||
/**
|
||||
* 修改机场
|
||||
*
|
||||
* @param dock 机场信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updateDock(DockEntity dock);
|
||||
|
||||
/**
|
||||
* 删除机场
|
||||
*
|
||||
* @param dockId 机场主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteDockByDockId(Long dockId);
|
||||
|
||||
/**
|
||||
* 批量删除机场
|
||||
*
|
||||
* @param dockIds 需要删除的机场主键集合
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteDockByDockIds(Long[] dockIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.device.mapper;
|
||||
|
||||
import com.ruoyi.device.mapper.entity.GroupEntity;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分组表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface GroupMapper
|
||||
{
|
||||
/**
|
||||
* 根据分组主键查询分组
|
||||
*
|
||||
* @param groupId 分组主键
|
||||
* @return 分组信息
|
||||
*/
|
||||
GroupEntity selectGroupByGroupId(Long groupId);
|
||||
|
||||
/**
|
||||
* 查询分组列表
|
||||
*
|
||||
* @param group 分组信息
|
||||
* @return 分组集合
|
||||
*/
|
||||
List<GroupEntity> selectGroupList(GroupEntity group);
|
||||
|
||||
/**
|
||||
* 新增分组
|
||||
*
|
||||
* @param group 分组信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertGroup(GroupEntity group);
|
||||
|
||||
/**
|
||||
* 修改分组
|
||||
*
|
||||
* @param group 分组信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updateGroup(GroupEntity group);
|
||||
|
||||
/**
|
||||
* 删除分组
|
||||
*
|
||||
* @param groupId 分组主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteGroupByGroupId(Long groupId);
|
||||
|
||||
/**
|
||||
* 批量删除分组
|
||||
*
|
||||
* @param groupIds 需要删除的分组主键集合
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteGroupByGroupIds(Long[] groupIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.device.mapper;
|
||||
|
||||
import com.ruoyi.device.mapper.entity.PayloadEntity;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂载表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface PayloadMapper
|
||||
{
|
||||
/**
|
||||
* 根据挂载主键查询挂载
|
||||
*
|
||||
* @param payloadId 挂载主键
|
||||
* @return 挂载信息
|
||||
*/
|
||||
PayloadEntity selectPayloadByPayloadId(Long payloadId);
|
||||
|
||||
/**
|
||||
* 查询挂载列表
|
||||
*
|
||||
* @param payload 挂载信息
|
||||
* @return 挂载集合
|
||||
*/
|
||||
List<PayloadEntity> selectPayloadList(PayloadEntity payload);
|
||||
|
||||
/**
|
||||
* 新增挂载
|
||||
*
|
||||
* @param payload 挂载信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertPayload(PayloadEntity payload);
|
||||
|
||||
/**
|
||||
* 修改挂载
|
||||
*
|
||||
* @param payload 挂载信息
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updatePayload(PayloadEntity payload);
|
||||
|
||||
/**
|
||||
* 删除挂载
|
||||
*
|
||||
* @param payloadId 挂载主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deletePayloadByPayloadId(Long payloadId);
|
||||
|
||||
/**
|
||||
* 批量删除挂载
|
||||
*
|
||||
* @param payloadIds 需要删除的挂载主键集合
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deletePayloadByPayloadIds(Long[] payloadIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.ruoyi.device.mapper.entity;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 无人机表实体对象 device_aircraft
|
||||
* Mapper 层实体,对应数据库表
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public class AircraftEntity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 无人机主键 */
|
||||
private Long aircraftId;
|
||||
|
||||
/** 无人机名称 */
|
||||
private String aircraftName;
|
||||
|
||||
/** 设备表主键 */
|
||||
private Long deviceId;
|
||||
|
||||
public Long getAircraftId()
|
||||
{
|
||||
return aircraftId;
|
||||
}
|
||||
|
||||
public void setAircraftId(Long aircraftId)
|
||||
{
|
||||
this.aircraftId = aircraftId;
|
||||
}
|
||||
|
||||
public String getAircraftName()
|
||||
{
|
||||
return aircraftName;
|
||||
}
|
||||
|
||||
public void setAircraftName(String aircraftName)
|
||||
{
|
||||
this.aircraftName = aircraftName;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "AircraftEntity{" +
|
||||
"aircraftId=" + aircraftId +
|
||||
", aircraftName='" + aircraftName + '\'' +
|
||||
", deviceId=" + deviceId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.ruoyi.device.mapper.entity;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 无人机挂载关联表实体对象 device_aircraft_payload
|
||||
* Mapper 层实体,对应数据库表
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public class AircraftPayloadEntity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 关联主键 */
|
||||
private Long id;
|
||||
|
||||
/** 无人机主键 */
|
||||
private Long aircraftId;
|
||||
|
||||
/** 挂载主键 */
|
||||
private Long payloadId;
|
||||
|
||||
/** 机场主键 */
|
||||
private Long dockId;
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getAircraftId()
|
||||
{
|
||||
return aircraftId;
|
||||
}
|
||||
|
||||
public void setAircraftId(Long aircraftId)
|
||||
{
|
||||
this.aircraftId = aircraftId;
|
||||
}
|
||||
|
||||
public Long getPayloadId()
|
||||
{
|
||||
return payloadId;
|
||||
}
|
||||
|
||||
public void setPayloadId(Long payloadId)
|
||||
{
|
||||
this.payloadId = payloadId;
|
||||
}
|
||||
|
||||
public Long getDockId()
|
||||
{
|
||||
return dockId;
|
||||
}
|
||||
|
||||
public void setDockId(Long dockId)
|
||||
{
|
||||
this.dockId = dockId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "AircraftPayloadEntity{" +
|
||||
"id=" + id +
|
||||
", aircraftId=" + aircraftId +
|
||||
", payloadId=" + payloadId +
|
||||
", dockId=" + dockId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
package com.ruoyi.device.mapper.entity;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备表实体对象 device_device
|
||||
* Mapper 层实体,对应数据库表
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public class DeviceEntity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备主键 */
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
private String deviceName;
|
||||
|
||||
/** IOT中的设备ID */
|
||||
private String iotDeviceId;
|
||||
|
||||
/** 设备类型 */
|
||||
private String deviceType;
|
||||
|
||||
/** 设备厂商 */
|
||||
private String deviceManufacturer;
|
||||
|
||||
/** 设备型号 */
|
||||
private String deviceModel;
|
||||
|
||||
/** 设备SN号 */
|
||||
private String deviceSn;
|
||||
|
||||
/** 所属部门主键 */
|
||||
private Long deptId;
|
||||
|
||||
/** 网关 */
|
||||
private String gateway;
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getIotDeviceId()
|
||||
{
|
||||
return iotDeviceId;
|
||||
}
|
||||
|
||||
public void setIotDeviceId(String iotDeviceId)
|
||||
{
|
||||
this.iotDeviceId = iotDeviceId;
|
||||
}
|
||||
|
||||
public String getDeviceType()
|
||||
{
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setDeviceType(String deviceType)
|
||||
{
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getDeviceManufacturer()
|
||||
{
|
||||
return deviceManufacturer;
|
||||
}
|
||||
|
||||
public void setDeviceManufacturer(String deviceManufacturer)
|
||||
{
|
||||
this.deviceManufacturer = deviceManufacturer;
|
||||
}
|
||||
|
||||
public String getDeviceModel()
|
||||
{
|
||||
return deviceModel;
|
||||
}
|
||||
|
||||
public void setDeviceModel(String deviceModel)
|
||||
{
|
||||
this.deviceModel = deviceModel;
|
||||
}
|
||||
|
||||
public String getDeviceSn()
|
||||
{
|
||||
return deviceSn;
|
||||
}
|
||||
|
||||
public void setDeviceSn(String deviceSn)
|
||||
{
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getGateway()
|
||||
{
|
||||
return gateway;
|
||||
}
|
||||
|
||||
public void setGateway(String gateway)
|
||||
{
|
||||
this.gateway = gateway;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "DeviceEntity{" +
|
||||
"deviceId=" + deviceId +
|
||||
", deviceName='" + deviceName + '\'' +
|
||||
", iotDeviceId='" + iotDeviceId + '\'' +
|
||||
", deviceType='" + deviceType + '\'' +
|
||||
", deviceManufacturer='" + deviceManufacturer + '\'' +
|
||||
", deviceModel='" + deviceModel + '\'' +
|
||||
", deviceSn='" + deviceSn + '\'' +
|
||||
", deptId=" + deptId +
|
||||
", gateway='" + gateway + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.ruoyi.device.mapper.entity;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 机场无人机关联表实体对象 device_dock_aircraft
|
||||
* Mapper 层实体,对应数据库表
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public class DockAircraftEntity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 关联主键 */
|
||||
private Long id;
|
||||
|
||||
/** 机场主键 */
|
||||
private Long dockId;
|
||||
|
||||
/** 无人机主键 */
|
||||
private Long aircraftId;
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getDockId()
|
||||
{
|
||||
return dockId;
|
||||
}
|
||||
|
||||
public void setDockId(Long dockId)
|
||||
{
|
||||
this.dockId = dockId;
|
||||
}
|
||||
|
||||
public Long getAircraftId()
|
||||
{
|
||||
return aircraftId;
|
||||
}
|
||||
|
||||
public void setAircraftId(Long aircraftId)
|
||||
{
|
||||
this.aircraftId = aircraftId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "DockAircraftEntity{" +
|
||||
"id=" + id +
|
||||
", dockId=" + dockId +
|
||||
", aircraftId=" + aircraftId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.ruoyi.device.mapper.entity;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 机场表实体对象 device_dock
|
||||
* Mapper 层实体,对应数据库表
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public class DockEntity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 机场主键 */
|
||||
private Long dockId;
|
||||
|
||||
/** 机场名称 */
|
||||
private String dockName;
|
||||
|
||||
/** 机场位置 */
|
||||
private String dockLocation;
|
||||
|
||||
/** 设备表主键 */
|
||||
private Long deviceId;
|
||||
|
||||
public Long getDockId()
|
||||
{
|
||||
return dockId;
|
||||
}
|
||||
|
||||
public void setDockId(Long dockId)
|
||||
{
|
||||
this.dockId = dockId;
|
||||
}
|
||||
|
||||
public String getDockName()
|
||||
{
|
||||
return dockName;
|
||||
}
|
||||
|
||||
public void setDockName(String dockName)
|
||||
{
|
||||
this.dockName = dockName;
|
||||
}
|
||||
|
||||
public String getDockLocation()
|
||||
{
|
||||
return dockLocation;
|
||||
}
|
||||
|
||||
public void setDockLocation(String dockLocation)
|
||||
{
|
||||
this.dockLocation = dockLocation;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "DockEntity{" +
|
||||
"dockId=" + dockId +
|
||||
", dockName='" + dockName + '\'' +
|
||||
", dockLocation='" + dockLocation + '\'' +
|
||||
", deviceId=" + deviceId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.ruoyi.device.mapper.entity;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 机场分组关联表实体对象 device_dock_group
|
||||
* Mapper 层实体,对应数据库表
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public class DockGroupEntity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 关联主键 */
|
||||
private Long id;
|
||||
|
||||
/** 机场主键 */
|
||||
private Long dockId;
|
||||
|
||||
/** 分组主键 */
|
||||
private Long groupId;
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getDockId()
|
||||
{
|
||||
return dockId;
|
||||
}
|
||||
|
||||
public void setDockId(Long dockId)
|
||||
{
|
||||
this.dockId = dockId;
|
||||
}
|
||||
|
||||
public Long getGroupId()
|
||||
{
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(Long groupId)
|
||||
{
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "DockGroupEntity{" +
|
||||
"id=" + id +
|
||||
", dockId=" + dockId +
|
||||
", groupId=" + groupId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.ruoyi.device.mapper.entity;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 分组表实体对象 device_group
|
||||
* Mapper 层实体,对应数据库表
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public class GroupEntity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 分组主键 */
|
||||
private Long groupId;
|
||||
|
||||
/** 分组名称 */
|
||||
private String groupName;
|
||||
|
||||
public Long getGroupId()
|
||||
{
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(Long groupId)
|
||||
{
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getGroupName()
|
||||
{
|
||||
return groupName;
|
||||
}
|
||||
|
||||
public void setGroupName(String groupName)
|
||||
{
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "GroupEntity{" +
|
||||
"groupId=" + groupId +
|
||||
", groupName='" + groupName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
package com.ruoyi.device.mapper.entity;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 挂载表实体对象 device_payload
|
||||
* Mapper 层实体,对应数据库表
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public class PayloadEntity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 挂载主键 */
|
||||
private Long payloadId;
|
||||
|
||||
/** 挂载名称 */
|
||||
private String payloadName;
|
||||
|
||||
/** 挂载类型 */
|
||||
private String payloadType;
|
||||
|
||||
/** 挂载显示名称 */
|
||||
private String payloadDisplayName;
|
||||
|
||||
/** 挂载动态信息 */
|
||||
private String payloadDynamicInfo;
|
||||
|
||||
/** 挂载SN号 */
|
||||
private String payloadSn;
|
||||
|
||||
/** IOT中的设备ID */
|
||||
private String iotDeviceId;
|
||||
|
||||
public Long getPayloadId()
|
||||
{
|
||||
return payloadId;
|
||||
}
|
||||
|
||||
public void setPayloadId(Long payloadId)
|
||||
{
|
||||
this.payloadId = payloadId;
|
||||
}
|
||||
|
||||
public String getPayloadName()
|
||||
{
|
||||
return payloadName;
|
||||
}
|
||||
|
||||
public void setPayloadName(String payloadName)
|
||||
{
|
||||
this.payloadName = payloadName;
|
||||
}
|
||||
|
||||
public String getPayloadType()
|
||||
{
|
||||
return payloadType;
|
||||
}
|
||||
|
||||
public void setPayloadType(String payloadType)
|
||||
{
|
||||
this.payloadType = payloadType;
|
||||
}
|
||||
|
||||
public String getPayloadDisplayName()
|
||||
{
|
||||
return payloadDisplayName;
|
||||
}
|
||||
|
||||
public void setPayloadDisplayName(String payloadDisplayName)
|
||||
{
|
||||
this.payloadDisplayName = payloadDisplayName;
|
||||
}
|
||||
|
||||
public String getPayloadDynamicInfo()
|
||||
{
|
||||
return payloadDynamicInfo;
|
||||
}
|
||||
|
||||
public void setPayloadDynamicInfo(String payloadDynamicInfo)
|
||||
{
|
||||
this.payloadDynamicInfo = payloadDynamicInfo;
|
||||
}
|
||||
|
||||
public String getPayloadSn()
|
||||
{
|
||||
return payloadSn;
|
||||
}
|
||||
|
||||
public void setPayloadSn(String payloadSn)
|
||||
{
|
||||
this.payloadSn = payloadSn;
|
||||
}
|
||||
|
||||
public String getIotDeviceId()
|
||||
{
|
||||
return iotDeviceId;
|
||||
}
|
||||
|
||||
public void setIotDeviceId(String iotDeviceId)
|
||||
{
|
||||
this.iotDeviceId = iotDeviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "PayloadEntity{" +
|
||||
"payloadId=" + payloadId +
|
||||
", payloadName='" + payloadName + '\'' +
|
||||
", payloadType='" + payloadType + '\'' +
|
||||
", payloadDisplayName='" + payloadDisplayName + '\'' +
|
||||
", payloadDynamicInfo='" + payloadDynamicInfo + '\'' +
|
||||
", payloadSn='" + payloadSn + '\'' +
|
||||
", iotDeviceId='" + iotDeviceId + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
-- ============================================================
|
||||
-- Flyway Migration Script
|
||||
-- ============================================================
|
||||
-- Version: V2
|
||||
-- Description: Create device management tables (device, dock, aircraft)
|
||||
-- Author: ruoyi
|
||||
-- Date: 2026-01-16
|
||||
-- ============================================================
|
||||
|
||||
-- 创建设备表
|
||||
CREATE TABLE IF NOT EXISTS device_device (
|
||||
device_id BIGINT NOT NULL AUTO_INCREMENT COMMENT '设备主键',
|
||||
device_name VARCHAR(100) COMMENT '设备名称',
|
||||
iot_device_id VARCHAR(100) COMMENT 'IOT中的设备ID',
|
||||
device_type VARCHAR(50) COMMENT '设备类型',
|
||||
device_manufacturer VARCHAR(100) COMMENT '设备厂商',
|
||||
device_model VARCHAR(100) COMMENT '设备型号',
|
||||
device_sn VARCHAR(100) COMMENT '设备SN号',
|
||||
dept_id BIGINT COMMENT '所属部门主键',
|
||||
gateway VARCHAR(100) COMMENT '网关',
|
||||
create_by VARCHAR(64) COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_by VARCHAR(64) COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
remark VARCHAR(500) COMMENT '备注',
|
||||
PRIMARY KEY (device_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='设备表';
|
||||
|
||||
-- 创建机场表
|
||||
CREATE TABLE IF NOT EXISTS device_dock (
|
||||
dock_id BIGINT NOT NULL AUTO_INCREMENT COMMENT '机场主键',
|
||||
dock_name VARCHAR(100) COMMENT '机场名称',
|
||||
dock_location VARCHAR(200) COMMENT '机场位置',
|
||||
device_id BIGINT COMMENT '设备表主键',
|
||||
create_by VARCHAR(64) COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_by VARCHAR(64) COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
remark VARCHAR(500) COMMENT '备注',
|
||||
PRIMARY KEY (dock_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机场表';
|
||||
|
||||
-- 创建无人机表
|
||||
CREATE TABLE IF NOT EXISTS device_aircraft (
|
||||
aircraft_id BIGINT NOT NULL AUTO_INCREMENT COMMENT '无人机主键',
|
||||
aircraft_name VARCHAR(100) COMMENT '无人机名称',
|
||||
device_id BIGINT COMMENT '设备表主键',
|
||||
create_by VARCHAR(64) COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_by VARCHAR(64) COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
remark VARCHAR(500) COMMENT '备注',
|
||||
PRIMARY KEY (aircraft_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='无人机表';
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
-- ============================================================
|
||||
-- Flyway Migration Script
|
||||
-- ============================================================
|
||||
-- Version: V3
|
||||
-- Description: Create association tables (dock_aircraft, payload, aircraft_payload)
|
||||
-- Author: ruoyi
|
||||
-- Date: 2026-01-16
|
||||
-- ============================================================
|
||||
|
||||
-- 创建机场无人机关联表
|
||||
CREATE TABLE IF NOT EXISTS device_dock_aircraft (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT COMMENT '关联主键',
|
||||
dock_id BIGINT NOT NULL COMMENT '机场主键',
|
||||
aircraft_id BIGINT NOT NULL COMMENT '无人机主键',
|
||||
create_by VARCHAR(64) COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_by VARCHAR(64) COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
remark VARCHAR(500) COMMENT '备注',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机场无人机关联表';
|
||||
|
||||
-- 创建挂载表
|
||||
CREATE TABLE IF NOT EXISTS device_payload (
|
||||
payload_id BIGINT NOT NULL AUTO_INCREMENT COMMENT '挂载主键',
|
||||
payload_name VARCHAR(100) COMMENT '挂载名称',
|
||||
payload_type VARCHAR(50) COMMENT '挂载类型',
|
||||
payload_display_name VARCHAR(100) COMMENT '挂载显示名称',
|
||||
payload_dynamic_info TEXT COMMENT '挂载动态信息',
|
||||
payload_sn VARCHAR(100) COMMENT '挂载SN号',
|
||||
iot_device_id VARCHAR(100) COMMENT 'IOT中的设备ID',
|
||||
create_by VARCHAR(64) COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_by VARCHAR(64) COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
remark VARCHAR(500) COMMENT '备注',
|
||||
PRIMARY KEY (payload_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='挂载表';
|
||||
|
||||
-- 创建无人机挂载关联表
|
||||
CREATE TABLE IF NOT EXISTS device_aircraft_payload (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT COMMENT '关联主键',
|
||||
aircraft_id BIGINT NOT NULL COMMENT '无人机主键',
|
||||
payload_id BIGINT NOT NULL COMMENT '挂载主键',
|
||||
dock_id BIGINT NOT NULL COMMENT '机场主键',
|
||||
create_by VARCHAR(64) COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_by VARCHAR(64) COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
remark VARCHAR(500) COMMENT '备注',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='无人机挂载关联表';
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
-- ============================================================
|
||||
-- Flyway Migration Script
|
||||
-- ============================================================
|
||||
-- Version: V4
|
||||
-- Description: Create group tables (group, dock_group)
|
||||
-- Author: ruoyi
|
||||
-- Date: 2026-01-16
|
||||
-- ============================================================
|
||||
|
||||
-- 创建分组表
|
||||
CREATE TABLE IF NOT EXISTS device_group (
|
||||
group_id BIGINT NOT NULL AUTO_INCREMENT COMMENT '分组主键',
|
||||
group_name VARCHAR(100) COMMENT '分组名称',
|
||||
create_by VARCHAR(64) COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_by VARCHAR(64) COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
remark VARCHAR(500) COMMENT '备注',
|
||||
PRIMARY KEY (group_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='分组表';
|
||||
|
||||
-- 创建机场分组关联表
|
||||
CREATE TABLE IF NOT EXISTS device_dock_group (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT COMMENT '关联主键',
|
||||
dock_id BIGINT NOT NULL COMMENT '机场主键',
|
||||
group_id BIGINT NOT NULL COMMENT '分组主键',
|
||||
create_by VARCHAR(64) COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_by VARCHAR(64) COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
remark VARCHAR(500) COMMENT '备注',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机场分组关联表';
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<?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.ruoyi.device.mapper.AircraftMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.device.mapper.entity.AircraftEntity" id="AircraftResult">
|
||||
<result property="aircraftId" column="aircraft_id" />
|
||||
<result property="aircraftName" column="aircraft_name" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAircraftVo">
|
||||
select aircraft_id, aircraft_name, device_id,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from device_aircraft
|
||||
</sql>
|
||||
|
||||
<select id="selectAircraftByAircraftId" parameterType="Long" resultMap="AircraftResult">
|
||||
<include refid="selectAircraftVo"/>
|
||||
where aircraft_id = #{aircraftId}
|
||||
</select>
|
||||
|
||||
<select id="selectAircraftListByDeviceId" parameterType="Long" resultMap="AircraftResult">
|
||||
<include refid="selectAircraftVo"/>
|
||||
where device_id = #{deviceId}
|
||||
</select>
|
||||
|
||||
<select id="selectAircraftList" parameterType="com.ruoyi.device.mapper.entity.AircraftEntity" resultMap="AircraftResult">
|
||||
<include refid="selectAircraftVo"/>
|
||||
<where>
|
||||
<if test="aircraftName != null and aircraftName != ''">
|
||||
and aircraft_name like concat('%', #{aircraftName}, '%')
|
||||
</if>
|
||||
<if test="deviceId != null">
|
||||
and device_id = #{deviceId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertAircraft" parameterType="com.ruoyi.device.mapper.entity.AircraftEntity" useGeneratedKeys="true" keyProperty="aircraftId">
|
||||
insert into device_aircraft
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="aircraftName != null and aircraftName != ''">aircraft_name,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="aircraftName != null and aircraftName != ''">#{aircraftName},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
now()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAircraft" parameterType="com.ruoyi.device.mapper.entity.AircraftEntity">
|
||||
update device_aircraft
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="aircraftName != null and aircraftName != ''">aircraft_name = #{aircraftName},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where aircraft_id = #{aircraftId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAircraftByAircraftId" parameterType="Long">
|
||||
delete from device_aircraft where aircraft_id = #{aircraftId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAircraftByAircraftIds" parameterType="Long">
|
||||
delete from device_aircraft where aircraft_id in
|
||||
<foreach item="aircraftId" collection="array" open="(" separator="," close=")">
|
||||
#{aircraftId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
<?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.ruoyi.device.mapper.AircraftPayloadMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.device.mapper.entity.AircraftPayloadEntity" id="AircraftPayloadResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="aircraftId" column="aircraft_id" />
|
||||
<result property="payloadId" column="payload_id" />
|
||||
<result property="dockId" column="dock_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAircraftPayloadVo">
|
||||
select id, aircraft_id, payload_id, dock_id,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from device_aircraft_payload
|
||||
</sql>
|
||||
|
||||
<select id="selectAircraftPayloadById" parameterType="Long" resultMap="AircraftPayloadResult">
|
||||
<include refid="selectAircraftPayloadVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectAircraftPayloadListByAircraftId" parameterType="Long" resultMap="AircraftPayloadResult">
|
||||
<include refid="selectAircraftPayloadVo"/>
|
||||
where aircraft_id = #{aircraftId}
|
||||
</select>
|
||||
|
||||
<select id="selectAircraftPayloadListByPayloadId" parameterType="Long" resultMap="AircraftPayloadResult">
|
||||
<include refid="selectAircraftPayloadVo"/>
|
||||
where payload_id = #{payloadId}
|
||||
</select>
|
||||
|
||||
<select id="selectAircraftPayloadListByDockId" parameterType="Long" resultMap="AircraftPayloadResult">
|
||||
<include refid="selectAircraftPayloadVo"/>
|
||||
where dock_id = #{dockId}
|
||||
</select>
|
||||
|
||||
<select id="selectAircraftPayloadList" parameterType="com.ruoyi.device.mapper.entity.AircraftPayloadEntity" resultMap="AircraftPayloadResult">
|
||||
<include refid="selectAircraftPayloadVo"/>
|
||||
<where>
|
||||
<if test="aircraftId != null">
|
||||
and aircraft_id = #{aircraftId}
|
||||
</if>
|
||||
<if test="payloadId != null">
|
||||
and payload_id = #{payloadId}
|
||||
</if>
|
||||
<if test="dockId != null">
|
||||
and dock_id = #{dockId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertAircraftPayload" parameterType="com.ruoyi.device.mapper.entity.AircraftPayloadEntity" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into device_aircraft_payload
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="aircraftId != null">aircraft_id,</if>
|
||||
<if test="payloadId != null">payload_id,</if>
|
||||
<if test="dockId != null">dock_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="aircraftId != null">#{aircraftId},</if>
|
||||
<if test="payloadId != null">#{payloadId},</if>
|
||||
<if test="dockId != null">#{dockId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
now()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAircraftPayload" parameterType="com.ruoyi.device.mapper.entity.AircraftPayloadEntity">
|
||||
update device_aircraft_payload
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="aircraftId != null">aircraft_id = #{aircraftId},</if>
|
||||
<if test="payloadId != null">payload_id = #{payloadId},</if>
|
||||
<if test="dockId != null">dock_id = #{dockId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAircraftPayloadById" parameterType="Long">
|
||||
delete from device_aircraft_payload where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAircraftPayloadByIds" parameterType="Long">
|
||||
delete from device_aircraft_payload where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
<?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.ruoyi.device.mapper.DeviceMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.device.mapper.entity.DeviceEntity" id="DeviceResult">
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="iotDeviceId" column="iot_device_id" />
|
||||
<result property="deviceType" column="device_type" />
|
||||
<result property="deviceManufacturer" column="device_manufacturer" />
|
||||
<result property="deviceModel" column="device_model" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="gateway" column="gateway" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceVo">
|
||||
select device_id, device_name, iot_device_id, device_type, device_manufacturer,
|
||||
device_model, device_sn, dept_id, gateway, create_by, create_time, update_by, update_time, remark
|
||||
from device_device
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceByDeviceId" parameterType="Long" resultMap="DeviceResult">
|
||||
<include refid="selectDeviceVo"/>
|
||||
where device_id = #{deviceId}
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceList" parameterType="com.ruoyi.device.mapper.entity.DeviceEntity" resultMap="DeviceResult">
|
||||
<include refid="selectDeviceVo"/>
|
||||
<where>
|
||||
<if test="deviceName != null and deviceName != ''">
|
||||
and device_name like concat('%', #{deviceName}, '%')
|
||||
</if>
|
||||
<if test="iotDeviceId != null and iotDeviceId != ''">
|
||||
and iot_device_id = #{iotDeviceId}
|
||||
</if>
|
||||
<if test="deviceType != null and deviceType != ''">
|
||||
and device_type = #{deviceType}
|
||||
</if>
|
||||
<if test="deviceManufacturer != null and deviceManufacturer != ''">
|
||||
and device_manufacturer = #{deviceManufacturer}
|
||||
</if>
|
||||
<if test="deviceModel != null and deviceModel != ''">
|
||||
and device_model = #{deviceModel}
|
||||
</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">
|
||||
and device_sn = #{deviceSn}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertDevice" parameterType="com.ruoyi.device.mapper.entity.DeviceEntity" useGeneratedKeys="true" keyProperty="deviceId">
|
||||
insert into device_device
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceName != null and deviceName != ''">device_name,</if>
|
||||
<if test="iotDeviceId != null and iotDeviceId != ''">iot_device_id,</if>
|
||||
<if test="deviceType != null and deviceType != ''">device_type,</if>
|
||||
<if test="deviceManufacturer != null and deviceManufacturer != ''">device_manufacturer,</if>
|
||||
<if test="deviceModel != null and deviceModel != ''">device_model,</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">device_sn,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="gateway != null and gateway != ''">gateway,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||
<if test="iotDeviceId != null and iotDeviceId != ''">#{iotDeviceId},</if>
|
||||
<if test="deviceType != null and deviceType != ''">#{deviceType},</if>
|
||||
<if test="deviceManufacturer != null and deviceManufacturer != ''">#{deviceManufacturer},</if>
|
||||
<if test="deviceModel != null and deviceModel != ''">#{deviceModel},</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">#{deviceSn},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="gateway != null and gateway != ''">#{gateway},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
now()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevice" parameterType="com.ruoyi.device.mapper.entity.DeviceEntity">
|
||||
update device_device
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceName != null and deviceName != ''">device_name = #{deviceName},</if>
|
||||
<if test="iotDeviceId != null and iotDeviceId != ''">iot_device_id = #{iotDeviceId},</if>
|
||||
<if test="deviceType != null and deviceType != ''">device_type = #{deviceType},</if>
|
||||
<if test="deviceManufacturer != null and deviceManufacturer != ''">device_manufacturer = #{deviceManufacturer},</if>
|
||||
<if test="deviceModel != null and deviceModel != ''">device_model = #{deviceModel},</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">device_sn = #{deviceSn},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="gateway != null and gateway != ''">gateway = #{gateway},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where device_id = #{deviceId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceByDeviceId" parameterType="Long">
|
||||
delete from device_device where device_id = #{deviceId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceByDeviceIds" parameterType="Long">
|
||||
delete from device_device where device_id in
|
||||
<foreach item="deviceId" collection="array" open="(" separator="," close=")">
|
||||
#{deviceId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<?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.ruoyi.device.mapper.DockAircraftMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.device.mapper.entity.DockAircraftEntity" id="DockAircraftResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="dockId" column="dock_id" />
|
||||
<result property="aircraftId" column="aircraft_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDockAircraftVo">
|
||||
select id, dock_id, aircraft_id,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from device_dock_aircraft
|
||||
</sql>
|
||||
|
||||
<select id="selectDockAircraftById" parameterType="Long" resultMap="DockAircraftResult">
|
||||
<include refid="selectDockAircraftVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectDockAircraftListByDockId" parameterType="Long" resultMap="DockAircraftResult">
|
||||
<include refid="selectDockAircraftVo"/>
|
||||
where dock_id = #{dockId}
|
||||
</select>
|
||||
|
||||
<select id="selectDockAircraftListByAircraftId" parameterType="Long" resultMap="DockAircraftResult">
|
||||
<include refid="selectDockAircraftVo"/>
|
||||
where aircraft_id = #{aircraftId}
|
||||
</select>
|
||||
|
||||
<select id="selectDockAircraftList" parameterType="com.ruoyi.device.mapper.entity.DockAircraftEntity" resultMap="DockAircraftResult">
|
||||
<include refid="selectDockAircraftVo"/>
|
||||
<where>
|
||||
<if test="dockId != null">
|
||||
and dock_id = #{dockId}
|
||||
</if>
|
||||
<if test="aircraftId != null">
|
||||
and aircraft_id = #{aircraftId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertDockAircraft" parameterType="com.ruoyi.device.mapper.entity.DockAircraftEntity" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into device_dock_aircraft
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="dockId != null">dock_id,</if>
|
||||
<if test="aircraftId != null">aircraft_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dockId != null">#{dockId},</if>
|
||||
<if test="aircraftId != null">#{aircraftId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
now()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDockAircraft" parameterType="com.ruoyi.device.mapper.entity.DockAircraftEntity">
|
||||
update device_dock_aircraft
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="dockId != null">dock_id = #{dockId},</if>
|
||||
<if test="aircraftId != null">aircraft_id = #{aircraftId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDockAircraftById" parameterType="Long">
|
||||
delete from device_dock_aircraft where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDockAircraftByIds" parameterType="Long">
|
||||
delete from device_dock_aircraft where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<?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.ruoyi.device.mapper.DockGroupMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.device.mapper.entity.DockGroupEntity" id="DockGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="dockId" column="dock_id" />
|
||||
<result property="groupId" column="group_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDockGroupVo">
|
||||
select id, dock_id, group_id,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from device_dock_group
|
||||
</sql>
|
||||
|
||||
<select id="selectDockGroupById" parameterType="Long" resultMap="DockGroupResult">
|
||||
<include refid="selectDockGroupVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectDockGroupListByDockId" parameterType="Long" resultMap="DockGroupResult">
|
||||
<include refid="selectDockGroupVo"/>
|
||||
where dock_id = #{dockId}
|
||||
</select>
|
||||
|
||||
<select id="selectDockGroupListByGroupId" parameterType="Long" resultMap="DockGroupResult">
|
||||
<include refid="selectDockGroupVo"/>
|
||||
where group_id = #{groupId}
|
||||
</select>
|
||||
|
||||
<select id="selectDockGroupList" parameterType="com.ruoyi.device.mapper.entity.DockGroupEntity" resultMap="DockGroupResult">
|
||||
<include refid="selectDockGroupVo"/>
|
||||
<where>
|
||||
<if test="dockId != null">
|
||||
and dock_id = #{dockId}
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
and group_id = #{groupId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertDockGroup" parameterType="com.ruoyi.device.mapper.entity.DockGroupEntity" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into device_dock_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="dockId != null">dock_id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dockId != null">#{dockId},</if>
|
||||
<if test="groupId != null">#{groupId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
now()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDockGroup" parameterType="com.ruoyi.device.mapper.entity.DockGroupEntity">
|
||||
update device_dock_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="dockId != null">dock_id = #{dockId},</if>
|
||||
<if test="groupId != null">group_id = #{groupId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDockGroupById" parameterType="Long">
|
||||
delete from device_dock_group where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDockGroupByIds" parameterType="Long">
|
||||
delete from device_dock_group where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
<?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.ruoyi.device.mapper.DockMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.device.mapper.entity.DockEntity" id="DockResult">
|
||||
<result property="dockId" column="dock_id" />
|
||||
<result property="dockName" column="dock_name" />
|
||||
<result property="dockLocation" column="dock_location" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDockVo">
|
||||
select dock_id, dock_name, dock_location, device_id,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from device_dock
|
||||
</sql>
|
||||
|
||||
<select id="selectDockByDockId" parameterType="Long" resultMap="DockResult">
|
||||
<include refid="selectDockVo"/>
|
||||
where dock_id = #{dockId}
|
||||
</select>
|
||||
|
||||
<select id="selectDockListByDeviceId" parameterType="Long" resultMap="DockResult">
|
||||
<include refid="selectDockVo"/>
|
||||
where device_id = #{deviceId}
|
||||
</select>
|
||||
|
||||
<select id="selectDockList" parameterType="com.ruoyi.device.mapper.entity.DockEntity" resultMap="DockResult">
|
||||
<include refid="selectDockVo"/>
|
||||
<where>
|
||||
<if test="dockName != null and dockName != ''">
|
||||
and dock_name like concat('%', #{dockName}, '%')
|
||||
</if>
|
||||
<if test="dockLocation != null and dockLocation != ''">
|
||||
and dock_location like concat('%', #{dockLocation}, '%')
|
||||
</if>
|
||||
<if test="deviceId != null">
|
||||
and device_id = #{deviceId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertDock" parameterType="com.ruoyi.device.mapper.entity.DockEntity" useGeneratedKeys="true" keyProperty="dockId">
|
||||
insert into device_dock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="dockName != null and dockName != ''">dock_name,</if>
|
||||
<if test="dockLocation != null and dockLocation != ''">dock_location,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dockName != null and dockName != ''">#{dockName},</if>
|
||||
<if test="dockLocation != null and dockLocation != ''">#{dockLocation},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
now()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDock" parameterType="com.ruoyi.device.mapper.entity.DockEntity">
|
||||
update device_dock
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="dockName != null and dockName != ''">dock_name = #{dockName},</if>
|
||||
<if test="dockLocation != null and dockLocation != ''">dock_location = #{dockLocation},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where dock_id = #{dockId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDockByDockId" parameterType="Long">
|
||||
delete from device_dock where dock_id = #{dockId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDockByDockIds" parameterType="Long">
|
||||
delete from device_dock where dock_id in
|
||||
<foreach item="dockId" collection="array" open="(" separator="," close=")">
|
||||
#{dockId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?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.ruoyi.device.mapper.GroupMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.device.mapper.entity.GroupEntity" id="GroupResult">
|
||||
<result property="groupId" column="group_id" />
|
||||
<result property="groupName" column="group_name" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGroupVo">
|
||||
select group_id, group_name,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from device_group
|
||||
</sql>
|
||||
|
||||
<select id="selectGroupByGroupId" parameterType="Long" resultMap="GroupResult">
|
||||
<include refid="selectGroupVo"/>
|
||||
where group_id = #{groupId}
|
||||
</select>
|
||||
|
||||
<select id="selectGroupList" parameterType="com.ruoyi.device.mapper.entity.GroupEntity" resultMap="GroupResult">
|
||||
<include refid="selectGroupVo"/>
|
||||
<where>
|
||||
<if test="groupName != null and groupName != ''">
|
||||
and group_name like concat('%', #{groupName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertGroup" parameterType="com.ruoyi.device.mapper.entity.GroupEntity" useGeneratedKeys="true" keyProperty="groupId">
|
||||
insert into device_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="groupName != null and groupName != ''">group_name,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="groupName != null and groupName != ''">#{groupName},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
now()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGroup" parameterType="com.ruoyi.device.mapper.entity.GroupEntity">
|
||||
update device_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="groupName != null and groupName != ''">group_name = #{groupName},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where group_id = #{groupId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGroupByGroupId" parameterType="Long">
|
||||
delete from device_group where group_id = #{groupId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGroupByGroupIds" parameterType="Long">
|
||||
delete from device_group where group_id in
|
||||
<foreach item="groupId" collection="array" open="(" separator="," close=")">
|
||||
#{groupId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
<?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.ruoyi.device.mapper.PayloadMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.device.mapper.entity.PayloadEntity" id="PayloadResult">
|
||||
<result property="payloadId" column="payload_id" />
|
||||
<result property="payloadName" column="payload_name" />
|
||||
<result property="payloadType" column="payload_type" />
|
||||
<result property="payloadDisplayName" column="payload_display_name" />
|
||||
<result property="payloadDynamicInfo" column="payload_dynamic_info" />
|
||||
<result property="payloadSn" column="payload_sn" />
|
||||
<result property="iotDeviceId" column="iot_device_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPayloadVo">
|
||||
select payload_id, payload_name, payload_type, payload_display_name,
|
||||
payload_dynamic_info, payload_sn, iot_device_id,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from device_payload
|
||||
</sql>
|
||||
|
||||
<select id="selectPayloadByPayloadId" parameterType="Long" resultMap="PayloadResult">
|
||||
<include refid="selectPayloadVo"/>
|
||||
where payload_id = #{payloadId}
|
||||
</select>
|
||||
|
||||
<select id="selectPayloadList" parameterType="com.ruoyi.device.mapper.entity.PayloadEntity" resultMap="PayloadResult">
|
||||
<include refid="selectPayloadVo"/>
|
||||
<where>
|
||||
<if test="payloadName != null and payloadName != ''">
|
||||
and payload_name like concat('%', #{payloadName}, '%')
|
||||
</if>
|
||||
<if test="payloadType != null and payloadType != ''">
|
||||
and payload_type = #{payloadType}
|
||||
</if>
|
||||
<if test="payloadSn != null and payloadSn != ''">
|
||||
and payload_sn = #{payloadSn}
|
||||
</if>
|
||||
<if test="iotDeviceId != null and iotDeviceId != ''">
|
||||
and iot_device_id = #{iotDeviceId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertPayload" parameterType="com.ruoyi.device.mapper.entity.PayloadEntity" useGeneratedKeys="true" keyProperty="payloadId">
|
||||
insert into device_payload
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="payloadName != null and payloadName != ''">payload_name,</if>
|
||||
<if test="payloadType != null and payloadType != ''">payload_type,</if>
|
||||
<if test="payloadDisplayName != null and payloadDisplayName != ''">payload_display_name,</if>
|
||||
<if test="payloadDynamicInfo != null and payloadDynamicInfo != ''">payload_dynamic_info,</if>
|
||||
<if test="payloadSn != null and payloadSn != ''">payload_sn,</if>
|
||||
<if test="iotDeviceId != null and iotDeviceId != ''">iot_device_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="payloadName != null and payloadName != ''">#{payloadName},</if>
|
||||
<if test="payloadType != null and payloadType != ''">#{payloadType},</if>
|
||||
<if test="payloadDisplayName != null and payloadDisplayName != ''">#{payloadDisplayName},</if>
|
||||
<if test="payloadDynamicInfo != null and payloadDynamicInfo != ''">#{payloadDynamicInfo},</if>
|
||||
<if test="payloadSn != null and payloadSn != ''">#{payloadSn},</if>
|
||||
<if test="iotDeviceId != null and iotDeviceId != ''">#{iotDeviceId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
now()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePayload" parameterType="com.ruoyi.device.mapper.entity.PayloadEntity">
|
||||
update device_payload
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="payloadName != null and payloadName != ''">payload_name = #{payloadName},</if>
|
||||
<if test="payloadType != null and payloadType != ''">payload_type = #{payloadType},</if>
|
||||
<if test="payloadDisplayName != null and payloadDisplayName != ''">payload_display_name = #{payloadDisplayName},</if>
|
||||
<if test="payloadDynamicInfo != null">payload_dynamic_info = #{payloadDynamicInfo},</if>
|
||||
<if test="payloadSn != null and payloadSn != ''">payload_sn = #{payloadSn},</if>
|
||||
<if test="iotDeviceId != null and iotDeviceId != ''">iot_device_id = #{iotDeviceId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where payload_id = #{payloadId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePayloadByPayloadId" parameterType="Long">
|
||||
delete from device_payload where payload_id = #{payloadId}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePayloadByPayloadIds" parameterType="Long">
|
||||
delete from device_payload where payload_id in
|
||||
<foreach item="payloadId" collection="array" open="(" separator="," close=")">
|
||||
#{payloadId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue