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
1e873f59
Commit
1e873f59
authored
Oct 23, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用列表接口调整:区分是gic应用还是好办应用
parent
f3ffdf70
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
11 deletions
+60
-11
MenuPlatformTypeEnum.java
...main/java/com/gic/auth/constant/MenuPlatformTypeEnum.java
+41
-0
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+19
-11
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/constant/MenuPlatformTypeEnum.java
0 → 100644
View file @
1e873f59
package
com
.
gic
.
auth
.
constant
;
/**
* 权限菜单平台类型
* @ClassName: MenuPlatformTypeEnum
* @Description:
* @author guojuxing
* @date 2020/10/23 9:52 AM
*/
public
enum
MenuPlatformTypeEnum
{
GIC
(
0
,
"gic"
),
HAOBAN_PC
(
1
,
"好办后台"
),
HAOBAN_APPLET
(
2
,
"好办小程序"
),
HAOBAN_APP
(
3
,
"好办应用"
),
HAOBAN_APPLET_APP
(
4
,
"好办小程序应用"
);
private
Integer
code
;
private
String
message
;
private
MenuPlatformTypeEnum
(
Integer
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
Integer
getCode
()
{
return
code
;
}
public
MenuPlatformTypeEnum
setCode
(
Integer
code
)
{
this
.
code
=
code
;
return
this
;
}
public
String
getMessage
()
{
return
message
;
}
public
MenuPlatformTypeEnum
setMessage
(
String
message
)
{
this
.
message
=
message
;
return
this
;
}
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
1e873f59
...
@@ -955,7 +955,7 @@ public class MenuApiServiceImpl implements MenuApiService {
...
@@ -955,7 +955,7 @@ public class MenuApiServiceImpl implements MenuApiService {
*/
*/
private
void
saveAppMenu
()
{
private
void
saveAppMenu
()
{
ServiceResponse
<
List
<
ApplicationDTO
>>
appListResponse
=
applicationApiService
.
listApplicationAndServeProp
();
ServiceResponse
<
List
<
ApplicationDTO
>>
appListResponse
=
applicationApiService
.
listApplicationAndServeProp
();
Map
<
String
,
TabSysMenu
>
appMenu
=
getFirstLevelAppMenu
();
Map
<
String
,
Integer
>
appMenu
=
getFirstLevelAppMenu
();
if
(
appListResponse
.
isSuccess
())
{
if
(
appListResponse
.
isSuccess
())
{
List
<
ApplicationDTO
>
appList
=
appListResponse
.
getResult
();
List
<
ApplicationDTO
>
appList
=
appListResponse
.
getResult
();
//删除已经不存在的应用
//删除已经不存在的应用
...
@@ -974,7 +974,7 @@ public class MenuApiServiceImpl implements MenuApiService {
...
@@ -974,7 +974,7 @@ public class MenuApiServiceImpl implements MenuApiService {
menuDTO
.
setProject
(
app
.
getApplicationId
().
toString
());
menuDTO
.
setProject
(
app
.
getApplicationId
().
toString
());
setMenuVersion
(
app
.
getPropDTOList
(),
app
.
getServeExpanList
(),
menuDTO
);
setMenuVersion
(
app
.
getPropDTOList
(),
app
.
getServeExpanList
(),
menuDTO
);
// setMenuAuthType(menuDTO);
// setMenuAuthType(menuDTO);
menuDTO
.
setMenuId
(
appMenu
.
get
(
app
.
getApplicationId
().
toString
())
.
getMenuId
()
);
menuDTO
.
setMenuId
(
appMenu
.
get
(
app
.
getApplicationId
().
toString
()));
menuService
.
updatePage
(
menuDTO
);
menuService
.
updatePage
(
menuDTO
);
}
else
{
}
else
{
MenuDTO
menuDTO
=
new
MenuDTO
();
MenuDTO
menuDTO
=
new
MenuDTO
();
...
@@ -985,8 +985,8 @@ public class MenuApiServiceImpl implements MenuApiService {
...
@@ -985,8 +985,8 @@ public class MenuApiServiceImpl implements MenuApiService {
setNormalFieldValue
(
menuDTO
);
setNormalFieldValue
(
menuDTO
);
//3:好办应用
//3:好办应用
Integer
appType
=
app
.
getAppType
();
Integer
appType
=
app
.
getAppType
();
boolean
isGicApp
=
appType
==
null
||
app
.
getAppType
()
==
0
;
boolean
isGicApp
=
appType
==
null
||
app
.
getAppType
()
.
equals
(
MenuPlatformTypeEnum
.
GIC
.
getCode
())
;
menuDTO
.
setPlatformType
(
isGicApp
?
0
:
3
);
menuDTO
.
setPlatformType
(
isGicApp
?
MenuPlatformTypeEnum
.
GIC
.
getCode
()
:
MenuPlatformTypeEnum
.
HAOBAN_APP
.
getCode
()
);
menuService
.
savePage
(
menuDTO
);
menuService
.
savePage
(
menuDTO
);
}
}
}
}
...
@@ -1035,18 +1035,26 @@ public class MenuApiServiceImpl implements MenuApiService {
...
@@ -1035,18 +1035,26 @@ public class MenuApiServiceImpl implements MenuApiService {
}
}
/**
/**
* 获取应用第一级菜单(应用列表)
* 获取应用第一级菜单(应用列表)
(gic和好办应用)
* @return
* @return
*/
*/
private
Map
<
String
,
TabSysMenu
>
getFirstLevelAppMenu
()
{
private
Map
<
String
,
Integer
>
getFirstLevelAppMenu
()
{
MenuListQO
params
=
new
MenuListQO
();
MenuListQO
params
=
new
MenuListQO
();
params
.
setIsGIC
(
MenuProjectConstants
.
APP_PROJECT_CODE
);
params
.
setIsGIC
(
MenuProjectConstants
.
APP_PROJECT_CODE
);
params
.
setLevel
(
MenuLevelConstants
.
FIRST_LEVEL
);
params
.
setLevel
(
MenuLevelConstants
.
FIRST_LEVEL
);
List
<
TabSysMenu
>
menuList
=
menuService
.
listMenu
(
params
);
params
.
setPlatformType
(
MenuPlatformTypeEnum
.
GIC
.
getCode
());
Map
<
String
,
TabSysMenu
>
map
=
new
HashMap
<>(
16
);
List
<
TabSysMenu
>
menuListOfGic
=
menuService
.
listMenu
(
params
);
if
(
menuList
!=
null
)
{
Map
<
String
,
Integer
>
map
=
new
HashMap
<>(
16
);
for
(
TabSysMenu
menu
:
menuList
)
{
if
(
menuListOfGic
!=
null
)
{
map
.
put
(
menu
.
getProject
(),
menu
);
for
(
TabSysMenu
menu
:
menuListOfGic
)
{
map
.
put
(
menu
.
getProject
(),
menu
.
getMenuId
());
}
}
params
.
setPlatformType
(
MenuPlatformTypeEnum
.
HAOBAN_APP
.
getCode
());
List
<
TabSysMenu
>
menuListOfHaoBanApp
=
menuService
.
listMenu
(
params
);
if
(
menuListOfHaoBanApp
!=
null
)
{
for
(
TabSysMenu
menu
:
menuListOfHaoBanApp
)
{
map
.
put
(
menu
.
getProject
(),
menu
.
getMenuId
());
}
}
}
}
return
map
;
return
map
;
...
...
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