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
32a50be2
Commit
32a50be2
authored
Feb 22, 2022
by
xugaojun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix_02-22_login' into developer
parents
a7972961
813fac7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
26 deletions
+23
-26
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+22
-25
HaoBanErrCode.java
...java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
+1
-1
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
32a50be2
...
@@ -122,30 +122,27 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -122,30 +122,27 @@ public class WxEnterpriseInfoController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_600001
);
return
resultResponse
(
HaoBanErrCode
.
ERR_600001
);
}
}
String
phoneNumber
=
loginStaff
.
getPhoneNumber
();
if
(
StringUtils
.
isNotBlank
(
loginStaff
.
getPhoneNumber
()))
{
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
DictDTO
loginUserId
=
managerDictService
.
getSMSDict
(
"app_login_phone_num"
,
loginStaff
.
getPhoneNumber
());
return
resultResponse
(
HaoBanErrCode
.
ERR_600002
);
logger
.
info
(
"伪登录:{},userId:{}"
,
loginStaff
.
getPhoneNumber
(),
JSONObject
.
toJSONString
(
loginUserId
));
}
if
(
null
!=
loginUserId
)
{
String
val
=
loginUserId
.
getDictValue
();
DictDTO
dictDTO
=
managerDictService
.
getSMSDict
(
"app_login_phone_num"
,
phoneNumber
);
List
<
StaffDTO
>
staffDTOS
=
new
ArrayList
<>();
logger
.
info
(
"伪登录:{},userId:{}"
,
phoneNumber
,
JSONObject
.
toJSONString
(
dictDTO
));
List
<
StaffDTO
>
phoneDtos
=
staffApiService
.
listByPhoneNumber
(
val
);
if
(
null
!=
dictDTO
)
{
List
<
StaffDTO
>
userDtos
=
staffApiService
.
listByWxUserId
(
val
);
String
val
=
dictDTO
.
getDictValue
();
if
(
CollectionUtils
.
isNotEmpty
(
phoneDtos
))
{
List
<
StaffDTO
>
staffDTOS
=
new
ArrayList
<>();
staffDTOS
.
addAll
(
phoneDtos
);
List
<
StaffDTO
>
phoneDtos
=
staffApiService
.
listByPhoneNumber
(
val
);
}
List
<
StaffDTO
>
userDtos
=
staffApiService
.
listByWxUserId
(
val
);
if
(
CollectionUtils
.
isNotEmpty
(
userDtos
))
{
if
(
CollectionUtils
.
isNotEmpty
(
phoneDtos
))
{
staffDTOS
.
addAll
(
userDtos
);
staffDTOS
.
addAll
(
phoneDtos
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
staffDTOS
))
{
if
(
CollectionUtils
.
isNotEmpty
(
userDtos
))
{
if
(
staffDTOS
.
size
()
>
1
)
{
staffDTOS
.
addAll
(
userDtos
);
String
dictName
=
loginUserId
.
getDictName
();
}
loginStaff
=
staffDTOS
.
stream
().
filter
(
staffDTO
->
dictName
.
indexOf
(
staffDTO
.
getWxEnterpriseId
())
>
0
).
findFirst
().
orElse
(
loginStaff
);
if
(
CollectionUtils
.
isNotEmpty
(
staffDTOS
))
{
}
else
{
if
(
staffDTOS
.
size
()
>
1
)
{
loginStaff
=
staffDTOS
.
get
(
0
);
String
dictName
=
dictDTO
.
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 {
...
@@ -163,7 +160,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
wellDoneLoginInfoVo
.
setStaffId
(
staffId
);
wellDoneLoginInfoVo
.
setStaffId
(
staffId
);
wellDoneLoginInfoVo
.
setWxEnterpriseId
(
wxEnterpriseId
);
wellDoneLoginInfoVo
.
setWxEnterpriseId
(
wxEnterpriseId
);
wellDoneLoginInfoVo
.
setStaffName
(
loginStaff
.
getStaffName
());
wellDoneLoginInfoVo
.
setStaffName
(
loginStaff
.
getStaffName
());
wellDoneLoginInfoVo
.
setPhoneNumber
(
phoneNumber
);
wellDoneLoginInfoVo
.
setPhoneNumber
(
loginStaff
.
getPhoneNumber
()
);
wellDoneLoginInfoVo
.
setNationcode
(
loginStaff
.
getNationCode
());
wellDoneLoginInfoVo
.
setNationcode
(
loginStaff
.
getNationCode
());
wellDoneLoginInfoVo
.
setWxUserId
(
loginStaff
.
getWxUserId
());
wellDoneLoginInfoVo
.
setWxUserId
(
loginStaff
.
getWxUserId
());
wellDoneLoginInfoVo
.
setPrivacyUseFlag
(
1
);
wellDoneLoginInfoVo
.
setPrivacyUseFlag
(
1
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
View file @
32a50be2
...
@@ -190,7 +190,7 @@ public enum HaoBanErrCode {
...
@@ -190,7 +190,7 @@ public enum HaoBanErrCode {
ERR_500001
(
500001
,
"该企业没关联好办"
),
ERR_500001
(
500001
,
"该企业没关联好办"
),
ERR_500003
(
500003
,
"企业corpid不对应,需要重新登录传code"
),
ERR_500003
(
500003
,
"企业corpid不对应,需要重新登录传code"
),
ERR_600001
(
600001
,
"成员不存在,请联系管理员后台授权通讯录权限"
),
ERR_600001
(
600001
,
"成员不存在,请联系管理员后台授权通讯录权限"
),
ERR_600002
(
600002
,
"成员无手机号,请
联系管理员后台授权通讯录权限
"
),
ERR_600002
(
600002
,
"成员无手机号,请
在企业微信绑定手机号
"
),
ERR_600003
(
600003
,
"未获取成员openid"
),
ERR_600003
(
600003
,
"未获取成员openid"
),
ERR_10004
(
10004
,
"成员名称不能为空"
),
ERR_10004
(
10004
,
"成员名称不能为空"
),
...
...
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