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 bf119d7f
authored
Apr 09, 2021
by
wnb0128
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车家智能数据服务 用户新增来源、场景添加deviceId--think.wang
1 parent
3ffab9d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
src/main/java/com/glsx/smart/dao/entity/SmartSceneData.java
src/main/java/com/glsx/smart/dao/entity/SmartUserRelation.java
src/main/resources/mapper/SmartSceneDataMapper.xml
src/main/resources/mapper/SmartUserRelationMapper.xml
src/main/java/com/glsx/smart/dao/entity/SmartSceneData.java
View file @
bf119d7
...
@@ -9,11 +9,12 @@ package com.glsx.smart.dao.entity;
...
@@ -9,11 +9,12 @@ package com.glsx.smart.dao.entity;
*/
*/
import
lombok.Data
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
/**
* 车家智能用户场景数据表
* 车家智能用户场景数据表
...
@@ -49,6 +50,11 @@ public class SmartSceneData {
...
@@ -49,6 +50,11 @@ public class SmartSceneData {
private
String
paramKey
;
private
String
paramKey
;
/**
/**
* 设备id,取自param_value中select
*/
private
String
deviceId
;
/**
* 参数值 数组对象
* 参数值 数组对象
*/
*/
private
String
paramValue
;
private
String
paramValue
;
...
...
src/main/java/com/glsx/smart/dao/entity/SmartUserRelation.java
View file @
bf119d7
...
@@ -57,6 +57,11 @@ public class SmartUserRelation implements Serializable {
...
@@ -57,6 +57,11 @@ public class SmartUserRelation implements Serializable {
private
Byte
channel
;
private
Byte
channel
;
/**
/**
* 用户来源 ANDROID iOS
*/
private
String
source
;
/**
* 第三方平台用户id
* 第三方平台用户id
*/
*/
private
String
thirdId
;
private
String
thirdId
;
...
...
src/main/resources/mapper/SmartSceneDataMapper.xml
View file @
bf119d7
...
@@ -11,10 +11,11 @@
...
@@ -11,10 +11,11 @@
<result
column=
"sort"
jdbcType=
"TINYINT"
property=
"sort"
/>
<result
column=
"sort"
jdbcType=
"TINYINT"
property=
"sort"
/>
<result
column=
"param_key"
jdbcType=
"VARCHAR"
property=
"paramKey"
/>
<result
column=
"param_key"
jdbcType=
"VARCHAR"
property=
"paramKey"
/>
<result
column=
"param_value"
jdbcType=
"VARCHAR"
property=
"paramValue"
/>
<result
column=
"param_value"
jdbcType=
"VARCHAR"
property=
"paramValue"
/>
<result
column=
"device_id"
jdbcType=
"VARCHAR"
property=
"deviceId"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
id, scene_id, `type`, sort, param_key, param_value
id, scene_id, `type`, sort, param_key,
device_id,
param_value
</sql>
</sql>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
...
@@ -101,12 +102,12 @@
...
@@ -101,12 +102,12 @@
useGeneratedKeys=
"true"
>
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
insert into smart_scene_data
insert into smart_scene_data
(scene_id, `type`, sort, param_key, param_value)
(scene_id, `type`, sort, param_key,
device_id,
param_value)
values
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.sceneId,jdbcType=BIGINT}, #{item.type,jdbcType=TINYINT},
(#{item.sceneId,jdbcType=BIGINT}, #{item.type,jdbcType=TINYINT},
#{item.sort,jdbcType=TINYINT},
#{item.sort,jdbcType=TINYINT},
#{item.paramKey,jdbcType=VARCHAR},
#{item.
paramKey
,jdbcType=VARCHAR}, #{item.paramValue,jdbcType=VARCHAR})
#{item.
deviceId
,jdbcType=VARCHAR}, #{item.paramValue,jdbcType=VARCHAR})
</foreach>
</foreach>
</insert>
</insert>
<delete
id=
"deleteBySceneId"
parameterType=
"java.lang.Long"
>
<delete
id=
"deleteBySceneId"
parameterType=
"java.lang.Long"
>
...
...
src/main/resources/mapper/SmartUserRelationMapper.xml
View file @
bf119d7
...
@@ -12,13 +12,14 @@
...
@@ -12,13 +12,14 @@
<result
column=
"password"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"password"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"channel"
jdbcType=
"TINYINT"
property=
"channel"
/>
<result
column=
"channel"
jdbcType=
"TINYINT"
property=
"channel"
/>
<result
column=
"third_id"
jdbcType=
"VARCHAR"
property=
"thirdId"
/>
<result
column=
"third_id"
jdbcType=
"VARCHAR"
property=
"thirdId"
/>
<result
column=
"source"
jdbcType=
"VARCHAR"
property=
"source"
/>
<result
column=
"status"
jdbcType=
"TINYINT"
property=
"status"
/>
<result
column=
"status"
jdbcType=
"TINYINT"
property=
"status"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
id, `name`, user_id, phone, `password`, channel, third_id, `status`, remark, create_time
id, `name`, user_id, phone, `password`, channel, third_id, `s
ource`, `s
tatus`, remark, create_time
</sql>
</sql>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
...
...
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