Commit f85b7e7b by tyfanchz

增加设备类型支持

1 parent c8082499
......@@ -54,6 +54,12 @@ public class SmartUserDevice {
private String deviceName;
/**
* 类型:1实体设备 2虚拟红外设备
*/
@Column(name = "type")
private Byte type;
/**
* 第三方平台标识 1涂鸦 2绿米
*/
@Column(name = "channel")
......
......@@ -9,6 +9,7 @@
<result column="user_id" jdbcType="BIGINT" property="userId"/>
<result column="device_id" jdbcType="VARCHAR" property="deviceId"/>
<result column="device_name" jdbcType="VARCHAR" property="deviceName"/>
<result column="type" jdbcType="TINYINT" property="type"/>
<result column="channel" jdbcType="TINYINT" property="channel"/>
<result column="parent_id" jdbcType="VARCHAR" property="parentId"/>
<result column="platform_product_id" jdbcType="VARCHAR" property="platformProductId"/>
......@@ -17,23 +18,26 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated generated on Fri Apr 23 15:24:29 CST 2021.-->
id, user_id, device_id, device_name, channel, parent_id, platform_product_id, create_time,
update_time
id, user_id, device_id, device_name, type, channel, parent_id, platform_product_id,
create_time, update_time
</sql>
<select id="getList" resultMap="BaseResultMap">
select id, user_id, device_id, device_name, channel, parent_id, platform_product_id,
select id, user_id, device_id, device_name, type, channel, parent_id, platform_product_id,
create_time, update_time
from smart_user_device
<where>
<if test="userId != null">
and user_id = #{userId,jdbcType=BIGINT}
</if>
<if test="type != null">
and type = #{type,jdbcType=TINYINT}
</if>
</where>
</select>
<select id="getByDeviceId" resultMap="BaseResultMap">
select ud.id, ud.user_id, ud.device_id, ud.device_name, ud.channel, ud.parent_id,
select ud.id, ud.user_id, ud.device_id, ud.device_name, ud.type, ud.channel, ud.parent_id,
ud.platform_product_id, ud.create_time, ud.update_time,
sf.url icon
from smart_user_device ud
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!