Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
501ac08a
authored
Sep 26, 2023
by
杨伟程
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
日睡眠图表
parent
e110043c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
server-service/src/main/java/com/makeit/service/wechat/impl/PlatElderChildrenInfoUserLoginWechatServiceImpl.java
server-service/src/main/java/com/makeit/service/wechat/impl/PlatElderChildrenInfoUserLoginWechatServiceImpl.java
View file @
501ac08a
...
...
@@ -18,6 +18,8 @@ import com.makeit.utils.third.wechat.WxUserInfo;
import
com.makeit.utils.third.wechat.WechatUtil
;
import
com.makeit.utils.user.TokenUtil
;
import
com.makeit.utils.user.wechat.WechatUserInfo
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -33,12 +35,16 @@ public class PlatElderChildrenInfoUserLoginWechatServiceImpl implements PlatElde
@Autowired
private
PlatOrgService
platOrgService
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PlatElderChildrenInfoUserLoginWechatServiceImpl
.
class
);
@Override
@Transactional
public
WechatUserInfo
login
(
WechatLoginPhoneDTO
dto
)
{
WxUserInfo
userInfo
=
WechatUtil
.
login
(
dto
);
logger
.
info
(
"userinfo:{}"
,
userInfo
);
PlatElderChildrenInfo
childrenInfo
=
platElderChildrenInfoService
.
getOne
(
new
QueryWrapper
<
PlatElderChildrenInfo
>().
lambda
()
.
eq
(
PlatElderChildrenInfo:
:
getOpenid
,
userInfo
.
getOpenId
()));
if
(
childrenInfo
==
null
)
{
...
...
@@ -49,8 +55,6 @@ public class PlatElderChildrenInfoUserLoginWechatServiceImpl implements PlatElde
PlatOrgSplitDTO
vo
=
platOrgService
.
getOrgSplitVO
(
dto
.
getOrgId
());
childrenInfo
=
new
PlatElderChildrenInfo
();
childrenInfo
.
setCityOrgId
(
vo
.
getCityOrgId
());
childrenInfo
.
setDistrictOrgId
(
vo
.
getDistrictOrgId
());
childrenInfo
.
setStreetOrgId
(
vo
.
getStreetOrgId
());
...
...
@@ -58,6 +62,8 @@ public class PlatElderChildrenInfoUserLoginWechatServiceImpl implements PlatElde
childrenInfo
.
setCreateBy
(
userInfo
.
getNickName
());
logger
.
info
(
"children:{}"
,
childrenInfo
);
}
childrenInfo
.
setPhone
(
userInfo
.
getPhoneNumber
());
...
...
@@ -69,8 +75,8 @@ public class PlatElderChildrenInfoUserLoginWechatServiceImpl implements PlatElde
childrenInfo
.
setUpdateBy
(
userInfo
.
getNickName
());
PlatElderChildrenInfo
finalChildrenInfo
=
childrenInfo
;
NoFillUtil
.
executeCreate
(()
->
{
NoFillUtil
.
executeUpdate
(()
->
{
NoFillUtil
.
executeCreate
(()
->
{
NoFillUtil
.
executeUpdate
(()
->
{
platElderChildrenInfoService
.
saveOrUpdate
(
finalChildrenInfo
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment