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 6c53a110
authored
Apr 25, 2021
by
wnb0128
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车家智能数据服务 需求V1.0.0功能--think.wang
1 parent
a8d20993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
src/main/java/com/glsx/smart/controller/UserRelationController.java
src/main/java/com/glsx/smart/controller/UserRelationController.java
View file @
6c53a11
...
@@ -9,6 +9,7 @@ import com.glsx.smart.dao.entity.SmartUserChannel;
...
@@ -9,6 +9,7 @@ import com.glsx.smart.dao.entity.SmartUserChannel;
import
com.glsx.smart.dao.entity.SmartUserRelation
;
import
com.glsx.smart.dao.entity.SmartUserRelation
;
import
com.glsx.smart.service.SmartUserRelationService
;
import
com.glsx.smart.service.SmartUserRelationService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -75,6 +76,7 @@ public class UserRelationController {
...
@@ -75,6 +76,7 @@ public class UserRelationController {
request
.
setSource
(
userRelation
.
getSource
());
request
.
setSource
(
userRelation
.
getSource
());
request
.
setName
(
userRelation
.
getName
());
request
.
setName
(
userRelation
.
getName
());
if
(
user
!=
null
){
if
(
user
!=
null
){
request
.
setId
(
user
.
getId
());
userRelationService
.
updateByPrimaryKeySelective
(
request
);
userRelationService
.
updateByPrimaryKeySelective
(
request
);
return
R
.
ok
().
data
(
this
.
updateChannelUser
(
user
));
return
R
.
ok
().
data
(
this
.
updateChannelUser
(
user
));
}
}
...
@@ -98,7 +100,7 @@ public class UserRelationController {
...
@@ -98,7 +100,7 @@ public class UserRelationController {
private
String
updateChannelUser
(
SmartUserRelation
user
){
private
String
updateChannelUser
(
SmartUserRelation
user
){
List
<
SmartUserChannel
>
list
=
user
.
getChannelList
();
List
<
SmartUserChannel
>
list
=
user
.
getChannelList
();
String
tuYaId
;
String
tuYaId
;
if
(
list
.
isEmpty
(
)){
if
(
CollectionUtils
.
isEmpty
(
list
)){
userRelationService
.
syncAqaraUser
(
user
.
getPhone
(),
user
.
getId
());
userRelationService
.
syncAqaraUser
(
user
.
getPhone
(),
user
.
getId
());
tuYaId
=
userRelationService
tuYaId
=
userRelationService
.
syncTuYaUser
(
user
.
getPhone
(),
user
.
getPassword
(),
user
.
getId
());
.
syncTuYaUser
(
user
.
getPhone
(),
user
.
getPassword
(),
user
.
getId
());
...
...
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