From 61247957fe4d94591e37d75eda6889f06c0cb9c1 Mon Sep 17 00:00:00 2001 From: doum <doum> Date: 星期五, 19 九月 2025 17:47:27 +0800 Subject: [PATCH] ss --- server/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java | 62 +++++++++++++++++++++++++++++- 1 files changed, 59 insertions(+), 3 deletions(-) diff --git a/server/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java b/server/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java index c43bd2b..9d0d0e7 100644 --- a/server/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java +++ b/server/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java @@ -242,6 +242,9 @@ if(objIndex == null){ throw new BusinessException(ResponseStatus.BAD_REQUEST); } + +// freeMarkerConfigurer.setPreferFileSystemAccess(true); +// freeMarkerConfigurer.setTemplateLoaderPath(queryByCode(Constants.SYSTEM,Constants.PAGE_TEMPLATES_PATH).getCode()); String flt = objIndex.getTemplate();//妯$増鍚嶇О String html = objIndex.getHtml();//椤甸潰鍚嶇О String domain = queryByCode(Constants.SYSTEM,Constants.WEB_DOMAIN).getCode(); @@ -258,7 +261,7 @@ List<Seo> seoList = seoMapper.selectList(new LambdaQueryWrapper<Seo>().eq(Seo::getIsdeleted,Constants.ZERO)); Seo seo =getSeoByHtml(objIndex.getTemplate(),seoList); dataMap.put("seo",seo); - initDataMapByPage(objIndex,dataMap); + initDataMapByPage(dataMap); 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);//鍗曟枃浠舵暟鎹� @@ -274,6 +277,60 @@ dataMap.put("dataList", getInfomationListByType(objIndex.getKey() == Constants.PageIndex.dynamics.getKey() ?Constants.ZERO:Constants.ONE,null)); } if(objIndex.getKey() == Constants.PageIndex.index.getKey()){ + //濡傛灉鏄椤� + dataMap.put("bannerList", carouselMapper.selectList(new LambdaQueryWrapper<Carousel>() + .eq(Carousel::getIsdeleted,Constants.ZERO) + .orderByDesc(Carousel::getSortnum ,Carousel::getCreateDate))); + dataMap.put("caseList", getInfomationListByType( Constants.ONE,null)); + List<Information> zixunList = getInfomationListByType( Constants.ZERO,null); + //鎵�灞炴ā鍧� 0琛屼笟璧勮銆�1杩愯惀缁忛獙銆�2鍔熻兘浠嬬粛銆�3甯傚満淇℃伅 + dataMap.put("yunyingJy", getModelFromListByModule( zixunList ,Constants.ONE)); + dataMap.put("gongnengJs", getModelFromListByModule( zixunList ,Constants.TWO)); + dataMap.put("hangyeZx", getModelListFromListByModule( zixunList ,Constants.ZERO)); + dataMap.put("shichangXx", getModelListFromListByModule( zixunList ,Constants.THREE)); + } + generateSingleHtml(dataMap,flt,htmlPath+html);//鍗曟枃浠舵暟鎹� + } + return null; + } + @Override + public String createMobilePage(Integer pageIndex) { + Constants.MobilePageIndex objIndex = Constants.MobilePageIndex.getObj(pageIndex); + if(objIndex == null){ + throw new BusinessException(ResponseStatus.BAD_REQUEST); + } +// freeMarkerConfigurer.setPreferFileSystemAccess(true); +// freeMarkerConfigurer.setTemplateLoaderPaths(queryByCode(Constants.SYSTEM,Constants.PAGE_TEMPLATES_PATH_MOBILE).getCode()); + String flt = objIndex.getTemplate();//妯$増鍚嶇О + String html = objIndex.getHtml();//椤甸潰鍚嶇О + String domain = queryByCode(Constants.SYSTEM,Constants.WEB_DOMAIN_MOBILE).getCode(); + String htmlPath = queryByCode(Constants.SYSTEM,Constants.STATIC_PAGES_PATH_MOBILE).getCode(); + File docFile = new File( htmlPath); + if(!docFile.exists()){ + docFile.mkdirs(); + } + Map<String,Object> dataMap = new HashMap<>(); + dataMap.put("webDomain",domain); + dataMap.put("navIndex",objIndex.getNavIndex()); + List<Seo> seoList = seoMapper.selectList(new LambdaQueryWrapper<Seo>().eq(Seo::getIsdeleted,Constants.ZERO)); + Seo seo =getSeoByHtml(objIndex.getTemplate(),seoList); + dataMap.put("seo",seo); + initDataMapByPage(dataMap); + if(objIndex.getKey() == Constants.MobilePageIndex.dynamicsDetail.getKey() || objIndex.getKey() == Constants.PageIndex.casesDetail.getKey() ){ + List<Information> dataList =getInfomationListByType(objIndex.getKey() == Constants.MobilePageIndex.dynamicsDetail.getKey() ?Constants.ZERO:Constants.ONE,null); + generateDetailsHtml(dataList,dataMap,flt,htmlPath+html);//鍗曟枃浠舵暟鎹� + }else + if(objIndex.getKey() == Constants.MobilePageIndex.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.MobilePageIndex.dynamics.getKey() || objIndex.getKey() == Constants.MobilePageIndex.casesDetail.getKey() ){ + dataMap.put("dataList", getInfomationListByType(objIndex.getKey() == Constants.MobilePageIndex.dynamics.getKey() ?Constants.ZERO:Constants.ONE,null)); + } + if(objIndex.getKey() == Constants.MobilePageIndex.index.getKey()){ //濡傛灉鏄椤� dataMap.put("bannerList", carouselMapper.selectList(new LambdaQueryWrapper<Carousel>() .eq(Carousel::getIsdeleted,Constants.ZERO) @@ -380,7 +437,7 @@ } } - private void initDataMapByPage(Constants.PageIndex objIndex, Map<String, Object> dataMap) { + private void initDataMapByPage(Map<String, Object> dataMap) { dataMap.put("bottom", getFoodDataVO());//缃戠珯搴曢儴淇℃伅 } @@ -429,7 +486,6 @@ return footDataVO; } - private String findDictDataByLabel(List<SystemDictData> dictDataList, String footWords) { if(dictDataList!=null){ for(SystemDictData data:dictDataList){ -- Gitblit v1.9.3