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 840a3851
authored
Mar 19, 2021
by
wnb0128
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车家智能V1.0.0开发 场景数据--think.wang
1 parent
1a001d0b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
src/main/java/com/glsx/smart/controller/SceneTemplateController.java
src/main/java/com/glsx/smart/controller/SysCodeController.java
src/main/java/com/glsx/smart/dao/entity/SmartScene.java
src/main/resources/mapper/SmartSceneTemplateMapper.xml
src/main/java/com/glsx/smart/controller/SceneTemplateController.java
View file @
840a385
...
@@ -30,7 +30,7 @@ public class SceneTemplateController {
...
@@ -30,7 +30,7 @@ public class SceneTemplateController {
private
SmartTemplateParamService
templateParamService
;
private
SmartTemplateParamService
templateParamService
;
@RequestMapping
(
value
=
"/getPageList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/getPageList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
PageInfo
<
SmartSceneTemplate
>
getPageList
(
SmartSceneTemplate
sceneTemplate
)
{
public
PageInfo
<
SmartSceneTemplate
>
getPageList
(
@RequestBody
SmartSceneTemplate
sceneTemplate
)
{
log
.
info
(
"/sceneTemplate/getList param: {}"
,
JSON
.
toJSONString
(
sceneTemplate
));
log
.
info
(
"/sceneTemplate/getList param: {}"
,
JSON
.
toJSONString
(
sceneTemplate
));
List
<
SmartSceneTemplate
>
sceneList
=
sceneTemplateService
.
getList
(
sceneTemplate
);
List
<
SmartSceneTemplate
>
sceneList
=
sceneTemplateService
.
getList
(
sceneTemplate
);
PageInfo
<
SmartSceneTemplate
>
pageInfo
=
PageInfo
.
of
(
sceneList
);
PageInfo
<
SmartSceneTemplate
>
pageInfo
=
PageInfo
.
of
(
sceneList
);
...
@@ -38,7 +38,7 @@ public class SceneTemplateController {
...
@@ -38,7 +38,7 @@ public class SceneTemplateController {
}
}
@RequestMapping
(
value
=
"/getList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/getList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
List
<
SmartSceneTemplate
>
getList
(
SmartSceneTemplate
sceneTemplate
)
{
public
List
<
SmartSceneTemplate
>
getList
(
@RequestBody
SmartSceneTemplate
sceneTemplate
)
{
log
.
info
(
"/sceneTemplate/getList param: {}"
,
JSON
.
toJSONString
(
sceneTemplate
));
log
.
info
(
"/sceneTemplate/getList param: {}"
,
JSON
.
toJSONString
(
sceneTemplate
));
return
sceneTemplateService
.
getList
(
sceneTemplate
);
return
sceneTemplateService
.
getList
(
sceneTemplate
);
}
}
...
...
src/main/java/com/glsx/smart/controller/SysCodeController.java
View file @
840a385
...
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
/**
* <p>Description:
* <p>Description:
* <p>Project: chejia-smart
* <p>Project: chejia-smart
...
@@ -38,4 +40,10 @@ public class SysCodeController {
...
@@ -38,4 +40,10 @@ public class SysCodeController {
}
}
return
R
.
ok
().
data
(
sysCodeService
.
getList
(
code
));
return
R
.
ok
().
data
(
sysCodeService
.
getList
(
code
));
}
}
@RequestMapping
(
value
=
"/getListByCondition"
,
method
=
{
RequestMethod
.
POST
})
public
List
<
SmartSysCode
>
getListByCondition
(
@RequestBody
SmartSysCode
code
)
{
log
.
info
(
"/sysCode/getListByCondition param: {}"
,
JSON
.
toJSONString
(
code
));
return
sysCodeService
.
getList
(
code
);
}
}
}
src/main/java/com/glsx/smart/dao/entity/SmartScene.java
View file @
840a385
...
@@ -40,7 +40,7 @@ public class SmartScene implements Serializable {
...
@@ -40,7 +40,7 @@ public class SmartScene implements Serializable {
/**
/**
* 场景名称
* 场景名称
*/
*/
private
String
scene
s
Name
;
private
String
sceneName
;
/**
/**
* 场景类型key 关联smart_sys_code中dict_key
* 场景类型key 关联smart_sys_code中dict_key
...
...
src/main/resources/mapper/SmartSceneTemplateMapper.xml
View file @
840a385
...
@@ -469,6 +469,9 @@
...
@@ -469,6 +469,9 @@
<if
test=
"typeKey != null and typeKey != ''"
>
<if
test=
"typeKey != null and typeKey != ''"
>
and t.type_key = #{typeKey,jdbcType=VARCHAR}
and t.type_key = #{typeKey,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"status != null"
>
and t.status = #{status,jdbcType=TINYINT}
</if>
</where>
</where>
order by t.create_time desc
order by t.create_time desc
</select>
</select>
...
...
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