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
cc8b73a9
Commit
cc8b73a9
authored
Oct 20, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品前置资源改成应用
parent
e46dad67
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
AppMenuCodeConstants.java
...main/java/com/gic/auth/constant/AppMenuCodeConstants.java
+1
-1
MenuApiService.java
...pi/src/main/java/com/gic/auth/service/MenuApiService.java
+8
-0
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+19
-1
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/constant/AppMenuCodeConstants.java
View file @
cc8b73a9
...
...
@@ -10,7 +10,7 @@ public class AppMenuCodeConstants {
/**
* 商品应用菜单code
*/
public
static
final
String
GOODS
=
"goods_app"
;
public
static
final
String
GOODS
_APP
=
"goods_app"
;
/**
* gic权限页面code
*/
...
...
gic-platform-auth-api/src/main/java/com/gic/auth/service/MenuApiService.java
View file @
cc8b73a9
...
...
@@ -482,6 +482,14 @@ public interface MenuApiService {
ServiceResponse
<
MenuDTO
>
getMenuByMenuCode
(
String
menuCode
);
/**
* 获取已经购买的应用
* @param menuCode 权限菜单code
* @param enterpriseId
* @return
*/
ServiceResponse
<
MenuDTO
>
getHasBuyAppByMenuCode
(
String
menuCode
,
Integer
enterpriseId
);
/**
* 同步测试菜单数据到生产
* @Title: syncProductMenu
* @Description:
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
cc8b73a9
...
...
@@ -707,6 +707,24 @@ public class MenuApiServiceImpl implements MenuApiService {
}
@Override
public
ServiceResponse
<
MenuDTO
>
getHasBuyAppByMenuCode
(
String
menuCode
,
Integer
enterpriseId
)
{
TabSysMenu
record
=
menuService
.
getMenuByMenuCode
(
menuCode
);
if
(
record
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"菜单code错误,无数据"
);
}
ServiceResponse
<
List
<
ApplicationTokenDTO
>>
appResult
=
appTokenApiService
.
listApplicationByeId
(
Long
.
valueOf
(
enterpriseId
));
if
(
appResult
.
isSuccess
())
{
List
<
ApplicationTokenDTO
>
appList
=
appResult
.
getResult
();
boolean
existApp
=
appList
.
stream
().
anyMatch
(
e
->
e
.
getApplicationId
().
toString
().
equals
(
record
.
getProject
()));
if
(
existApp
)
{
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityNew
(
MenuDTO
.
class
,
record
));
}
}
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"菜单code错误,无数据"
);
}
@Override
public
ServiceResponse
<
List
<
MenuDTO
>>
test
(
String
menuCode
)
{
TabSysMenu
tabSysMenu
=
menuService
.
getMenuByMenuCode
(
menuCode
);
List
<
TabSysMenu
>
devMenuList
=
menuService
.
listMenuTempForGic
(
menuCode
);
...
...
@@ -1373,7 +1391,7 @@ public class MenuApiServiceImpl implements MenuApiService {
private
Set
<
String
>
getBusinessFrontRes
(
Integer
enterpriseId
)
{
Set
<
String
>
resourcePage
=
new
HashSet
<>(
16
);
//商品资源获取接口调整
ServiceResponse
<
MenuDTO
>
goods
=
get
MenuByMenuCode
(
AppMenuCodeConstants
.
GOODS
);
ServiceResponse
<
MenuDTO
>
goods
=
get
HasBuyAppByMenuCode
(
AppMenuCodeConstants
.
GOODS_APP
,
enterpriseId
);
boolean
hasGoodsAuth
=
goods
.
isSuccess
();
if
(!
hasGoodsAuth
)
{
resourcePage
.
add
(
AppMenuCodeConstants
.
GOODS_GIC
);
...
...
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