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
cef2640f
Commit
cef2640f
authored
Oct 11, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gic版本修正:通过查询开放平台接口获取数据
parent
f8519ce1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
22 deletions
+36
-22
MenuApiService.java
...pi/src/main/java/com/gic/auth/service/MenuApiService.java
+10
-0
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+26
-22
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/service/MenuApiService.java
View file @
cef2640f
...
...
@@ -9,6 +9,8 @@ import com.gic.auth.qo.MenuListQO;
import
com.gic.auth.qo.MenuOperationItemListQO
;
import
java.util.List
;
import
java.util.Map
;
/**
* 权限树
* @ClassName: MenuApiService
...
...
@@ -256,4 +258,12 @@ public interface MenuApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.AuthItemListDTO>>
*/
ServiceResponse
<
List
<
AuthItemListDTO
>>
listAuthItemByMenuId
(
Integer
menuId
);
/**
* 获取gic基础服务的版本列表数据
* @Title: getGicDefaultVersion
* @Description:
* @author guojuxing
* @return com.gic.api.base.commons.ServiceResponse<java.util.Map<java.lang.String,java.lang.String>>
*/
ServiceResponse
<
Map
<
String
,
String
>>
getGicDefaultVersion
();
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
cef2640f
...
...
@@ -409,6 +409,30 @@ public class MenuApiServiceImpl implements MenuApiService {
return
ServiceResponse
.
success
(
authItemList
);
}
/**
* 查询gic基础服务版本列表数据
* @Title: getGicDefaultVersion
* @Description:
* @author guojuxing
* @return java.util.Map<java.lang.String,java.lang.String>
*/
@Override
public
ServiceResponse
<
Map
<
String
,
String
>>
getGicDefaultVersion
()
{
Map
<
String
,
String
>
map
=
new
HashMap
<>(
16
);
ServiceResponse
<
List
<
ServePropDTO
>>
versionListResult
=
serveApiService
.
listServePropByGICDefaultAPP
();
if
(
versionListResult
.
isSuccess
())
{
List
<
ServePropDTO
>
versionList
=
versionListResult
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
versionList
))
{
for
(
ServePropDTO
servePropDTO
:
versionList
)
{
if
(
"version"
.
equals
(
servePropDTO
.
getPropType
()))
{
map
.
put
(
servePropDTO
.
getCode
(),
servePropDTO
.
getName
());
}
}
}
}
return
ServiceResponse
.
success
(
map
);
}
private
ServiceResponse
<
Void
>
savePage
(
MenuDTO
menuDTO
,
Class
clazz
)
{
ServiceResponse
paramsValid
=
ValidParamsUtils
.
allCheckValidate
(
menuDTO
,
clazz
);
if
(!
paramsValid
.
isSuccess
())
{
...
...
@@ -643,7 +667,8 @@ public class MenuApiServiceImpl implements MenuApiService {
String
[]
menuVersionArr
=
menuDTO
.
getMenuVersion
().
split
(
SignConstants
.
UNDERLINE
);
StringBuilder
result
=
new
StringBuilder
();
Map
<
String
,
String
>
gicDefaultVersion
=
getGicDefaultVersion
();
Map
<
String
,
String
>
gicDefaultVersion
=
getGicDefaultVersion
().
getResult
();
for
(
String
str
:
menuVersionArr
)
{
if
(
StringUtils
.
isBlank
(
str
))
{
continue
;
...
...
@@ -872,25 +897,4 @@ public class MenuApiServiceImpl implements MenuApiService {
}
return
ServiceResponse
.
success
(
resultList
);
}
/**
* 查询gic基础服务版本列表数据
* @Title: getGicDefaultVersion
* @Description:
* @author guojuxing
* @return java.util.Map<java.lang.String,java.lang.String>
*/
private
Map
<
String
,
String
>
getGicDefaultVersion
()
{
Map
<
String
,
String
>
map
=
new
HashMap
<>(
16
);
ServiceResponse
<
List
<
ServePropDTO
>>
versionListResult
=
serveApiService
.
listServePropByGICDefaultAPP
();
if
(
versionListResult
.
isSuccess
())
{
List
<
ServePropDTO
>
versionList
=
versionListResult
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
versionList
))
{
for
(
ServePropDTO
servePropDTO
:
versionList
)
{
map
.
put
(
servePropDTO
.
getCode
(),
servePropDTO
.
getName
());
}
}
}
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