Merge branch 'main' of http://th.local.t-aaron.com:13000/THENG/a-tuoheng-device
This commit is contained in:
commit
cec824f8a5
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.ruoyi.device.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.device.api.domain.AirTypeGeneralEnumVO;
|
||||||
|
import com.ruoyi.device.api.domain.DockVO;
|
||||||
|
import com.ruoyi.device.controller.convert.AirTypeGeneralEnumVOConvert;
|
||||||
|
import com.ruoyi.device.controller.convert.DockVOConvert;
|
||||||
|
import com.ruoyi.device.service.api.IAirTypeGeneralEnumService;
|
||||||
|
import com.ruoyi.device.service.dto.AirTypeGeneralEnumDTO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/air-type-general-enum")
|
||||||
|
public class AirTypeGeneralEnumController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IAirTypeGeneralEnumService airTypeGeneralEnumService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询无人机类型通用枚举列表
|
||||||
|
*
|
||||||
|
* @param vo 无人机类型通用枚举VO
|
||||||
|
* @return 无人机类型通用枚举列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<List<AirTypeGeneralEnumVO>> selectAirTypeGeneralEnumList(AirTypeGeneralEnumVO vo)
|
||||||
|
{
|
||||||
|
AirTypeGeneralEnumDTO dto = AirTypeGeneralEnumVOConvert.to(vo);
|
||||||
|
List<AirTypeGeneralEnumDTO> list = airTypeGeneralEnumService.selectAirTypeGeneralEnumList(dto);
|
||||||
|
List<AirTypeGeneralEnumVO> voList = AirTypeGeneralEnumVOConvert.fromList(list);
|
||||||
|
return R.ok(voList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.ruoyi.device.controller.convert;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.utils.BaseConvert;
|
||||||
|
import com.ruoyi.device.api.domain.AirTypeGeneralEnumVO;
|
||||||
|
import com.ruoyi.device.service.dto.AirTypeGeneralEnumDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AirTypeGeneralEnumVOConvert extends BaseConvert<AirTypeGeneralEnumDTO, AirTypeGeneralEnumVO>
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final AirTypeGeneralEnumVOConvert INSTANCE = new AirTypeGeneralEnumVOConvert();
|
||||||
|
|
||||||
|
private AirTypeGeneralEnumVOConvert() {
|
||||||
|
super(AirTypeGeneralEnumDTO.class, AirTypeGeneralEnumVO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AirTypeGeneralEnumVO from(AirTypeGeneralEnumDTO dto)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerFrom(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AirTypeGeneralEnumDTO to(AirTypeGeneralEnumVO vo)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerTo(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<AirTypeGeneralEnumVO> fromList(List<AirTypeGeneralEnumDTO> dtoList)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerFromList(dtoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<AirTypeGeneralEnumDTO> toList(List<AirTypeGeneralEnumVO> voList)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerToList(voList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.device.domain.api;
|
||||||
|
|
||||||
|
import com.ruoyi.device.domain.model.AirTypeGeneralEnum;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举Domain接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
public interface IAirTypeGeneralEnumDomain
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询无人机类型通用枚举列表
|
||||||
|
*
|
||||||
|
* @param airTypeGeneralEnum 无人机类型通用枚举
|
||||||
|
* @return 无人机类型通用枚举集合
|
||||||
|
*/
|
||||||
|
List<AirTypeGeneralEnum> selectAirTypeGeneralEnumList(AirTypeGeneralEnum airTypeGeneralEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主键查询无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 无人机类型通用枚举
|
||||||
|
*/
|
||||||
|
AirTypeGeneralEnum selectAirTypeGeneralEnumById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param airTypeGeneralEnum 无人机类型通用枚举
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertAirTypeGeneralEnum(AirTypeGeneralEnum airTypeGeneralEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param airTypeGeneralEnum 无人机类型通用枚举
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateAirTypeGeneralEnum(AirTypeGeneralEnum airTypeGeneralEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteAirTypeGeneralEnumById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteAirTypeGeneralEnumByIds(Long[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.ruoyi.device.domain.convert;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.utils.BaseConvert;
|
||||||
|
import com.ruoyi.device.domain.model.AirTypeGeneralEnum;
|
||||||
|
import com.ruoyi.device.mapper.entity.AirTypeGeneralEnumEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举领域层转换器
|
||||||
|
* Domain Model ↔ Mapper Entity
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
public class AirTypeGeneralEnumConvert extends BaseConvert<AirTypeGeneralEnum, AirTypeGeneralEnumEntity>
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final AirTypeGeneralEnumConvert INSTANCE = new AirTypeGeneralEnumConvert();
|
||||||
|
|
||||||
|
private AirTypeGeneralEnumConvert() {
|
||||||
|
super(AirTypeGeneralEnum.class, AirTypeGeneralEnumEntity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model 转 Entity
|
||||||
|
*/
|
||||||
|
public static AirTypeGeneralEnumEntity from(AirTypeGeneralEnum model)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerFrom(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Entity 转 Model
|
||||||
|
*/
|
||||||
|
public static AirTypeGeneralEnum to(AirTypeGeneralEnumEntity entity)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerTo(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model List 转 Entity List
|
||||||
|
*/
|
||||||
|
public static List<AirTypeGeneralEnumEntity> fromList(List<AirTypeGeneralEnum> modelList)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerFromList(modelList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Entity List 转 Model List
|
||||||
|
*/
|
||||||
|
public static List<AirTypeGeneralEnum> toList(List<AirTypeGeneralEnumEntity> entityList)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerToList(entityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.ruoyi.device.domain.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.device.domain.api.IAirTypeGeneralEnumDomain;
|
||||||
|
import com.ruoyi.device.domain.convert.AirTypeGeneralEnumConvert;
|
||||||
|
import com.ruoyi.device.domain.model.AirTypeGeneralEnum;
|
||||||
|
import com.ruoyi.device.mapper.AirTypeGeneralEnumMapper;
|
||||||
|
import com.ruoyi.device.mapper.entity.AirTypeGeneralEnumEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举Domain实现类
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class AirTypeGeneralEnumDomainImpl implements IAirTypeGeneralEnumDomain
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private AirTypeGeneralEnumMapper airTypeGeneralEnumMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AirTypeGeneralEnum> selectAirTypeGeneralEnumList(AirTypeGeneralEnum airTypeGeneralEnum)
|
||||||
|
{
|
||||||
|
AirTypeGeneralEnumEntity entity = AirTypeGeneralEnumConvert.from(airTypeGeneralEnum);
|
||||||
|
List<AirTypeGeneralEnumEntity> entityList = airTypeGeneralEnumMapper.selectAirTypeGeneralEnumList(entity);
|
||||||
|
return AirTypeGeneralEnumConvert.toList(entityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AirTypeGeneralEnum selectAirTypeGeneralEnumById(Long id)
|
||||||
|
{
|
||||||
|
AirTypeGeneralEnumEntity entity = airTypeGeneralEnumMapper.selectAirTypeGeneralEnumById(id);
|
||||||
|
return AirTypeGeneralEnumConvert.to(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertAirTypeGeneralEnum(AirTypeGeneralEnum airTypeGeneralEnum)
|
||||||
|
{
|
||||||
|
AirTypeGeneralEnumEntity entity = AirTypeGeneralEnumConvert.from(airTypeGeneralEnum);
|
||||||
|
return airTypeGeneralEnumMapper.insertAirTypeGeneralEnum(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateAirTypeGeneralEnum(AirTypeGeneralEnum airTypeGeneralEnum)
|
||||||
|
{
|
||||||
|
AirTypeGeneralEnumEntity entity = AirTypeGeneralEnumConvert.from(airTypeGeneralEnum);
|
||||||
|
return airTypeGeneralEnumMapper.updateAirTypeGeneralEnum(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteAirTypeGeneralEnumById(Long id)
|
||||||
|
{
|
||||||
|
return airTypeGeneralEnumMapper.deleteAirTypeGeneralEnumById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteAirTypeGeneralEnumByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return airTypeGeneralEnumMapper.deleteAirTypeGeneralEnumByIds(ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,165 @@
|
||||||
|
package com.ruoyi.device.domain.model;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举领域模型
|
||||||
|
* Domain 层对外暴露的对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class AirTypeGeneralEnum extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 领域 */
|
||||||
|
private String domain;
|
||||||
|
|
||||||
|
/** 主类型 */
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 子类型 */
|
||||||
|
private String sub_type;
|
||||||
|
|
||||||
|
/** 图标 */
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
/** 创建者 */
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 更新者 */
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDomain()
|
||||||
|
{
|
||||||
|
return domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDomain(String domain)
|
||||||
|
{
|
||||||
|
this.domain = domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType()
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSub_type()
|
||||||
|
{
|
||||||
|
return sub_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSub_type(String sub_type)
|
||||||
|
{
|
||||||
|
this.sub_type = sub_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon()
|
||||||
|
{
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcon(String icon)
|
||||||
|
{
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateBy()
|
||||||
|
{
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(String createBy)
|
||||||
|
{
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime()
|
||||||
|
{
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime)
|
||||||
|
{
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateBy()
|
||||||
|
{
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateBy(String updateBy)
|
||||||
|
{
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime()
|
||||||
|
{
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime)
|
||||||
|
{
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark()
|
||||||
|
{
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark)
|
||||||
|
{
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.device.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.device.mapper.entity.AirTypeGeneralEnumEntity;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举表Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
public interface AirTypeGeneralEnumMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询无人机类型通用枚举列表
|
||||||
|
*
|
||||||
|
* @param airTypeGeneralEnum 无人机类型通用枚举信息
|
||||||
|
* @return 无人机类型通用枚举集合
|
||||||
|
*/
|
||||||
|
List<AirTypeGeneralEnumEntity> selectAirTypeGeneralEnumList(AirTypeGeneralEnumEntity airTypeGeneralEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主键查询无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 无人机类型通用枚举信息
|
||||||
|
*/
|
||||||
|
AirTypeGeneralEnumEntity selectAirTypeGeneralEnumById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param airTypeGeneralEnum 无人机类型通用枚举信息
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int insertAirTypeGeneralEnum(AirTypeGeneralEnumEntity airTypeGeneralEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param airTypeGeneralEnum 无人机类型通用枚举信息
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int updateAirTypeGeneralEnum(AirTypeGeneralEnumEntity airTypeGeneralEnum);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int deleteAirTypeGeneralEnumById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的主键集合
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int deleteAirTypeGeneralEnumByIds(Long[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.ruoyi.device.mapper.entity;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机表实体对象 device_aircraft
|
||||||
|
* Mapper 层实体,对应数据库表
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-16
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class AirTypeGeneralEnumEntity extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领域
|
||||||
|
*/
|
||||||
|
private String domain;
|
||||||
|
/**
|
||||||
|
* 主类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
/**
|
||||||
|
* 子类型
|
||||||
|
*/
|
||||||
|
private String sub_type;
|
||||||
|
/**
|
||||||
|
* 图标
|
||||||
|
*/
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "AircraftEntity{" +
|
||||||
|
"aircraftId=" + id +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", domain='" + domain + '\'' +
|
||||||
|
", type='" + type + '\'' +
|
||||||
|
", icon='" + icon + '\'' +
|
||||||
|
", sub_type=" + sub_type +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.device.service.api;
|
||||||
|
|
||||||
|
import com.ruoyi.device.service.dto.AirTypeGeneralEnumDTO;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
public interface IAirTypeGeneralEnumService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询无人机类型通用枚举列表
|
||||||
|
*
|
||||||
|
* @param airTypeGeneralEnumDTO 无人机类型通用枚举
|
||||||
|
* @return 无人机类型通用枚举集合
|
||||||
|
*/
|
||||||
|
List<AirTypeGeneralEnumDTO> selectAirTypeGeneralEnumList(AirTypeGeneralEnumDTO airTypeGeneralEnumDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主键查询无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 无人机类型通用枚举
|
||||||
|
*/
|
||||||
|
AirTypeGeneralEnumDTO selectAirTypeGeneralEnumById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param airTypeGeneralEnumDTO 无人机类型通用枚举
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertAirTypeGeneralEnum(AirTypeGeneralEnumDTO airTypeGeneralEnumDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param airTypeGeneralEnumDTO 无人机类型通用枚举
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateAirTypeGeneralEnum(AirTypeGeneralEnumDTO airTypeGeneralEnumDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteAirTypeGeneralEnumById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除无人机类型通用枚举
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteAirTypeGeneralEnumByIds(Long[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.ruoyi.device.service.convert;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.utils.BaseConvert;
|
||||||
|
import com.ruoyi.device.domain.model.AirTypeGeneralEnum;
|
||||||
|
import com.ruoyi.device.service.dto.AirTypeGeneralEnumDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举Service层转换器
|
||||||
|
* Service DTO ↔ Domain Model
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
public class AirTypeGeneralEnumDTOConvert extends BaseConvert<AirTypeGeneralEnum, AirTypeGeneralEnumDTO>
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final AirTypeGeneralEnumDTOConvert INSTANCE = new AirTypeGeneralEnumDTOConvert();
|
||||||
|
|
||||||
|
private AirTypeGeneralEnumDTOConvert() {
|
||||||
|
super(AirTypeGeneralEnum.class, AirTypeGeneralEnumDTO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model 转 DTO
|
||||||
|
*/
|
||||||
|
public static AirTypeGeneralEnumDTO from(AirTypeGeneralEnum model)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerFrom(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DTO 转 Model
|
||||||
|
*/
|
||||||
|
public static AirTypeGeneralEnum to(AirTypeGeneralEnumDTO dto)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerTo(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model List 转 DTO List
|
||||||
|
*/
|
||||||
|
public static List<AirTypeGeneralEnumDTO> fromList(List<AirTypeGeneralEnum> modelList)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerFromList(modelList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DTO List 转 Model List
|
||||||
|
*/
|
||||||
|
public static List<AirTypeGeneralEnum> toList(List<AirTypeGeneralEnumDTO> dtoList)
|
||||||
|
{
|
||||||
|
return INSTANCE.innerToList(dtoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.ruoyi.device.service.dto;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举服务层DTO
|
||||||
|
* Service 层对外暴露的对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class AirTypeGeneralEnumDTO extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 领域 */
|
||||||
|
private String domain;
|
||||||
|
|
||||||
|
/** 主类型 */
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 子类型 */
|
||||||
|
private String sub_type;
|
||||||
|
|
||||||
|
/** 图标 */
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.ruoyi.device.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.device.domain.api.IAirTypeGeneralEnumDomain;
|
||||||
|
import com.ruoyi.device.domain.model.AirTypeGeneralEnum;
|
||||||
|
import com.ruoyi.device.service.api.IAirTypeGeneralEnumService;
|
||||||
|
import com.ruoyi.device.service.convert.AirTypeGeneralEnumDTOConvert;
|
||||||
|
import com.ruoyi.device.service.dto.AirTypeGeneralEnumDTO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无人机类型通用枚举Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-28
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AirTypeGeneralEnumServiceImpl implements IAirTypeGeneralEnumService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IAirTypeGeneralEnumDomain airTypeGeneralEnumDomain;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AirTypeGeneralEnumDTO> selectAirTypeGeneralEnumList(AirTypeGeneralEnumDTO airTypeGeneralEnumDTO)
|
||||||
|
{
|
||||||
|
AirTypeGeneralEnum model = AirTypeGeneralEnumDTOConvert.to(airTypeGeneralEnumDTO);
|
||||||
|
List<AirTypeGeneralEnum> modelList = airTypeGeneralEnumDomain.selectAirTypeGeneralEnumList(model);
|
||||||
|
return AirTypeGeneralEnumDTOConvert.fromList(modelList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AirTypeGeneralEnumDTO selectAirTypeGeneralEnumById(Long id)
|
||||||
|
{
|
||||||
|
AirTypeGeneralEnum model = airTypeGeneralEnumDomain.selectAirTypeGeneralEnumById(id);
|
||||||
|
return AirTypeGeneralEnumDTOConvert.from(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertAirTypeGeneralEnum(AirTypeGeneralEnumDTO airTypeGeneralEnumDTO)
|
||||||
|
{
|
||||||
|
AirTypeGeneralEnum model = AirTypeGeneralEnumDTOConvert.to(airTypeGeneralEnumDTO);
|
||||||
|
return airTypeGeneralEnumDomain.insertAirTypeGeneralEnum(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateAirTypeGeneralEnum(AirTypeGeneralEnumDTO airTypeGeneralEnumDTO)
|
||||||
|
{
|
||||||
|
AirTypeGeneralEnum model = AirTypeGeneralEnumDTOConvert.to(airTypeGeneralEnumDTO);
|
||||||
|
return airTypeGeneralEnumDomain.updateAirTypeGeneralEnum(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteAirTypeGeneralEnumById(Long id)
|
||||||
|
{
|
||||||
|
return airTypeGeneralEnumDomain.deleteAirTypeGeneralEnumById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteAirTypeGeneralEnumByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return airTypeGeneralEnumDomain.deleteAirTypeGeneralEnumByIds(ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -18,10 +18,10 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: ruoyi-nacos:8848
|
server-addr: 127.0.0.1:8848
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: ruoyi-nacos:8848
|
server-addr: 127.0.0.1:8848
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
CREATE TABLE IF NOT EXISTS `air_type_general_enum` (
|
||||||
|
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`name` VARCHAR(255) DEFAULT NULL COMMENT '名称',
|
||||||
|
`domain` VARCHAR(255) DEFAULT NULL COMMENT '领域',
|
||||||
|
`type` VARCHAR(255) DEFAULT NULL COMMENT '主类型',
|
||||||
|
`sub_type` VARCHAR(255) DEFAULT NULL COMMENT '子类型',
|
||||||
|
`icon` VARCHAR(255) DEFAULT NULL COMMENT '图标',
|
||||||
|
`create_by` VARCHAR(64) DEFAULT '' COMMENT '创建者',
|
||||||
|
`create_time` DATETIME DEFAULT NULL COMMENT '创建时间',
|
||||||
|
`update_by` VARCHAR(64) DEFAULT '' COMMENT '更新者',
|
||||||
|
`update_time` DATETIME DEFAULT NULL COMMENT '更新时间',
|
||||||
|
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='无人机类型通用枚举表';
|
||||||
|
|
||||||
|
|
||||||
|
-- Matrice 系列
|
||||||
|
INSERT INTO air_type_general_enum (name, domain, type, sub_type, remark) VALUES
|
||||||
|
('Matrice 400', '0', '103', '0', '-'),
|
||||||
|
('Matrice 350 RTK', '0', '89', '0', '-'),
|
||||||
|
('Matrice 300 RTK', '0', '60', '0', '-'),
|
||||||
|
('Matrice 30', '0', '67', '0', '-'),
|
||||||
|
('Matrice 30T', '0', '67', '1', '-'),
|
||||||
|
('Matrice 3D', '0', '91', '0', '-'),
|
||||||
|
('Matrice 3TD', '0', '91', '1', '-'),
|
||||||
|
('Matrice 4D', '0', '100', '0', '-'),
|
||||||
|
('Matrice 4TD', '0', '100', '1', '-');
|
||||||
|
|
||||||
|
-- Mavic 3 行业系列
|
||||||
|
INSERT INTO air_type_general_enum (name, domain, type, sub_type, remark) VALUES
|
||||||
|
('Mavic 3 行业系列 (M3E 相机)', '0', '77', '0', '-'),
|
||||||
|
('Mavic 3 行业系列 (M3T 相机)', '0', '77', '1', '-'),
|
||||||
|
('Mavic 3 行业系列 (M3TA 相机)', '0', '77', '3', '-');
|
||||||
|
|
||||||
|
-- DJI Matrice 4 系列
|
||||||
|
INSERT INTO air_type_general_enum (name, domain, type, sub_type, remark) VALUES
|
||||||
|
('DJI Matrice 4 系列 (M4E 相机)', '0', '99', '0', '-'),
|
||||||
|
('DJI Matrice 4 系列 (M4T 相机)', '0', '99', '1', '-');
|
||||||
|
|
||||||
|
-- 遥控器系列
|
||||||
|
INSERT INTO air_type_general_enum (name, domain, type, sub_type, remark) VALUES
|
||||||
|
('DJI 带屏遥控器行业版', '2', '56', '0', '搭配 Matrice 300 RTK'),
|
||||||
|
('DJI RC Plus', '2', '119', '0', '搭配 Matrice 350 RTK,Matrice 300 RTK,Matrice 30/30T'),
|
||||||
|
('DJI RC Plus 2', '2', '174', '0', '搭配 >DJI Matrice 4 系列'),
|
||||||
|
('DJI RC Pro 行业版', '2', '144', '0', '搭配 Mavic 3 行业系列');
|
||||||
|
|
||||||
|
-- 大疆机场系列
|
||||||
|
INSERT INTO air_type_general_enum (name, domain, type, sub_type, remark) VALUES
|
||||||
|
('大疆机场', '3', '1', '0', '-'),
|
||||||
|
('大疆机场 2', '3', '2', '0', '-'),
|
||||||
|
('大疆机场 3', '3', '3', '0', '-');
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
<?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.AirTypeGeneralEnumMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.device.mapper.entity.AirTypeGeneralEnumEntity" id="AirTypeGeneralEnumResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="domain" column="domain" />
|
||||||
|
<result property="type" column="type" />
|
||||||
|
<result property="sub_type" column="sub_type" />
|
||||||
|
<result property="icon" column="icon" />
|
||||||
|
<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="selectAirTypeGeneralEnumVo">
|
||||||
|
select id, name, domain, type, sub_type, icon,
|
||||||
|
create_by, create_time, update_by, update_time, remark
|
||||||
|
from air_type_general_enum
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectAirTypeGeneralEnumById" parameterType="Long" resultMap="AirTypeGeneralEnumResult">
|
||||||
|
<include refid="selectAirTypeGeneralEnumVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAirTypeGeneralEnumList" parameterType="com.ruoyi.device.mapper.entity.AirTypeGeneralEnumEntity" resultMap="AirTypeGeneralEnumResult">
|
||||||
|
<include refid="selectAirTypeGeneralEnumVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and name like concat('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="domain != null and domain != ''">
|
||||||
|
and domain = #{domain}
|
||||||
|
</if>
|
||||||
|
<if test="type != null and type != ''">
|
||||||
|
and type = #{type}
|
||||||
|
</if>
|
||||||
|
<if test="sub_type != null and sub_type != ''">
|
||||||
|
and sub_type = #{sub_type}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertAirTypeGeneralEnum" parameterType="com.ruoyi.device.mapper.entity.AirTypeGeneralEnumEntity" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||||
|
insert into air_type_general_enum
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="domain != null and domain != ''">domain,</if>
|
||||||
|
<if test="type != null and type != ''">type,</if>
|
||||||
|
<if test="sub_type != null and sub_type != ''">sub_type,</if>
|
||||||
|
<if test="icon != null and icon != ''">icon,</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="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="domain != null and domain != ''">#{domain},</if>
|
||||||
|
<if test="type != null and type != ''">#{type},</if>
|
||||||
|
<if test="sub_type != null and sub_type != ''">#{sub_type},</if>
|
||||||
|
<if test="icon != null and icon != ''">#{icon},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
now()
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateAirTypeGeneralEnum" parameterType="com.ruoyi.device.mapper.entity.AirTypeGeneralEnumEntity">
|
||||||
|
update air_type_general_enum
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="domain != null and domain != ''">domain = #{domain},</if>
|
||||||
|
<if test="type != null and type != ''">type = #{type},</if>
|
||||||
|
<if test="sub_type != null and sub_type != ''">sub_type = #{sub_type},</if>
|
||||||
|
<if test="icon != null and icon != ''">icon = #{icon},</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="deleteAirTypeGeneralEnumById" parameterType="Long">
|
||||||
|
delete from air_type_general_enum where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteAirTypeGeneralEnumByIds" parameterType="Long">
|
||||||
|
delete from air_type_general_enum where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue