Commit 3d8f54de by guojuxing

查询应用数据,原来的appId会不停变化,采用模块code

parent 626776aa
......@@ -543,18 +543,22 @@ public class MenuApiServiceImpl implements MenuApiService {
if (appListResponse.isSuccess()) {
List<ApplicationDTO> appList = appListResponse.getResult();
for (ApplicationDTO app : appList) {
if (StringUtils.isBlank(app.getModuleCode())) {
//没有唯一code,则不存数据
continue;
}
if (appMenu.containsKey(app.getApplicationId().toString())) {
//如果已存在,则更新版本信息
MenuDTO menuDTO = new MenuDTO();
menuDTO.setMenuName(app.getName());
menuDTO.setProject(app.getApplicationId().toString());
menuDTO.setProject(app.getModuleCode());
setMenuVersion(app.getPropDTOList(), menuDTO);
menuDTO.setMenuId(appMenu.get(app.getApplicationId().toString()).getMenuId());
menuService.updatePage(menuDTO);
} else {
MenuDTO menuDTO = new MenuDTO();
menuDTO.setMenuName(app.getName());
menuDTO.setProject(app.getApplicationId().toString());
menuDTO.setProject(app.getModuleCode());
setMenuVersion(app.getPropDTOList(), menuDTO);
setNormalFieldValue(menuDTO);
menuService.savePage(menuDTO);
......@@ -563,6 +567,14 @@ public class MenuApiServiceImpl implements MenuApiService {
}
}
/**
* 商户已购买的应用,变成一级菜单
* @Title: saveHasBuyAppMenu

* @Description:

 * @author guojuxing
* @param hasBuyAppList

* @return void


 */
private void saveHasBuyAppMenu(List<ApplicationDTO> hasBuyAppList) {
Map<String, TabSysMenu> appMenu = getFirstLevelAppMenu();
for (ApplicationDTO app : hasBuyAppList) {
......@@ -653,7 +665,7 @@ public class MenuApiServiceImpl implements MenuApiService {
StringBuilder menuVersion = new StringBuilder(SignConstants.UNDERLINE);
StringBuilder menuVersionName = new StringBuilder();
for (ServePropDTO propDTO : serviceList) {
menuVersion.append(propDTO.getPropId()).append(SignConstants.UNDERLINE);
menuVersion.append(propDTO.getCode()).append(SignConstants.UNDERLINE);
menuVersionName.append(propDTO.getName()).append(SignConstants.SLASH);
}
menuDTO.setMenuVersion(menuVersion.toString());
......
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