|
@ -48,22 +48,28 @@ public class HomeServiceImpl implements HomeService { |
|
|
HomeDesignByCustomerResultDTO resultDTO = new HomeDesignByCustomerResultDTO(); |
|
|
HomeDesignByCustomerResultDTO resultDTO = new HomeDesignByCustomerResultDTO(); |
|
|
//根据客户id,所属端获取客户首页配置的设计稿
|
|
|
//根据客户id,所属端获取客户首页配置的设计稿
|
|
|
List<CommonComponentDesignResultDTO> list = customerHomeDetailDao.getCustomerHomeDetailComponent(formDTO); |
|
|
List<CommonComponentDesignResultDTO> list = customerHomeDetailDao.getCustomerHomeDetailComponent(formDTO); |
|
|
List<CommonComponentDesignResultDTO> flist=new ArrayList<CommonComponentDesignResultDTO>();//功能组件列表
|
|
|
List<CommonComponentDesignResultDTO> titlelist=new ArrayList<CommonComponentDesignResultDTO>(); |
|
|
|
|
|
List<CommonComponentDesignResultDTO> toplist=new ArrayList<CommonComponentDesignResultDTO>(); |
|
|
|
|
|
List<CommonComponentDesignResultDTO> functionlist=new ArrayList<CommonComponentDesignResultDTO>(); |
|
|
|
|
|
List<CommonComponentDesignResultDTO> floatlist=new ArrayList<CommonComponentDesignResultDTO>(); |
|
|
List<String> usedComponent=new ArrayList<>();//使用过的组件集合
|
|
|
List<String> usedComponent=new ArrayList<>();//使用过的组件集合
|
|
|
for(CommonComponentDesignResultDTO c:list){ |
|
|
for(CommonComponentDesignResultDTO c:list){ |
|
|
usedComponent.add(c.getComponentId()); |
|
|
usedComponent.add(c.getComponentId()); |
|
|
//所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区
|
|
|
//所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区
|
|
|
if(ReginConstant.titleList.equals(c.getRegion())){ |
|
|
if(ReginConstant.titleList.equals(c.getRegion())){ |
|
|
resultDTO.setTitleList(c); |
|
|
titlelist.add(c); |
|
|
}else if(ReginConstant.topList.equals(c.getRegion())){ |
|
|
}else if(ReginConstant.topList.equals(c.getRegion())){ |
|
|
resultDTO.setTopList(c); |
|
|
toplist.add(c); |
|
|
}else if(ReginConstant.functionList.equals(c.getRegion())){ |
|
|
}else if(ReginConstant.functionList.equals(c.getRegion())){ |
|
|
flist.add(c); |
|
|
functionlist.add(c); |
|
|
}else if(ReginConstant.floatingList.equals(c.getRegion())){ |
|
|
}else if(ReginConstant.floatingList.equals(c.getRegion())){ |
|
|
resultDTO.setFloatingList(c); |
|
|
floatlist.add(c); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
resultDTO.setFunctionList(flist); |
|
|
resultDTO.setTitleList(titlelist); |
|
|
|
|
|
resultDTO.setTopList(toplist); |
|
|
|
|
|
resultDTO.setFloatingList(floatlist); |
|
|
|
|
|
resultDTO.setFunctionList(functionlist); |
|
|
resultDTO.setUsedComponentIdList(usedComponent); |
|
|
resultDTO.setUsedComponentIdList(usedComponent); |
|
|
return new Result<HomeDesignByCustomerResultDTO>().ok(resultDTO); |
|
|
return new Result<HomeDesignByCustomerResultDTO>().ok(resultDTO); |
|
|
} |
|
|
} |
|
|