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
c87e5d78
Commit
c87e5d78
authored
Feb 18, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:登陆增加企业字段
parent
8bf7a6db
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
LoginDTO.java
...src/main/java/com/gic/haoban/manage/api/dto/LoginDTO.java
+8
-1
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+5
-4
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/LoginDTO.java
View file @
c87e5d78
...
@@ -10,6 +10,8 @@ public class LoginDTO implements Serializable {
...
@@ -10,6 +10,8 @@ public class LoginDTO implements Serializable {
private
String
wxEnterpriseId
;
private
String
wxEnterpriseId
;
private
String
enterpriseId
;
private
Integer
wxEnterpriseType
;
private
Integer
wxEnterpriseType
;
public
Integer
getWxEnterpriseType
()
{
public
Integer
getWxEnterpriseType
()
{
...
@@ -36,6 +38,11 @@ public class LoginDTO implements Serializable {
...
@@ -36,6 +38,11 @@ public class LoginDTO implements Serializable {
this
.
wxEnterpriseId
=
wxEnterpriseId
;
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
c87e5d78
...
@@ -236,27 +236,27 @@ public class LoginController extends WebBaseController {
...
@@ -236,27 +236,27 @@ public class LoginController extends WebBaseController {
WxEnterpriseDTO
detailDTO
=
enterpriseDTOList
.
stream
().
filter
(
dto
->
dto
.
getWxEnterpriseId
().
equals
(
wxEnterpriseId
)).
findFirst
().
orElse
(
null
);
WxEnterpriseDTO
detailDTO
=
enterpriseDTOList
.
stream
().
filter
(
dto
->
dto
.
getWxEnterpriseId
().
equals
(
wxEnterpriseId
)).
findFirst
().
orElse
(
null
);
if
(
null
==
detailDTO
)
{
if
(
null
==
detailDTO
)
{
logger
.
info
(
"登录失败,不存在对应企业:
{}"
,
o
);
logger
.
info
(
"登录失败,不存在对应企业:
gicEnterpriseId:{}"
,
gicEnterpriseId
);
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
return
model
;
return
model
;
}
}
StaffDTO
staff
=
staffApiService
.
selectByNationcodeAndPhoneNumber
(
detailDTO
.
getWxEnterpriseId
(),
"86"
,
loginPhoneNumber
);
StaffDTO
staff
=
staffApiService
.
selectByNationcodeAndPhoneNumber
(
detailDTO
.
getWxEnterpriseId
(),
"86"
,
loginPhoneNumber
);
if
(
null
==
staff
)
{
if
(
null
==
staff
)
{
logger
.
info
(
"登录用户手机号不存在!
{}"
,
o
);
logger
.
info
(
"登录用户手机号不存在!
gicEnterpriseId:{}"
,
gicEnterpriseId
);
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
return
model
;
return
model
;
}
}
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
WxApplicationDTO
application
=
wxApplicationApiService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
if
(
null
==
application
)
{
if
(
null
==
application
)
{
logger
.
info
(
"登录企业应用 没授权!
{}"
);
logger
.
info
(
"登录企业应用 没授权!
gicEnterpriseId:{}"
,
gicEnterpriseId
);
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
return
model
;
return
model
;
}
}
WxEnterpriseDTO
enterprise
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
WxEnterpriseDTO
enterprise
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
if
(
null
==
enterprise
)
{
if
(
null
==
enterprise
)
{
logger
.
info
(
"登录失败,不存在对应企业:
{}"
,
o
);
logger
.
info
(
"登录失败,不存在对应企业:
wxEnterpriseId{}"
,
wxEnterpriseId
);
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
return
model
;
return
model
;
}
}
...
@@ -287,6 +287,7 @@ public class LoginController extends WebBaseController {
...
@@ -287,6 +287,7 @@ public class LoginController extends WebBaseController {
}
}
LoginDTO
loginDTO
=
new
LoginDTO
();
LoginDTO
loginDTO
=
new
LoginDTO
();
loginDTO
.
setWxEnterpriseId
(
detailDTO
.
getWxEnterpriseId
());
loginDTO
.
setWxEnterpriseId
(
detailDTO
.
getWxEnterpriseId
());
loginDTO
.
setEnterpriseId
(
gicEnterpriseId
);
loginDTO
.
setStaffDTO
(
staff
);
loginDTO
.
setStaffDTO
(
staff
);
String
redirectUri
=
config
.
getHost
()
+
"index"
;
String
redirectUri
=
config
.
getHost
()
+
"index"
;
redirectUri
=
redirectUri
.
replace
(
"haoban-manage3-web"
,
"haoban-3/#"
);
redirectUri
=
redirectUri
.
replace
(
"haoban-manage3-web"
,
"haoban-3/#"
);
...
...
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