Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
haoban3.0
haoban-manage3.0
Commits
813fac7b
Commit
813fac7b
authored
Feb 22, 2022
by
xugaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复一个登录问题
parent
897608a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
25 deletions
+22
-25
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+22
-25
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
813fac7b
...
...
@@ -122,30 +122,27 @@ public class WxEnterpriseInfoController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_600001
);
}
String
phoneNumber
=
loginStaff
.
getPhoneNumber
();
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_600002
);
}
DictDTO
dictDTO
=
managerDictService
.
getSMSDict
(
"app_login_phone_num"
,
phoneNumber
);
logger
.
info
(
"伪登录:{},userId:{}"
,
phoneNumber
,
JSONObject
.
toJSONString
(
dictDTO
));
if
(
null
!=
dictDTO
)
{
String
val
=
dictDTO
.
getDictValue
();
List
<
StaffDTO
>
staffDTOS
=
new
ArrayList
<>();
List
<
StaffDTO
>
phoneDtos
=
staffApiService
.
listByPhoneNumber
(
val
);
List
<
StaffDTO
>
userDtos
=
staffApiService
.
listByWxUserId
(
val
);
if
(
CollectionUtils
.
isNotEmpty
(
phoneDtos
))
{
staffDTOS
.
addAll
(
phoneDtos
);
}
if
(
CollectionUtils
.
isNotEmpty
(
userDtos
))
{
staffDTOS
.
addAll
(
userDtos
);
}
if
(
CollectionUtils
.
isNotEmpty
(
staffDTOS
))
{
if
(
staffDTOS
.
size
()
>
1
)
{
String
dictName
=
dictDTO
.
getDictName
();
loginStaff
=
staffDTOS
.
stream
().
filter
(
staffDTO
->
dictName
.
indexOf
(
staffDTO
.
getWxEnterpriseId
())
>
0
).
findFirst
().
orElse
(
loginStaff
);
}
else
{
loginStaff
=
staffDTOS
.
get
(
0
);
if
(
StringUtils
.
isNotBlank
(
loginStaff
.
getPhoneNumber
()))
{
DictDTO
loginUserId
=
managerDictService
.
getSMSDict
(
"app_login_phone_num"
,
loginStaff
.
getPhoneNumber
());
logger
.
info
(
"伪登录:{},userId:{}"
,
loginStaff
.
getPhoneNumber
(),
JSONObject
.
toJSONString
(
loginUserId
));
if
(
null
!=
loginUserId
)
{
String
val
=
loginUserId
.
getDictValue
();
List
<
StaffDTO
>
staffDTOS
=
new
ArrayList
<>();
List
<
StaffDTO
>
phoneDtos
=
staffApiService
.
listByPhoneNumber
(
val
);
List
<
StaffDTO
>
userDtos
=
staffApiService
.
listByWxUserId
(
val
);
if
(
CollectionUtils
.
isNotEmpty
(
phoneDtos
))
{
staffDTOS
.
addAll
(
phoneDtos
);
}
if
(
CollectionUtils
.
isNotEmpty
(
userDtos
))
{
staffDTOS
.
addAll
(
userDtos
);
}
if
(
CollectionUtils
.
isNotEmpty
(
staffDTOS
))
{
if
(
staffDTOS
.
size
()
>
1
)
{
String
dictName
=
loginUserId
.
getDictName
();
loginStaff
=
staffDTOS
.
stream
().
filter
(
staffDTO
->
dictName
.
indexOf
(
staffDTO
.
getWxEnterpriseId
())
>
0
).
findFirst
().
orElse
(
loginStaff
);
}
else
{
loginStaff
=
staffDTOS
.
get
(
0
);
}
}
}
}
...
...
@@ -163,7 +160,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
wellDoneLoginInfoVo
.
setStaffId
(
staffId
);
wellDoneLoginInfoVo
.
setWxEnterpriseId
(
wxEnterpriseId
);
wellDoneLoginInfoVo
.
setStaffName
(
loginStaff
.
getStaffName
());
wellDoneLoginInfoVo
.
setPhoneNumber
(
phoneNumber
);
wellDoneLoginInfoVo
.
setPhoneNumber
(
loginStaff
.
getPhoneNumber
()
);
wellDoneLoginInfoVo
.
setNationcode
(
loginStaff
.
getNationCode
());
wellDoneLoginInfoVo
.
setWxUserId
(
loginStaff
.
getWxUserId
());
wellDoneLoginInfoVo
.
setPrivacyUseFlag
(
1
);
...
...
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