| | |
| | | String html = objIndex.getHtml();//页面名称 |
| | | String domain = queryByCode(Constants.SYSTEM,Constants.WEB_DOMAIN).getCode(); |
| | | String htmlPath = queryByCode(Constants.SYSTEM,Constants.STATIC_PAGES_PATH).getCode(); |
| | | // domain = "."; |
| | | // htmlPath = "D://static/"; |
| | | File docFile = new File( htmlPath); |
| | | if(!docFile.exists()){ |
| | | docFile.mkdirs(); |
| | |
| | | if(objIndex.getKey() == Constants.PageIndex.dynamicsDetail.getKey() || objIndex.getKey() == Constants.PageIndex.casesDetail.getKey() ){ |
| | | List<Information> dataList =getInfomationListByType(objIndex.getKey() == Constants.PageIndex.dynamicsDetail.getKey() ?Constants.ZERO:Constants.ONE,null); |
| | | generateDetailsHtml(dataList,dataMap,flt,htmlPath+html);//单文件数据 |
| | | }else |
| | | if(objIndex.getKey() == Constants.PageIndex.bannerDetails.getKey() ){ |
| | | List<Carousel> dataList = carouselMapper.selectList(new LambdaQueryWrapper<Carousel>() |
| | | .eq(Carousel::getIsdeleted,Constants.ZERO) |
| | | .eq(Carousel::getJumpType,Constants.ONE)//外链 |
| | | .orderByDesc(Carousel::getSortnum ,Carousel::getCreateDate)); |
| | | generateBannerDetailsHtml(dataList,dataMap,flt,htmlPath+html);//单文件数据 |
| | | }else{ |
| | | if(objIndex.getKey() == Constants.PageIndex.dynamics.getKey() || objIndex.getKey() == Constants.PageIndex.casesDetail.getKey() ){ |
| | | dataMap.put("dataList", getInfomationListByType(objIndex.getKey() == Constants.PageIndex.dynamics.getKey() ?Constants.ZERO:Constants.ONE,null)); |
| | |
| | | generateSingleHtml(dataMap,flt,tt);//单文件数据 |
| | | } |
| | | } |
| | | private void generateBannerDetailsHtml(List<Carousel> dataList, Map<String, Object> dataMap, String flt, String htmlPath) { |
| | | if(dataList== null){ |
| | | return; |
| | | } |
| | | for(Carousel data :dataList){ |
| | | dataMap.put("data",data); |
| | | String tt =htmlPath.replace("${id}",data.getId()+""); |
| | | generateSingleHtml(dataMap,flt,tt);//单文件数据 |
| | | } |
| | | } |
| | | |
| | | private void generateSingleHtml(Map<String, Object> dataMap, String flt, String htmlPath) { |
| | | try { |
| | |
| | | String path = findDictDataByLabel(dictDataList,Constants.FILE_DIR); |
| | | footDataVO.setFileDir(path); |
| | | footDataVO.setFootWords(findDictDataByLabel(dictDataList,Constants.FOOT_WORDS)); |
| | | footDataVO.setQyemail(findDictDataByLabel(dictDataList,Constants.QYEMAIL)); |
| | | footDataVO.setFootImgUrl(findDictDataByLabel(dictDataList,Constants.FOOT_IMGURL)); |
| | | footDataVO.setFootFullImgUrl(path+ footDataVO.getFootImgUrl()); |
| | | footDataVO.setFootImgUrl2(findDictDataByLabel(dictDataList,Constants.FOOT_IMGURL2)); |
| | |
| | | if(Objects.nonNull(wisdomSystem) & org.apache.commons.lang3.StringUtils.isNotBlank(honors)){ |
| | | footDataVO.setHonors(JSONArray.parseArray(honors)); |
| | | } |
| | | String qylinks = findDictDataByLabel(dictDataList,Constants.YQLINKS); |
| | | if(Objects.nonNull(qylinks) & org.apache.commons.lang3.StringUtils.isNotBlank(qylinks)){ |
| | | footDataVO.setYqlinks(JSONArray.parseArray(qylinks)); |
| | | } |
| | | footDataVO.setServerTime(findDictDataByLabel(dictDataList,Constants.SERVER_TIME)); |
| | | |
| | | return footDataVO; |