Commit cef2640f by guojuxing

gic版本修正:通过查询开放平台接口获取数据

parent f8519ce1
......@@ -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();
}
......@@ -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;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment