doum
2025-09-23 bcadfb6de692c138774688efd7928a973d59860f
server/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java
@@ -242,9 +242,11 @@
        if(objIndex == null){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        String flt = objIndex.getTemplate();//模版名称
        String html = objIndex.getHtml();//页面名称
        String domain = queryByCode(Constants.SYSTEM,Constants.WEB_DOMAIN).getCode();
        String gitUrl = queryByCode(Constants.SYSTEM,Constants.GIT_CODR_URL).getCode();
        String htmlPath = queryByCode(Constants.SYSTEM,Constants.STATIC_PAGES_PATH).getCode();
//          domain = ".";
//          htmlPath = "D://static/";
@@ -254,12 +256,17 @@
        }
        Map<String,Object> dataMap = new HashMap<>();
        dataMap.put("webDomain",domain);
        dataMap.put("gitCodeUrl",gitUrl);
        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(objIndex,dataMap);
        initDataMapByPage(dataMap);
        if(objIndex.getKey() == Constants.PageIndex.dynamicsDetail.getKey() || objIndex.getKey() == Constants.PageIndex.casesDetail.getKey() ){
            File f = new File(htmlPath+"dynamics/");
            if(!f.exists()){
                f.mkdirs();
            }
            List<Information> dataList =getInfomationListByType(objIndex.getKey() == Constants.PageIndex.dynamicsDetail.getKey() ?Constants.ZERO:Constants.ONE,null);
            generateDetailsHtml(dataList,dataMap,flt,htmlPath+html);//单文件数据
        }else
@@ -283,6 +290,75 @@
                //所属模块 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);
        }
        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());
        dataMap.put("template",flt);
        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.dynamicDetail.getKey() || objIndex.getKey() == Constants.PageIndex.casesDetail.getKey() ){
            File f = new File(htmlPath+"dynamics/");
            if(!f.exists()){
                f.mkdirs();
            }
            List<Information> dataList =getInfomationListByType(objIndex.getKey() == Constants.MobilePageIndex.dynamicDetail.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() ){
            List<Information> zixunList =  getInfomationListByType( Constants.ZERO,null);
            //所属模块 0行业资讯、1运营经验、2功能介绍、3市场信息
            dataMap.put("gongnengJs", getModelListFromListByModule( zixunList ,Constants.TWO));
            dataMap.put("hangyeZx", getModelListFromListByModule( zixunList ,Constants.ZERO));
            dataMap.put("shichangXx", getModelListFromListByModule( zixunList ,Constants.THREE));
            for (int i = 0; i < 4; i++) {
                dataMap.put("pageTitle",i==0?"行业资讯":(i==1?"运营经验":(i==2?"功能介绍":"市场信息")));
                dataMap.put("dataList", getModelListFromListByModule( zixunList,i));
                generateSingleHtml(dataMap,flt,htmlPath+(html.replace("${type}",i+"")));//单文件数据
            }
        }else{
            if(objIndex.getKey() == Constants.MobilePageIndex.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));
            }
            if(objIndex.getKey() == Constants.MobilePageIndex.index.getKey()
                    ||objIndex.getKey() == Constants.MobilePageIndex.dynamicIndex.getKey()){
                //如果是首页
                List<Information> zixunList =  getInfomationListByType( Constants.ZERO,null);
                //所属模块 0行业资讯、1运营经验、2功能介绍、3市场信息
                dataMap.put("yunyingJy", getModelListFromListByModule( zixunList ,Constants.ONE));
                dataMap.put("gongnengJs", getModelListFromListByModule( zixunList ,Constants.TWO));
                dataMap.put("hangyeZx", getModelListFromListByModule( zixunList ,Constants.ZERO));
                dataMap.put("shichangXx", getModelListFromListByModule( zixunList ,Constants.THREE));
            }
@@ -346,6 +422,10 @@
        }
        for(Information data :dataList){
            dataMap.put("data",data);
            if(Constants.equalsInteger(data.getType(),Constants.ZERO)){
                int i = Constants.formatIntegerNum(data.getModule());
                dataMap.put("pageTitle",i==0?"行业资讯":(i==1?"运营经验":(i==2?"功能介绍":"市场信息")));
            }
            String tt =htmlPath.replace("${id}",data.getId()+"");
            generateSingleHtml(dataMap,flt,tt);//单文件数据
        }
@@ -380,7 +460,7 @@
        }
    }
    private void initDataMapByPage(Constants.PageIndex objIndex, Map<String, Object> dataMap) {
    private void initDataMapByPage(Map<String, Object> dataMap) {
        dataMap.put("bottom", getFoodDataVO());//网站底部信息
    }
@@ -401,6 +481,12 @@
        String path = findDictDataByLabel(dictDataList,Constants.FILE_DIR);
        footDataVO.setFileDir(path);
        footDataVO.setFootWords(findDictDataByLabel(dictDataList,Constants.FOOT_WORDS));
        String temp = footDataVO.getFootWords();
        footDataVO.setFootWords1(temp);
        if(StringUtils.indexOf(temp,"dmtt.run")>0){
            footDataVO.setFootWords1(temp.substring(0,StringUtils.indexOf(temp,"dmtt.run")));
            footDataVO.setFootWords2(temp.substring(StringUtils.indexOf(temp,"dmtt.run") + "dmtt.run".length()));
        }
        footDataVO.setQyemail(findDictDataByLabel(dictDataList,Constants.QYEMAIL));
        footDataVO.setFootImgUrl(findDictDataByLabel(dictDataList,Constants.FOOT_IMGURL));
        footDataVO.setFootFullImgUrl(path+ footDataVO.getFootImgUrl());
@@ -429,7 +515,6 @@
        return footDataVO;
    }
    private String findDictDataByLabel(List<SystemDictData> dictDataList, String footWords) {
        if(dictDataList!=null){
            for(SystemDictData data:dictDataList){