Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f85b7e7b
authored
Apr 28, 2021
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加设备类型支持
1 parent
c8082499
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
src/main/java/com/glsx/smart/dao/entity/SmartUserDevice.java
src/main/resources/mapper/SmartUserDeviceMapper.xml
src/main/java/com/glsx/smart/dao/entity/SmartUserDevice.java
View file @
f85b7e7
...
@@ -54,6 +54,12 @@ public class SmartUserDevice {
...
@@ -54,6 +54,12 @@ public class SmartUserDevice {
private
String
deviceName
;
private
String
deviceName
;
/**
/**
* 类型:1实体设备 2虚拟红外设备
*/
@Column
(
name
=
"type"
)
private
Byte
type
;
/**
* 第三方平台标识 1涂鸦 2绿米
* 第三方平台标识 1涂鸦 2绿米
*/
*/
@Column
(
name
=
"channel"
)
@Column
(
name
=
"channel"
)
...
...
src/main/resources/mapper/SmartUserDeviceMapper.xml
View file @
f85b7e7
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"device_id"
jdbcType=
"VARCHAR"
property=
"deviceId"
/>
<result
column=
"device_id"
jdbcType=
"VARCHAR"
property=
"deviceId"
/>
<result
column=
"device_name"
jdbcType=
"VARCHAR"
property=
"deviceName"
/>
<result
column=
"device_name"
jdbcType=
"VARCHAR"
property=
"deviceName"
/>
<result
column=
"type"
jdbcType=
"TINYINT"
property=
"type"
/>
<result
column=
"channel"
jdbcType=
"TINYINT"
property=
"channel"
/>
<result
column=
"channel"
jdbcType=
"TINYINT"
property=
"channel"
/>
<result
column=
"parent_id"
jdbcType=
"VARCHAR"
property=
"parentId"
/>
<result
column=
"parent_id"
jdbcType=
"VARCHAR"
property=
"parentId"
/>
<result
column=
"platform_product_id"
jdbcType=
"VARCHAR"
property=
"platformProductId"
/>
<result
column=
"platform_product_id"
jdbcType=
"VARCHAR"
property=
"platformProductId"
/>
...
@@ -17,23 +18,26 @@
...
@@ -17,23 +18,26 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated generated on Fri Apr 23 15:24:29 CST 2021.-->
<!--@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
,
id, user_id, device_id, device_name,
type, channel, parent_id, platform_product_id
,
update_time
create_time,
update_time
</sql>
</sql>
<select
id=
"getList"
resultMap=
"BaseResultMap"
>
<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
create_time, update_time
from smart_user_device
from smart_user_device
<where>
<where>
<if
test=
"userId != null"
>
<if
test=
"userId != null"
>
and user_id = #{userId,jdbcType=BIGINT}
and user_id = #{userId,jdbcType=BIGINT}
</if>
</if>
<if
test=
"type != null"
>
and type = #{type,jdbcType=TINYINT}
</if>
</where>
</where>
</select>
</select>
<select
id=
"getByDeviceId"
resultMap=
"BaseResultMap"
>
<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,
ud.platform_product_id, ud.create_time, ud.update_time,
sf.url icon
sf.url icon
from smart_user_device ud
from smart_user_device ud
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment