Commit d4005859 by guojuxing

应用权限查询修改:添加拓展包

parent c60fbf54
...@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl; ...@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl;
import java.util.*; import java.util.*;
import com.gic.enterprise.service.EnterpriseApiService; import com.gic.enterprise.service.EnterpriseApiService;
import com.gic.open.api.dto.ServeExpanDTO;
import com.gic.open.api.service.ServeApiService; import com.gic.open.api.service.ServeApiService;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -599,14 +600,14 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -599,14 +600,14 @@ public class MenuApiServiceImpl implements MenuApiService {
MenuDTO menuDTO = new MenuDTO(); MenuDTO menuDTO = new MenuDTO();
menuDTO.setMenuName(app.getName()); menuDTO.setMenuName(app.getName());
menuDTO.setProject(app.getApplicationId().toString()); menuDTO.setProject(app.getApplicationId().toString());
setMenuVersion(app.getPropDTOList(), menuDTO); setMenuVersion(app.getPropDTOList(), app.getServeExpanList(), menuDTO);
menuDTO.setMenuId(appMenu.get(app.getApplicationId().toString()).getMenuId()); menuDTO.setMenuId(appMenu.get(app.getApplicationId().toString()).getMenuId());
menuService.updatePage(menuDTO); menuService.updatePage(menuDTO);
} else { } else {
MenuDTO menuDTO = new MenuDTO(); MenuDTO menuDTO = new MenuDTO();
menuDTO.setMenuName(app.getName()); menuDTO.setMenuName(app.getName());
menuDTO.setProject(app.getApplicationId().toString()); menuDTO.setProject(app.getApplicationId().toString());
setMenuVersion(app.getPropDTOList(), menuDTO); setMenuVersion(app.getPropDTOList(), app.getServeExpanList(), menuDTO);
setNormalFieldValue(menuDTO); setNormalFieldValue(menuDTO);
menuService.savePage(menuDTO); menuService.savePage(menuDTO);
} }
...@@ -705,8 +706,8 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -705,8 +706,8 @@ public class MenuApiServiceImpl implements MenuApiService {
* @param serviceList * @param serviceList
* @param menuDTO * @param menuDTO
*/ */
private static void setMenuVersion(List<ServePropDTO> serviceList, MenuDTO menuDTO) { private static void setMenuVersion(List<ServePropDTO> serviceList, List<ServeExpanDTO> serveExpandList, MenuDTO menuDTO) {
if (serviceList == null) { if (CollectionUtils.isEmpty(serviceList)) {
return; return;
} }
StringBuilder menuVersion = new StringBuilder(SignConstants.UNDERLINE); StringBuilder menuVersion = new StringBuilder(SignConstants.UNDERLINE);
...@@ -715,6 +716,12 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -715,6 +716,12 @@ public class MenuApiServiceImpl implements MenuApiService {
menuVersion.append(propDTO.getCode()).append(SignConstants.UNDERLINE); menuVersion.append(propDTO.getCode()).append(SignConstants.UNDERLINE);
menuVersionName.append(propDTO.getName()).append(SignConstants.SLASH); menuVersionName.append(propDTO.getName()).append(SignConstants.SLASH);
} }
if (CollectionUtils.isNotEmpty(serveExpandList)) {
for (ServeExpanDTO serveExpanDTO : serveExpandList) {
menuVersion.append(serveExpanDTO.getServeExpanId().toString()).append(SignConstants.UNDERLINE);
menuVersionName.append(serveExpanDTO.getExpanName()).append(SignConstants.SLASH);
}
}
menuDTO.setMenuVersion(menuVersion.toString()); menuDTO.setMenuVersion(menuVersion.toString());
String tempMenuVersionName = menuVersionName.toString(); String tempMenuVersionName = menuVersionName.toString();
menuDTO.setMenuVersionName(tempMenuVersionName.substring(0, tempMenuVersionName.length() - 1)); menuDTO.setMenuVersionName(tempMenuVersionName.substring(0, tempMenuVersionName.length() - 1));
......
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