Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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
base_platform_enterprise
gic-platform-auth
Commits
89094466
Commit
89094466
authored
Feb 16, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商户前置资源字典数据接口
parent
a3667d47
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
13 deletions
+25
-13
TabSysBusinessFrontResMapper.java
...com/gic/auth/dao/mapper/TabSysBusinessFrontResMapper.java
+2
-1
BusinessFrontResService.java
...in/java/com/gic/auth/service/BusinessFrontResService.java
+2
-2
BusinessFrontResServiceImpl.java
...om/gic/auth/service/impl/BusinessFrontResServiceImpl.java
+2
-2
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+15
-7
TabSysBusinessFrontResMapper.xml
...rc/main/resources/mapper/TabSysBusinessFrontResMapper.xml
+4
-1
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysBusinessFrontResMapper.java
View file @
89094466
...
...
@@ -59,5 +59,5 @@ public interface TabSysBusinessFrontResMapper {
List
<
TabSysBusinessFrontRes
>
listGroupResourceCode
();
List
<
TabSysBusinessFrontRes
>
listByCode
(
@Param
(
"code
"
)
String
code
,
@Param
(
"resourceType"
)
Integer
resourceType
);
List
<
TabSysBusinessFrontRes
>
listByCode
(
@Param
(
"code
List"
)
List
<
String
>
codeList
,
@Param
(
"resourceType"
)
Integer
resourceType
);
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/service/BusinessFrontResService.java
View file @
89094466
...
...
@@ -18,11 +18,11 @@ public interface BusinessFrontResService {
/**
* 根据code查询页面
* @param code
* @param code
List
* @param resourceType
* @return
*/
List
<
TabSysBusinessFrontRes
>
listByCode
(
String
code
,
Integer
resourceType
);
List
<
TabSysBusinessFrontRes
>
listByCode
(
List
<
String
>
codeList
,
Integer
resourceType
);
TabSysBusinessFrontRes
getByResourceId
(
Integer
resourceId
);
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/BusinessFrontResServiceImpl.java
View file @
89094466
...
...
@@ -53,8 +53,8 @@ public class BusinessFrontResServiceImpl implements BusinessFrontResService{
}
@Override
public
List
<
TabSysBusinessFrontRes
>
listByCode
(
String
code
,
Integer
resourceType
)
{
return
tabSysBusinessFrontResMapper
.
listByCode
(
code
,
resourceType
);
public
List
<
TabSysBusinessFrontRes
>
listByCode
(
List
<
String
>
codeList
,
Integer
resourceType
)
{
return
tabSysBusinessFrontResMapper
.
listByCode
(
code
List
,
resourceType
);
}
@Override
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
89094466
...
...
@@ -4,6 +4,7 @@ import java.util.*;
import
com.gic.auth.entity.TabSysBusinessFrontRes
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.dto.EnterpriseResourceRelDTO
;
import
com.gic.enterprise.service.EnterpriseApiService
;
import
com.gic.open.api.dto.*
;
import
com.gic.open.api.service.ServeApiService
;
...
...
@@ -911,15 +912,22 @@ public class MenuApiServiceImpl implements MenuApiService {
Map
<
String
,
Object
>
resourcePage
=
new
HashMap
<>(
16
);
//过滤商品资源页面
ServiceResponse
<
EnterpriseDTO
>
enterpriseResult
=
enterpriseApiService
.
getEnterpriseById
(
enterpriseId
);
if
(
enterpriseResult
.
isSuccess
())
{
Integer
goodsResource
=
enterpriseResult
.
getResult
().
getGoodsResource
();
if
(
goodsResource
==
null
||
goodsResource
.
intValue
()
!=
1
)
{
ServiceResponse
<
List
<
EnterpriseResourceRelDTO
>>
resourceResult
=
enterpriseApiService
.
getBusinessFrontRes
(
enterpriseId
);
if
(
resourceResult
.
isSuccess
())
{
//查询需要过滤的资源
List
<
EnterpriseResourceRelDTO
>
resourceList
=
resourceResult
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
resourceList
))
{
List
<
String
>
resourceCodeList
=
new
ArrayList
<>();
for
(
EnterpriseResourceRelDTO
res
:
resourceList
)
{
if
(
res
.
getResourceSwitch
().
intValue
()
==
0
)
{
resourceCodeList
.
add
(
res
.
getResourceCode
());
}
}
//如果没有开启商品资源开关,需要过滤一些菜单
//查询配置页面
List
<
TabSysBusinessFrontRes
>
resourceList
=
businessFrontResService
.
listByParam
(
null
,
1
);
if
(
CollectionUtils
.
isNotEmpty
(
r
esourceList
))
{
for
(
TabSysBusinessFrontRes
resource
:
r
esourceList
)
{
List
<
TabSysBusinessFrontRes
>
frontResourceList
=
businessFrontResService
.
listByCode
(
resourceCodeList
,
1
);
if
(
CollectionUtils
.
isNotEmpty
(
frontR
esourceList
))
{
for
(
TabSysBusinessFrontRes
resource
:
frontR
esourceList
)
{
resourcePage
.
put
(
resource
.
getPageName
(),
1
);
}
}
...
...
gic-platform-auth-service/src/main/resources/mapper/TabSysBusinessFrontResMapper.xml
View file @
89094466
...
...
@@ -169,7 +169,10 @@
from tab_sys_business_front_res
where status = 1
and resource_type = #{resourceType}
and resource_code = #{code}
and resource_code in
<foreach
close=
")"
collection=
"codeList"
index=
"index"
item=
"item"
open=
"("
separator=
","
>
#{item}
</foreach>
</select>
<select
id=
"listGroupResourceCode"
resultMap=
"BaseResultMap"
>
...
...
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