Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
432bfc4b
Commit
432bfc4b
authored
Jul 24, 2023
by
王亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add phone login.
parent
493daafb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
InterLoginParam.java
...va/cn/quantgroup/xyqb/model/v2/login/InterLoginParam.java
+1
-0
InterLoginStrategy.java
...ava/cn/quantgroup/xyqb/service/v2/InterLoginStrategy.java
+5
-1
No files found.
src/main/java/cn/quantgroup/xyqb/model/v2/login/InterLoginParam.java
View file @
432bfc4b
...
...
@@ -12,6 +12,7 @@ import lombok.EqualsAndHashCode;
public
class
InterLoginParam
extends
BaseLoginParam
{
//用户id
private
Long
userId
;
private
String
phoneNo
;
private
String
uuid
;
private
String
openId
;
private
String
unionId
;
...
...
src/main/java/cn/quantgroup/xyqb/service/v2/InterLoginStrategy.java
View file @
432bfc4b
...
...
@@ -59,6 +59,9 @@ public class InterLoginStrategy implements LoginStrategy {
if
(
StringUtils
.
isNotEmpty
(
interLoginParam
.
getUuid
()))
{
user
=
userService
.
findByUuidInDb
(
interLoginParam
.
getUuid
(),
sessionStruct
.
getTenantId
());
}
if
(
StringUtils
.
isNotEmpty
(
interLoginParam
.
getPhoneNo
()))
{
user
=
userService
.
findByPhoneInDb
(
interLoginParam
.
getPhoneNo
(),
sessionStruct
.
getTenantId
());
}
if
(
StringUtils
.
isNotEmpty
(
interLoginParam
.
getAppId
())
&&
StringUtils
.
isNotEmpty
(
interLoginParam
.
getOpenId
()))
{
WechatUserInfo
wechatUserInfo
=
wechatService
.
findWechatUserInfoFromDb
(
interLoginParam
.
getOpenId
(),
interLoginParam
.
getAppId
(),
sessionStruct
.
getTenantId
());
...
...
@@ -111,7 +114,8 @@ public class InterLoginStrategy implements LoginStrategy {
public
BaseLoginParam
checkParam
(
LoginReq
loginReq
)
{
InterLoginParam
param
=
loginReq
.
getData
().
toJavaObject
(
InterLoginParam
.
class
);
if
(
param
.
getUserId
()
==
null
&&
StringUtils
.
isEmpty
(
param
.
getUuid
())
&&
(
StringUtils
.
isEmpty
(
param
.
getOpenId
())
&&
StringUtils
.
isEmpty
(
param
.
getAppId
()))
&&
(
StringUtils
.
isEmpty
(
param
.
getUnionId
())
&&
StringUtils
.
isEmpty
(
param
.
getAppId
())))
{
&&
(
StringUtils
.
isEmpty
(
param
.
getOpenId
())
&&
StringUtils
.
isEmpty
(
param
.
getAppId
()))
&&
(
StringUtils
.
isEmpty
(
param
.
getUnionId
())
&&
StringUtils
.
isEmpty
(
param
.
getAppId
()))
&&
StringUtils
.
isEmpty
(
param
.
getPhoneNo
()))
{
throw
new
BizException
(
BizExceptionEnum
.
ERROR_LOGIN_PARAM
);
}
return
param
;
...
...
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