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
26779386
Commit
26779386
authored
Oct 11, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gic版本修正:通过查询开放平台接口获取数据
parent
d0e78905
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+28
-2
dubbo-gic-platform-auth-service.xml
...ce/src/main/resources/dubbo-gic-platform-auth-service.xml
+1
-0
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
26779386
...
...
@@ -2,6 +2,7 @@ package com.gic.auth.service.outer.impl;
import
java.util.*
;
import
com.gic.open.api.service.ServeApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -50,6 +51,8 @@ public class MenuApiServiceImpl implements MenuApiService {
private
MenuRoleService
menuRoleService
;
@Autowired
private
AppTokenApiService
appTokenApiService
;
@Autowired
private
ServeApiService
serveApiService
;
@Override
public
ServiceResponse
<
List
<
MenuDTO
>>
listByMenuIdList
(
List
<
Integer
>
menuIdList
)
{
...
...
@@ -632,18 +635,20 @@ public class MenuApiServiceImpl implements MenuApiService {
* 设置版本ID和版本名称字段值
* @param menuDTO 必须有project值
*/
private
static
void
setMenuVersion
(
MenuDTO
menuDTO
)
{
private
void
setMenuVersion
(
MenuDTO
menuDTO
)
{
if
(
MenuProjectConstants
.
DEFAULT_PROJECT
.
equals
(
menuDTO
.
getProject
()))
{
menuDTO
.
setMenuVersion
(
SignConstants
.
UNDERLINE
+
menuDTO
.
getMenuVersion
().
replaceAll
(
SignConstants
.
COMMA
,
SignConstants
.
UNDERLINE
)
+
SignConstants
.
UNDERLINE
);
String
[]
menuVersionArr
=
menuDTO
.
getMenuVersion
().
split
(
SignConstants
.
UNDERLINE
);
StringBuilder
result
=
new
StringBuilder
();
Map
<
String
,
String
>
gicDefaultVersion
=
getGicDefaultVersion
();
for
(
String
str
:
menuVersionArr
)
{
if
(
StringUtils
.
isBlank
(
str
))
{
continue
;
}
result
.
append
(
GicVersionEnum
.
getMessageByCode
(
Integer
.
parseInt
(
str
)
)).
append
(
SignConstants
.
SLASH
);
result
.
append
(
gicDefaultVersion
.
get
(
str
)).
append
(
SignConstants
.
SLASH
);
}
String
menuVersionStr
=
result
.
toString
();
menuDTO
.
setMenuVersionName
(
menuVersionStr
.
substring
(
0
,
menuVersionStr
.
length
()
-
1
));
...
...
@@ -867,4 +872,25 @@ 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
;
}
}
gic-platform-auth-service/src/main/resources/dubbo-gic-platform-auth-service.xml
View file @
26779386
...
...
@@ -32,6 +32,7 @@
<dubbo:reference
interface=
"com.gic.open.api.service.ApplicationApiService"
id=
"applicationApiService"
timeout=
"6000"
/>
<!--应用市场应用列表-->
<dubbo:reference
interface=
"com.gic.open.api.service.AppTokenApiService"
id=
"appTokenApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.open.api.service.ServeApiService"
id=
"serveApiService"
timeout=
"60000"
/>
<!--审核员-->
<dubbo:service
interface=
"com.gic.auth.service.AuditorApiService"
ref=
"auditorApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.ProjectItemApiService"
id=
"projectItemApiService"
timeout=
"6000"
/>
...
...
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