1
0

设备类型ID

This commit is contained in:
2025-08-27 10:20:37 +08:00
parent 8b25fd9ba4
commit 837953bf3d
2 changed files with 9 additions and 2 deletions

View File

@ -21,6 +21,12 @@ public class DeviceType extends TenantEntity {
@Schema(title = "ID", hidden = true)
private Long id;
/**
* 设备类型ID
*/
@TableField(exist = false)
private Long deviceTypeId;
@Schema(title = "客户号")
private Long customerId;

View File

@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.fuyuanshen.equipment.domain.DeviceType">
<id column="grant_id" property="id"/>
<result column="type_name" property="typeName"/>
<result column="device_type_id" property="deviceTypeId"/>
<result column="is_support_ble" property="isSupportBle"/>
<result column="locate_mode" property="locateMode"/>
<result column="network_way" property="networkWay"/>
@ -21,7 +22,7 @@
<!-- 查询所有设备类型 -->
<select id="findAll" resultMap="BaseResultMap">
SELECT DISTINCT dt.* ,dg.id AS grant_id ,dg.create_time AS Dcreate_time
SELECT DISTINCT dt.* ,dg.id AS grant_id ,dg.create_time AS Dcreate_time,dt.id AS device_type_id
FROM device_type dt
JOIN device_type_grants dg ON dt.id = dg.device_type_id
<where>
@ -44,7 +45,7 @@
</select>
<!-- 根据名称查询设备类型 -->
<select id="queryByName" resultMap="BaseResultMap"
<select id="queryByName" resultMap="BaseResultMap"
parameterType="com.fuyuanshen.equipment.domain.query.DeviceTypeQueryCriteria">
SELECT dt.*, dg.id AS grant_id
FROM device_type dt