Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
d903c122
Commit
d903c122
authored
Dec 11, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取登录用户手机号
parent
414a5b59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
+18
-1
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
View file @
d903c122
...
@@ -37,8 +37,11 @@ import com.wwdz.ch.wx.util.IpUtil;
...
@@ -37,8 +37,11 @@ import com.wwdz.ch.wx.util.IpUtil;
import
com.wwdz.ch.wx.util.RedisUtil
;
import
com.wwdz.ch.wx.util.RedisUtil
;
import
com.wwdz.ch.wx.util.StringUtil
;
import
com.wwdz.ch.wx.util.StringUtil
;
import
com.wwdz.ch.wx.util.WxResponseCode
;
import
com.wwdz.ch.wx.util.WxResponseCode
;
import
com.wwdz.mall.common.vo.response.CloudServerResponse
;
import
com.wwdz.user.api.service.user.UserReadService
;
import
com.wwdz.user.api.service.user.UserReadService
;
import
com.wwdz.user.api.service.user.UserWriteService
;
import
com.xxdxxs.utils.JsonUtils
;
import
com.xxdxxs.utils.JsonUtils
;
import
io.swagger.models.auth.In
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -119,6 +122,9 @@ public class UserServiceImpl implements UserService {
...
@@ -119,6 +122,9 @@ public class UserServiceImpl implements UserService {
@Autowired
@Autowired
AiAssistantDao
aiAssistantDao
;
AiAssistantDao
aiAssistantDao
;
@Reference
UserWriteService
userWriteService
;
...
@@ -217,8 +223,19 @@ public class UserServiceImpl implements UserService {
...
@@ -217,8 +223,19 @@ public class UserServiceImpl implements UserService {
if
(
dto
.
getLoginType
().
equals
(
LoginTypeEnum
.
WECHAT
.
getCode
()))
{
if
(
dto
.
getLoginType
().
equals
(
LoginTypeEnum
.
WECHAT
.
getCode
()))
{
phone
=
wxLoginManager
.
getPhone
(
dto
);
phone
=
wxLoginManager
.
getPhone
(
dto
);
if
(
StringUtils
.
equals
(
"phoneFalse"
,
phone
))
{
if
(
StringUtils
.
equals
(
"phoneFalse"
,
phone
))
{
logger
.
info
(
">>>>>>>>>>>>>FAILED 获取手机号失败 <<<<<<<<<<<<<"
);
logger
.
info
(
">>>>>>>>>>>>>
FAILED 获取手机号失败 <<<<<<<<<<<<<"
);
phone
=
null
;
phone
=
null
;
}
else
{
//保存用户手机
com
.
wwdz
.
user
.
api
.
model
.
user
.
User
wuser
=
new
com
.
wwdz
.
user
.
api
.
model
.
user
.
User
();
wuser
.
setUserId
(
dto
.
getUserId
());
wuser
.
setPhone
(
phone
);
CloudServerResponse
<
Integer
>
cloudServerResponse
=
userWriteService
.
updateByUserId
(
wuser
);
if
(
cloudServerResponse
.
getResult
()
!=
null
&&
cloudServerResponse
.
getResult
()
>
0
)
{
logger
.
info
(
">>>>>>>> 用户id:{} 保存用户手机号成功 <<<<<<<<"
,
dto
.
getUserId
());
}
else
{
logger
.
error
(
">>>>>>>> 用户id:{} 保存用户手机号失败 <<<<<<<<"
,
dto
.
getUserId
());
}
}
}
}
}
}
}
...
...
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