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
7ece3c7d
Commit
7ece3c7d
authored
Jul 04, 2025
by
xiehongfei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20250618-erqian' into developer
parents
7789b096
d227321e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+34
-0
WebLoginVO.java
...rc/main/java/com/gic/haoban/manage/web/vo/WebLoginVO.java
+13
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
7ece3c7d
...
@@ -12,6 +12,9 @@ import java.util.stream.Collectors;
...
@@ -12,6 +12,9 @@ import java.util.stream.Collectors;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.dto.StoreWidgetDTO
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -88,6 +91,8 @@ public class LoginController extends WebBaseController {
...
@@ -88,6 +91,8 @@ public class LoginController extends WebBaseController {
private
HaobanUserApiService
haobanUserApiService
;
private
HaobanUserApiService
haobanUserApiService
;
@Autowired
@Autowired
private
RightService
rightService
;
private
RightService
rightService
;
@Autowired
private
StoreWidgetService
storeWidgetService
;
/**
/**
* 企微后台登录
* 企微后台登录
...
@@ -445,9 +450,38 @@ public class LoginController extends WebBaseController {
...
@@ -445,9 +450,38 @@ public class LoginController extends WebBaseController {
}
}
String
gicHost
=
this
.
getGicHost
();
String
gicHost
=
this
.
getGicHost
();
vo
.
setGicHost
(
gicHost
);
vo
.
setGicHost
(
gicHost
);
String
clerkId
=
loginUser
.
getClerkId
();
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
vo
.
setHasAllStorePermission
(
0
);
if
(
null
!=
clerkDTO
)
{
vo
.
setHasAllStorePermission
(
isAdminAuthStore
(
loginUser
.
getEnterpriseId
(),
clerkDTO
)
?
1
:
0
);
}
return
this
.
success
(
vo
);
return
this
.
success
(
vo
);
}
}
private
boolean
isAdminAuthStore
(
String
enterpriseId
,
ClerkDTO
clerkDTO
)
{
if
(!
isAuthEnterprise
(
enterpriseId
))
{
return
true
;
}
boolean
isAdmin
=
clerkDTO
.
getSuperAdmin
()
!=
null
&&
clerkDTO
.
getSuperAdmin
()
==
1
;
return
isAdmin
||
StringUtils
.
isBlank
(
clerkDTO
.
getStoreWidgetId
())
||
isAllAuth
(
clerkDTO
.
getStoreWidgetId
());
}
private
boolean
isAuthEnterprise
(
String
enterpriseId
)
{
EnterpriseSettingDTO
enterpriseSettingDTO
=
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
enterpriseId
);
Integer
enableAccessControl
=
enterpriseSettingDTO
.
getEnableAccessControl
();
//是否开启权限控制
boolean
isEnableAccessControl
=
enableAccessControl
!=
null
&&
enableAccessControl
.
intValue
()
==
1
;
return
isEnableAccessControl
;
}
private
boolean
isAllAuth
(
String
key
)
{
StoreWidgetDTO
storeWidgetDTO
=
storeWidgetService
.
getStoreWidgetBykey
(
key
);
return
storeWidgetDTO
!=
null
&&
storeWidgetDTO
.
getSelectType
().
intValue
()
==
0
;
}
@RequestMapping
(
"get-login-session"
)
@RequestMapping
(
"get-login-session"
)
@IgnoreLogin
@IgnoreLogin
public
HaobanResponse
getLoginSession
()
{
public
HaobanResponse
getLoginSession
()
{
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/WebLoginVO.java
View file @
7ece3c7d
...
@@ -36,6 +36,11 @@ public class WebLoginVO implements Serializable {
...
@@ -36,6 +36,11 @@ public class WebLoginVO implements Serializable {
private
String
cliqueId
;
private
String
cliqueId
;
//登录用户关联的企业是否是集团:1是0否
//登录用户关联的企业是否是集团:1是0否
private
Integer
isClique
;
private
Integer
isClique
;
/**
* 是否有所有门店权限,1:是,0:否
*/
private
Integer
hasAllStorePermission
;
public
String
getCliqueId
()
{
public
String
getCliqueId
()
{
return
cliqueId
;
return
cliqueId
;
...
@@ -183,4 +188,12 @@ public class WebLoginVO implements Serializable {
...
@@ -183,4 +188,12 @@ public class WebLoginVO implements Serializable {
this
.
clerkPhone
=
clerkPhone
;
this
.
clerkPhone
=
clerkPhone
;
return
this
;
return
this
;
}
}
public
Integer
getHasAllStorePermission
()
{
return
hasAllStorePermission
;
}
public
void
setHasAllStorePermission
(
Integer
hasAllStorePermission
)
{
this
.
hasAllStorePermission
=
hasAllStorePermission
;
}
}
}
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