forked from dyf/fys-Multi-tenant
设备类型ID
This commit is contained in:
@ -21,6 +21,12 @@ public class DeviceType extends TenantEntity {
|
|||||||
@Schema(title = "ID", hidden = true)
|
@Schema(title = "ID", hidden = true)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备类型ID
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long deviceTypeId;
|
||||||
|
|
||||||
@Schema(title = "客户号")
|
@Schema(title = "客户号")
|
||||||
private Long customerId;
|
private Long customerId;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<resultMap id="BaseResultMap" type="com.fuyuanshen.equipment.domain.DeviceType">
|
<resultMap id="BaseResultMap" type="com.fuyuanshen.equipment.domain.DeviceType">
|
||||||
<id column="grant_id" property="id"/>
|
<id column="grant_id" property="id"/>
|
||||||
<result column="type_name" property="typeName"/>
|
<result column="type_name" property="typeName"/>
|
||||||
|
<result column="device_type_id" property="deviceTypeId"/>
|
||||||
<result column="is_support_ble" property="isSupportBle"/>
|
<result column="is_support_ble" property="isSupportBle"/>
|
||||||
<result column="locate_mode" property="locateMode"/>
|
<result column="locate_mode" property="locateMode"/>
|
||||||
<result column="network_way" property="networkWay"/>
|
<result column="network_way" property="networkWay"/>
|
||||||
@ -21,7 +22,7 @@
|
|||||||
|
|
||||||
<!-- 查询所有设备类型 -->
|
<!-- 查询所有设备类型 -->
|
||||||
<select id="findAll" resultMap="BaseResultMap">
|
<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
|
FROM device_type dt
|
||||||
JOIN device_type_grants dg ON dt.id = dg.device_type_id
|
JOIN device_type_grants dg ON dt.id = dg.device_type_id
|
||||||
<where>
|
<where>
|
||||||
@ -44,7 +45,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 根据名称查询设备类型 -->
|
<!-- 根据名称查询设备类型 -->
|
||||||
<select id="queryByName" resultMap="BaseResultMap"
|
<select id="queryByName" resultMap="BaseResultMap"
|
||||||
parameterType="com.fuyuanshen.equipment.domain.query.DeviceTypeQueryCriteria">
|
parameterType="com.fuyuanshen.equipment.domain.query.DeviceTypeQueryCriteria">
|
||||||
SELECT dt.*, dg.id AS grant_id
|
SELECT dt.*, dg.id AS grant_id
|
||||||
FROM device_type dt
|
FROM device_type dt
|
||||||
|
Reference in New Issue
Block a user