Commit 50156c01 authored by 廖旭伟's avatar 廖旭伟

修改应用集市数据字典appThemeName获取来源

parent d0c68fc0
......@@ -2,7 +2,6 @@ package com.mortals.xhx.module.app.web;
import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.util.ZipUtil;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
......@@ -31,10 +30,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import static com.mortals.xhx.common.key.Constant.CUSTAPP_ROOT_PATH;
......@@ -66,7 +62,7 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "type", AppTypeEnum.getEnumMap());
this.addDict(model, "shelves", paramService.getParamBySecondOrganize("App", "shelves"));
this.addDict(model, "appThemeName", paramService.getParamBySecondOrganize("App", "appThemeName"));
//this.addDict(model, "appThemeName", paramService.getParamBySecondOrganize("App", "appThemeName"));
this.addDict(model, "distribute", YesNoEnum.getEnumMap());
this.addDict(model, "dateUpdate", YesNoEnum.getEnumMap());
super.init(model, context);
......@@ -106,6 +102,11 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
List<AppCategoryEntity> appCategoryEntities = appCategoryService.find(appCategoryQuery);
if (!ObjectUtils.isEmpty(appCategoryEntities)) {
model.put("appCategory", appCategoryEntities);
Map<String,Object> appThemeName = new HashMap<>();
for (AppCategoryEntity appCategory:appCategoryEntities){
appThemeName.put(appCategory.getId().toString(),appCategory.getCategoryName());
}
this.addDict(model, "appThemeName", appThemeName);
}
}
return super.doListAfter(query, model, context);
......
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