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 493a3309
authored
Apr 12, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]代码修改
1 parent
a6a686c9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
src/main/java/com/glsx/smart/controller/SceneController.java
src/main/java/com/glsx/smart/controller/SceneController.java
View file @
493a330
...
@@ -2,10 +2,12 @@ package com.glsx.smart.controller;
...
@@ -2,10 +2,12 @@ package com.glsx.smart.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.glsx.smart.dao.entity.SmartScene
;
import
com.glsx.smart.dao.entity.SmartScene
;
import
com.glsx.smart.dao.entity.SmartUserRelation
;
import
com.glsx.smart.pojo.OrderResponse
;
import
com.glsx.smart.pojo.OrderResponse
;
import
com.glsx.smart.service.SmartSceneDataService
;
import
com.glsx.smart.service.SmartSceneDataService
;
import
com.glsx.smart.service.SmartSceneLogService
;
import
com.glsx.smart.service.SmartSceneLogService
;
import
com.glsx.smart.service.SmartSceneService
;
import
com.glsx.smart.service.SmartSceneService
;
import
com.glsx.smart.service.SmartUserRelationService
;
import
com.glsx.smart.service.UserKafkaService
;
import
com.glsx.smart.service.UserKafkaService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -43,12 +45,28 @@ public class SceneController {
...
@@ -43,12 +45,28 @@ public class SceneController {
@Autowired
@Autowired
private
UserKafkaService
userKafkaService
;
private
UserKafkaService
userKafkaService
;
@Autowired
private
SmartUserRelationService
userRelationService
;
@RequestMapping
(
value
=
"/getList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/getList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
List
<
SmartScene
>
getList
(
@RequestBody
SmartScene
scene
)
{
public
List
<
SmartScene
>
getList
(
@RequestBody
SmartScene
scene
)
{
log
.
info
(
"/scene/getList param: {}"
,
JSON
.
toJSONString
(
scene
));
log
.
info
(
"/scene/getList param: {}"
,
JSON
.
toJSONString
(
scene
));
return
sceneService
.
getList
(
scene
);
return
sceneService
.
getList
(
scene
);
}
}
@RequestMapping
(
value
=
"/getScenList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
List
<
SmartScene
>
getScenList
(
@RequestBody
SmartScene
scene
)
{
log
.
info
(
"/scene/getList param: {}"
,
JSON
.
toJSONString
(
scene
));
SmartUserRelation
smartUserRelation
=
new
SmartUserRelation
();
smartUserRelation
.
setId
(
scene
.
getUserId
());
SmartUserRelation
user
=
userRelationService
.
getSingle
(
smartUserRelation
);
if
(
user
==
null
){
return
null
;
}
scene
.
setUserId
(
user
.
getUserId
());
return
sceneService
.
getList
(
scene
);
}
@RequestMapping
(
value
=
"/getById"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/getById"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
SmartScene
getById
(
Long
id
)
{
public
SmartScene
getById
(
Long
id
)
{
log
.
info
(
"/scene/getById param: {}"
,
id
);
log
.
info
(
"/scene/getById param: {}"
,
id
);
...
...
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