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 3f2a8389
authored
Apr 21, 2021
by
wnb0128
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车家智能数据服务 场景相关添加页面图标字段--think.wang
1 parent
91e889f6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
7 deletions
src/main/java/com/glsx/smart/dao/entity/SmartScene.java
src/main/java/com/glsx/smart/dao/entity/SmartSceneTemplate.java
src/main/resources/mapper/SmartSceneMapper.xml
src/main/resources/mapper/SmartSceneTemplateMapper.xml
src/main/java/com/glsx/smart/dao/entity/SmartScene.java
View file @
3f2a838
...
@@ -63,6 +63,16 @@ public class SmartScene implements Serializable {
...
@@ -63,6 +63,16 @@ public class SmartScene implements Serializable {
private
Long
backPic
;
private
Long
backPic
;
/**
/**
* 列表页面图ID 关联smart_sys_file中id
*/
private
Long
pagePic
;
/**
* 列表页面图
*/
private
String
pagePicUrl
;
/**
* 场景背景图
* 场景背景图
*/
*/
private
String
backPicUrl
;
private
String
backPicUrl
;
...
...
src/main/java/com/glsx/smart/dao/entity/SmartSceneTemplate.java
View file @
3f2a838
...
@@ -59,11 +59,21 @@ public class SmartSceneTemplate extends BaseDTO implements Serializable {
...
@@ -59,11 +59,21 @@ public class SmartSceneTemplate extends BaseDTO implements Serializable {
private
Long
backPic
;
private
Long
backPic
;
/**
/**
* 列表页面图ID 关联smart_sys_file中id
*/
private
Long
pagePic
;
/**
* 场景背景图
* 场景背景图
*/
*/
private
String
backPicUrl
;
private
String
backPicUrl
;
/**
/**
* 列表页面图
*/
private
String
pagePicUrl
;
/**
* 查看次数
* 查看次数
*/
*/
private
Long
viewTimes
;
private
Long
viewTimes
;
...
...
src/main/resources/mapper/SmartSceneMapper.xml
View file @
3f2a838
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<result
column=
"type_key"
jdbcType=
"VARCHAR"
property=
"typeKey"
/>
<result
column=
"type_key"
jdbcType=
"VARCHAR"
property=
"typeKey"
/>
<result
column=
"icon"
jdbcType=
"BIGINT"
property=
"icon"
/>
<result
column=
"icon"
jdbcType=
"BIGINT"
property=
"icon"
/>
<result
column=
"back_pic"
jdbcType=
"BIGINT"
property=
"backPic"
/>
<result
column=
"back_pic"
jdbcType=
"BIGINT"
property=
"backPic"
/>
<result
column=
"page_pic"
jdbcType=
"BIGINT"
property=
"pagePic"
/>
<result
column=
"view_times"
jdbcType=
"BIGINT"
property=
"viewTimes"
/>
<result
column=
"view_times"
jdbcType=
"BIGINT"
property=
"viewTimes"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"condition_rule"
jdbcType=
"TINYINT"
property=
"conditionRule"
/>
<result
column=
"condition_rule"
jdbcType=
"TINYINT"
property=
"conditionRule"
/>
...
@@ -28,10 +29,14 @@
...
@@ -28,10 +29,14 @@
fetchType=
"eager"
fetchType=
"eager"
select=
"com.glsx.smart.dao.mapper.SmartSysFileMapper.selectUrlById"
>
select=
"com.glsx.smart.dao.mapper.SmartSysFileMapper.selectUrlById"
>
</collection>
</collection>
<collection
property=
"pagePicUrl"
column=
"page_pic"
ofType=
"com.glsx.smart.dao.entity.SmartScene"
fetchType=
"eager"
select=
"com.glsx.smart.dao.mapper.SmartSysFileMapper.selectUrlById"
>
</collection>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
id, user_id, scene_name, type_key, icon, back_pic, view_times, description, condition_rule,
id, user_id, scene_name, type_key, icon, back_pic,
page_pic,
view_times, description, condition_rule,
execute_cycle, `status`, remark, create_time, update_time
execute_cycle, `status`, remark, create_time, update_time
</sql>
</sql>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
...
@@ -220,14 +225,14 @@
...
@@ -220,14 +225,14 @@
useGeneratedKeys=
"true"
>
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
insert into smart_scene
insert into smart_scene
(user_id, scene_name, type_key, icon, back_pic, view_times, description, condition_rule,
(user_id, scene_name, type_key, icon, back_pic,
page_pic,
view_times, description, condition_rule,
execute_cycle, `status`, remark, create_time, update_time)
execute_cycle, `status`, remark, create_time, update_time)
values
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.userId,jdbcType=BIGINT}, #{item.sceneName,jdbcType=VARCHAR},
(#{item.userId,jdbcType=BIGINT}, #{item.sceneName,jdbcType=VARCHAR},
#{item.typeKey,jdbcType=VARCHAR},
#{item.typeKey,jdbcType=VARCHAR},
#{item.icon,jdbcType=BIGINT}, #{item.backPic,jdbcType=BIGINT},
#{item.icon,jdbcType=BIGINT}, #{item.backPic,jdbcType=BIGINT},
#{item.viewTimes,jdbcType=BIGINT},
#{item.
pagePic,jdbcType=BIGINT}, #{item.
viewTimes,jdbcType=BIGINT},
#{item.description,jdbcType=VARCHAR}, #{item.conditionRule,jdbcType=TINYINT},
#{item.description,jdbcType=VARCHAR}, #{item.conditionRule,jdbcType=TINYINT},
#{item.executeCycle,jdbcType=TINYINT},
#{item.executeCycle,jdbcType=TINYINT},
#{item.status,jdbcType=TINYINT}, #{item.remark,jdbcType=VARCHAR},
#{item.status,jdbcType=TINYINT}, #{item.remark,jdbcType=VARCHAR},
...
@@ -319,6 +324,9 @@
...
@@ -319,6 +324,9 @@
<if
test=
"backPic != null"
>
<if
test=
"backPic != null"
>
back_pic,
back_pic,
</if>
</if>
<if
test=
"pagePic != null"
>
page_pic,
</if>
<if
test=
"viewTimes != null"
>
<if
test=
"viewTimes != null"
>
view_times,
view_times,
</if>
</if>
...
@@ -364,6 +372,9 @@
...
@@ -364,6 +372,9 @@
<if
test=
"backPic != null"
>
<if
test=
"backPic != null"
>
#{backPic,jdbcType=BIGINT},
#{backPic,jdbcType=BIGINT},
</if>
</if>
<if
test=
"pagePic != null"
>
#{pagePic,jdbcType=BIGINT},
</if>
<if
test=
"viewTimes != null"
>
<if
test=
"viewTimes != null"
>
#{viewTimes,jdbcType=BIGINT},
#{viewTimes,jdbcType=BIGINT},
</if>
</if>
...
@@ -409,6 +420,9 @@
...
@@ -409,6 +420,9 @@
<if
test=
"backPic != null"
>
<if
test=
"backPic != null"
>
back_pic = #{backPic,jdbcType=BIGINT},
back_pic = #{backPic,jdbcType=BIGINT},
</if>
</if>
<if
test=
"pagePic != null"
>
page_pic = #{pagePic,jdbcType=BIGINT},
</if>
<if
test=
"viewTimes != null"
>
<if
test=
"viewTimes != null"
>
view_times = #{viewTimes,jdbcType=BIGINT},
view_times = #{viewTimes,jdbcType=BIGINT},
</if>
</if>
...
...
src/main/resources/mapper/SmartSceneTemplateMapper.xml
View file @
3f2a838
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<result
column=
"type_key"
jdbcType=
"VARCHAR"
property=
"typeKey"
/>
<result
column=
"type_key"
jdbcType=
"VARCHAR"
property=
"typeKey"
/>
<result
column=
"icon"
jdbcType=
"BIGINT"
property=
"icon"
/>
<result
column=
"icon"
jdbcType=
"BIGINT"
property=
"icon"
/>
<result
column=
"back_pic"
jdbcType=
"BIGINT"
property=
"backPic"
/>
<result
column=
"back_pic"
jdbcType=
"BIGINT"
property=
"backPic"
/>
<result
column=
"page_pic"
jdbcType=
"BIGINT"
property=
"pagePic"
/>
<result
column=
"view_times"
jdbcType=
"BIGINT"
property=
"viewTimes"
/>
<result
column=
"view_times"
jdbcType=
"BIGINT"
property=
"viewTimes"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"condition_rule"
jdbcType=
"TINYINT"
property=
"conditionRule"
/>
<result
column=
"condition_rule"
jdbcType=
"TINYINT"
property=
"conditionRule"
/>
...
@@ -28,10 +29,13 @@
...
@@ -28,10 +29,13 @@
<collection
property=
"backPicUrl"
column=
"back_pic"
ofType=
"com.glsx.smart.dao.entity.SmartSceneTemplate"
fetchType=
"eager"
<collection
property=
"backPicUrl"
column=
"back_pic"
ofType=
"com.glsx.smart.dao.entity.SmartSceneTemplate"
fetchType=
"eager"
select=
"com.glsx.smart.dao.mapper.SmartSysFileMapper.selectUrlById"
>
select=
"com.glsx.smart.dao.mapper.SmartSysFileMapper.selectUrlById"
>
</collection>
</collection>
<collection
property=
"pagePicUrl"
column=
"page_pic"
ofType=
"com.glsx.smart.dao.entity.SmartSceneTemplate"
fetchType=
"eager"
select=
"com.glsx.smart.dao.mapper.SmartSysFileMapper.selectUrlById"
>
</collection>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
id, scene_name, type_key, icon, back_pic, view_times, description, condition_rule,
id, scene_name, type_key, icon, back_pic,
page_pic,
view_times, description, condition_rule,
execute_cycle, `status`, remark, create_time, create_by, update_time, update_by
execute_cycle, `status`, remark, create_time, create_by, update_time, update_by
</sql>
</sql>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
...
@@ -232,15 +236,15 @@
...
@@ -232,15 +236,15 @@
useGeneratedKeys=
"true"
>
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
insert into smart_scene_template
insert into smart_scene_template
(scene_name, type_key, icon, back_pic, view_times, description, condition_rule,
(scene_name, type_key, icon, back_pic,
page_pic,
view_times, description, condition_rule,
execute_cycle, `status`, remark, create_time, create_by, update_time, update_by
execute_cycle, `status`, remark, create_time, create_by, update_time, update_by
)
)
values
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.sceneName,jdbcType=VARCHAR}, #{item.typeKey,jdbcType=VARCHAR},
(#{item.sceneName,jdbcType=VARCHAR}, #{item.typeKey,jdbcType=VARCHAR},
#{item.icon,jdbcType=BIGINT},
#{item.icon,jdbcType=BIGINT},
#{item.backPic,jdbcType=BIGINT}, #{item.
viewTimes
,jdbcType=BIGINT},
#{item.backPic,jdbcType=BIGINT}, #{item.
pagePic
,jdbcType=BIGINT},
#{item.description,jdbcType=VARCHAR},
#{item.
viewTimes,jdbcType=BIGINT}, #{item.
description,jdbcType=VARCHAR},
#{item.conditionRule,jdbcType=TINYINT}, #{item.executeCycle,jdbcType=TINYINT},
#{item.conditionRule,jdbcType=TINYINT}, #{item.executeCycle,jdbcType=TINYINT},
#{item.status,jdbcType=TINYINT}, #{item.remark,jdbcType=VARCHAR},
#{item.status,jdbcType=TINYINT}, #{item.remark,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.createTime,jdbcType=TIMESTAMP},
...
@@ -333,6 +337,9 @@
...
@@ -333,6 +337,9 @@
<if
test=
"backPic != null"
>
<if
test=
"backPic != null"
>
back_pic,
back_pic,
</if>
</if>
<if
test=
"pagePic != null"
>
page_pic,
</if>
<if
test=
"viewTimes != null"
>
<if
test=
"viewTimes != null"
>
view_times,
view_times,
</if>
</if>
...
@@ -381,6 +388,9 @@
...
@@ -381,6 +388,9 @@
<if
test=
"backPic != null"
>
<if
test=
"backPic != null"
>
#{backPic,jdbcType=BIGINT},
#{backPic,jdbcType=BIGINT},
</if>
</if>
<if
test=
"pagePic != null"
>
#{pagePic,jdbcType=BIGINT},
</if>
<if
test=
"viewTimes != null"
>
<if
test=
"viewTimes != null"
>
#{viewTimes,jdbcType=BIGINT},
#{viewTimes,jdbcType=BIGINT},
</if>
</if>
...
@@ -429,6 +439,9 @@
...
@@ -429,6 +439,9 @@
<if
test=
"backPic != null"
>
<if
test=
"backPic != null"
>
back_pic = #{backPic,jdbcType=BIGINT},
back_pic = #{backPic,jdbcType=BIGINT},
</if>
</if>
<if
test=
"pagePic != null"
>
page_pic = #{pagePic,jdbcType=BIGINT},
</if>
<if
test=
"viewTimes != null"
>
<if
test=
"viewTimes != null"
>
view_times = #{viewTimes,jdbcType=BIGINT},
view_times = #{viewTimes,jdbcType=BIGINT},
</if>
</if>
...
...
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