Commit 147d7f56 authored by 廖旭伟's avatar 廖旭伟

增加数据管理模块

parent d229e043
......@@ -18,4 +18,8 @@ import java.util.List;
public class SiteVo extends BaseEntityLong {
private List<Long> idList;
private String logoFullPath;
/** 站点包含的模块 */
private List<ModelEntity> modelList;
}
\ No newline at end of file
......@@ -6,12 +6,18 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.utils.SyncTreeSiteThread;
import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaQuery;
import com.mortals.xhx.module.area.service.AreaService;
import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.model.model.ModelQuery;
import com.mortals.xhx.module.model.service.ModelService;
import com.mortals.xhx.module.site.dao.SiteDao;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteQuery;
import com.mortals.xhx.module.site.model.SiteTreeSelect;
import com.mortals.xhx.module.site.service.SiteService;
......@@ -262,6 +268,26 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
siteTreeMap.put(context.getUser().getId(), list);
}
@Override
public List<SiteEntity> getListAllInfoByQuery(SiteQuery query, Context context) throws AppException {
List<SiteEntity> list = this.find(query,context);
if(CollectionUtils.isNotEmpty(list)){
list.stream().forEach(item->{
ModelQuery modelQuery = new ModelQuery();
List<String> modelIds = StringUtils.converStr2List(item.getModelIds());
List<Long> ids = modelIds.stream().map(s -> DataUtil.converStr2Long(s.trim(),0)).collect(Collectors.toList());
if(ids.isEmpty()){
ids.add(0l);
}
modelQuery.setIdList(ids);
List<ModelEntity> modelEntityList = modelService.find(modelQuery);
item.setModelList(modelEntityList);
});
}
return list;
}
@Override
protected void findAfter(SiteEntity params, PageInfo pageInfo, Context context, List<SiteEntity> list) throws AppException {
......
......@@ -2,6 +2,8 @@ package com.mortals.xhx.module.site.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
......@@ -171,8 +173,6 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
return super.infoAfter(id, model, entity, context);
}
public static void main(String[] args) {
//深度克隆
/**
* 包含站点下面的模块以及模块下面的数据统计
......
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