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
9be970aa
Commit
9be970aa
authored
May 20, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
login
parent
45550234
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+11
-13
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
9be970aa
...
@@ -213,11 +213,6 @@ public class LoginController extends WebBaseController {
...
@@ -213,11 +213,6 @@ public class LoginController extends WebBaseController {
// 登录逻辑
// 登录逻辑
private
String
doLogin
(
String
wxEnterpriseId
,
String
gicEnterpriseId
,
String
loginPhoneNumber
,
String
loginChannel
,
private
String
doLogin
(
String
wxEnterpriseId
,
String
gicEnterpriseId
,
String
loginPhoneNumber
,
String
loginChannel
,
HttpServletResponse
response
)
{
HttpServletResponse
response
)
{
/*StaffDTO staff = staffApiService.selectByNationcodeAndPhoneNumber(wxEnterpriseId, "86", loginPhoneNumber);
if (null == staff) {
logger.info("查询staff表不存在,gicEnterpriseId:{},loginPhoneNumber={}", gicEnterpriseId);
return "1002" ;
}*/
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
if
(
null
==
application
)
{
if
(
null
==
application
)
{
logger
.
info
(
"登录企业应用 没授权!gicEnterpriseId:{}"
,
gicEnterpriseId
);
logger
.
info
(
"登录企业应用 没授权!gicEnterpriseId:{}"
,
gicEnterpriseId
);
...
@@ -228,6 +223,17 @@ public class LoginController extends WebBaseController {
...
@@ -228,6 +223,17 @@ public class LoginController extends WebBaseController {
logger
.
info
(
"登录失败,微信企业不存在=wxEnterpriseId{}"
,
wxEnterpriseId
);
logger
.
info
(
"登录失败,微信企业不存在=wxEnterpriseId{}"
,
wxEnterpriseId
);
return
"1000"
;
return
"1000"
;
}
}
WebLoginDTO
webLoginDTO
=
new
WebLoginDTO
()
;
StaffDTO
staff
=
staffApiService
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
"86"
,
loginPhoneNumber
);
if
(
null
==
staff
)
{
logger
.
info
(
"查询staff表不存在,gicEnterpriseId:{},loginPhoneNumber={}"
,
gicEnterpriseId
);
// return "1002" ;
}
else
{
webLoginDTO
=
EntityUtil
.
changeEntityByJSON
(
WebLoginDTO
.
class
,
staff
);
}
webLoginDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
webLoginDTO
.
setEnterpriseId
(
gicEnterpriseId
);
// 导购id
// 导购id
ClerkDTO
clerk
=
clerkService
.
getUserByPhoneNumber
(
loginPhoneNumber
,
gicEnterpriseId
);
ClerkDTO
clerk
=
clerkService
.
getUserByPhoneNumber
(
loginPhoneNumber
,
gicEnterpriseId
);
if
(
clerk
==
null
)
{
if
(
clerk
==
null
)
{
...
@@ -235,9 +241,6 @@ public class LoginController extends WebBaseController {
...
@@ -235,9 +241,6 @@ public class LoginController extends WebBaseController {
return
"1003"
;
return
"1003"
;
}
}
EnterpriseDTO
en
=
this
.
enterpriseService
.
getEnterpriseById
(
gicEnterpriseId
)
;
EnterpriseDTO
en
=
this
.
enterpriseService
.
getEnterpriseById
(
gicEnterpriseId
)
;
WebLoginDTO
webLoginDTO
=
new
WebLoginDTO
()
;
webLoginDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
webLoginDTO
.
setEnterpriseId
(
gicEnterpriseId
);
webLoginDTO
.
setLoginChannel
(
loginChannel
);
webLoginDTO
.
setLoginChannel
(
loginChannel
);
webLoginDTO
.
setClerkId
(
clerk
.
getClerkId
());
webLoginDTO
.
setClerkId
(
clerk
.
getClerkId
());
webLoginDTO
.
setClerkName
(
clerk
.
getClerkName
());
webLoginDTO
.
setClerkName
(
clerk
.
getClerkName
());
...
@@ -285,11 +288,6 @@ public class LoginController extends WebBaseController {
...
@@ -285,11 +288,6 @@ public class LoginController extends WebBaseController {
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
logger
.
info
(
"当前登录信息={}"
,
JSON
.
toJSON
(
loginUser
));
logger
.
info
(
"当前登录信息={}"
,
JSON
.
toJSON
(
loginUser
));
WebLoginVO
vo
=
EntityUtil
.
changeEntityByOrika
(
WebLoginVO
.
class
,
loginUser
)
;
WebLoginVO
vo
=
EntityUtil
.
changeEntityByOrika
(
WebLoginVO
.
class
,
loginUser
)
;
String
staffId
=
loginUser
.
getStaffId
()
;
StaffDTO
dto
=
this
.
staffApiService
.
selectById
(
staffId
)
;
vo
.
setStaffName
(
dto
.
getStaffName
()+
"("
+
loginUser
.
getClerkName
()+
")"
);
StaffVO
staffVO
=
EntityUtil
.
changeEntityByOrika
(
StaffVO
.
class
,
dto
)
;
vo
.
setStaffVO
(
staffVO
);
return
this
.
success
(
vo
)
;
return
this
.
success
(
vo
)
;
}
}
...
...
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