diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwPortalConfig.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwPortalConfig.java index 6340da4..8ec7db5 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwPortalConfig.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwPortalConfig.java @@ -51,6 +51,14 @@ public class HwPortalConfig extends BaseEntity private String configTypeName; + + private String homeConfigTypePic; + private String homeConfigTypeIcon; + private String homeConfigTypeName; + private String homeConfigTypeClassfication; + private Long parentId; + private String ancestors; + public void setPortalConfigId(Long portalConfigId) { this.portalConfigId = portalConfigId; @@ -141,6 +149,55 @@ public class HwPortalConfig extends BaseEntity this.configTypeName = configTypeName; } + + public String getHomeConfigTypePic() { + return homeConfigTypePic; + } + + public void setHomeConfigTypePic(String homeConfigTypePic) { + this.homeConfigTypePic = homeConfigTypePic; + } + + public String getHomeConfigTypeIcon() { + return homeConfigTypeIcon; + } + + public void setHomeConfigTypeIcon(String homeConfigTypeIcon) { + this.homeConfigTypeIcon = homeConfigTypeIcon; + } + + public String getHomeConfigTypeName() { + return homeConfigTypeName; + } + + public void setHomeConfigTypeName(String homeConfigTypeName) { + this.homeConfigTypeName = homeConfigTypeName; + } + + public String getHomeConfigTypeClassfication() { + return homeConfigTypeClassfication; + } + + public void setHomeConfigTypeClassfication(String homeConfigTypeClassfication) { + this.homeConfigTypeClassfication = homeConfigTypeClassfication; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public String getAncestors() { + return ancestors; + } + + public void setAncestors(String ancestors) { + this.ancestors = ancestors; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -156,6 +213,13 @@ public class HwPortalConfig extends BaseEntity .append("createBy", getCreateBy()) .append("updateTime", getUpdateTime()) .append("updateBy", getUpdateBy()) + .append("configTypeName", getConfigTypeName()) + .append("homeConfigTypePic", getHomeConfigTypePic()) + .append("homeConfigTypeIcon", getHomeConfigTypeIcon()) + .append("homeConfigTypeName", getHomeConfigTypeName()) + .append("homeConfigTypeClassfication", getHomeConfigTypeClassfication()) + .append("parentId", getParentId()) + .append("ancestors", getAncestors()) .toString(); } } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwProductInfoDetail.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwProductInfoDetail.java index 52411d3..dc5dc4b 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwProductInfoDetail.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwProductInfoDetail.java @@ -29,6 +29,10 @@ public class HwProductInfoDetail extends TreeEntity @Excel(name = "配置模式(1图标 +文字+内容横铺4个2左标题+内容,右图片;3左图标,右标题+内容,一行2个;4左大图右标题+内容,一行2个;5上标题+下图片,6上标题+内容,下图片;7图标标题内容,一行3个,8一张图9上图下内容,一行4个);针对右children时配置的") private String configModal; + /** 配置模式(1图标 +文字+内容横铺4个2左标题+内容,右图片;3左图标,右标题+内容,一行2个;4左大图右标题+内容,一行2个;5上标题+下图片,6上标题+内容,下图片;7图标标题内容,一行3个,8一张图9上图下内容,一行4个);针对右children时配置的 */ + @Excel(name = "配置模式(1图标 +文字+内容横铺4个2左标题+内容,右图片;3左图标,右标题+内容,一行2个;4左大图右标题+内容,一行2个;5上标题+下图片,6上标题+内容,下图片;7图标标题内容,一行3个,8一张图9上图下内容,一行4个);针对右children时配置的") + private String configModel; + /** 标题 */ @Excel(name = "标题") private String productInfoDetailTitle; @@ -120,6 +124,13 @@ public class HwProductInfoDetail extends TreeEntity this.hwProductInfoDetailList = hwProductInfoDetailList; } + public String getConfigModel() { + return configModel; + } + + public void setConfigModel(String configModel) { + this.configModel = configModel; + } @Override public String toString() { diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwPortalConfigMapper.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwPortalConfigMapper.java index 6cb3d47..7175f7d 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwPortalConfigMapper.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwPortalConfigMapper.java @@ -69,4 +69,13 @@ public interface HwPortalConfigMapper public List selectHwPortalConfigJoinList(HwPortalConfig hwPortalConfig); + /** + * 查询门户网站配置列表 + * + * @param hwPortalConfig 门户网站配置 + * @return 门户网站配置集合 + */ + public List selectHwPortalConfigList2(HwPortalConfig hwPortalConfig); + + } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigServiceImpl.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigServiceImpl.java index c5c63b2..fb882cc 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigServiceImpl.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigServiceImpl.java @@ -42,6 +42,10 @@ public class HwPortalConfigServiceImpl implements IHwPortalConfigService @Override public List selectHwPortalConfigList(HwPortalConfig hwPortalConfig) { + if("2".equals(hwPortalConfig.getPortalConfigType())){ + List hwPortalConfigs = hwPortalConfigMapper.selectHwPortalConfigList2(hwPortalConfig); + return hwPortalConfigs; + } return hwPortalConfigMapper.selectHwPortalConfigList(hwPortalConfig); } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoServiceImpl.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoServiceImpl.java index 4e4188b..7d00b7a 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoServiceImpl.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoServiceImpl.java @@ -123,6 +123,17 @@ public class HwProductInfoServiceImpl implements IHwProductInfoService } } } + + for (HwProductInfo productInfo : hwProductInfoJoinDetailList) { + List hwProductInfoDetailList = productInfo.getHwProductInfoDetailList(); + for (HwProductInfoDetail hwProductInfoDetail : hwProductInfoDetailList) { + if ("13".equals(hwProductInfoDetail.getConfigModel())){ + // 将每个产品信息的明细列表转换为树形结构 + List treeStructureList = buildProductInfoDetailTree(productInfo.getHwProductInfoDetailList()); + productInfo.setHwProductInfoDetailList(treeStructureList); + } + } + } return hwProductInfoJoinDetailList; } diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwPortalConfigMapper.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwPortalConfigMapper.xml index 4e39e7d..b0f9fd3 100644 --- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwPortalConfigMapper.xml +++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwPortalConfigMapper.xml @@ -21,8 +21,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + + + + + + + + + + + + + + + + - select portal_config_id, portal_config_type,portal_config_type_id, portal_config_title, portal_config_order, portal_config_desc, button_name, router_address, portal_config_pic, create_time, create_by, update_time, update_by from hw_portal_config + select portal_config_id, portal_config_type,portal_config_type_id, portal_config_title, portal_config_order, + portal_config_desc, button_name, router_address, portal_config_pic, create_time, create_by, update_time, + update_by + from hw_portal_config + + + + select hpc.portal_config_id, hpc.portal_config_type,hpc.portal_config_type_id, hpc.portal_config_title, hpc.portal_config_order, + hpc.portal_config_desc, hpc.button_name, hpc.router_address, hpc.portal_config_pic, hpc.create_time, hpc.create_by, hpc.update_time, + hpc.update_by, + hpct.config_type_name, + hpct.home_config_type_pic, + hpct.config_type_icon, + hpct.home_config_type_name, + hpct.config_type_classfication, + hpct.parent_id, + hpct.ancestors + from hw_portal_config hpc + left join hw_portal_config_type hpct on hpc.portal_config_type_id = hpct.config_type_id + + select a.product_info_id, a.config_type_id, a.tab_flag, a.config_modal, a.product_info_etitle, a.product_info_ctitle, a.product_info_order, a.create_time, a.create_by, a.update_time, a.update_by, - b.product_info_detail_id as sub_product_info_detail_id, b.parent_id as sub_parent_id, b.product_info_id as sub_product_info_id, b.product_info_detail_title as sub_product_info_detail_title, b.product_info_detail_desc as sub_product_info_detail_desc, b.product_info_detail_order as sub_product_info_detail_order, b.product_info_detail_pic as sub_product_info_detail_pic, b.ancestors as sub_ancestors, b.create_time as sub_create_time, b.create_by as sub_create_by, b.update_time as sub_update_time, b.update_by as sub_update_by + b.product_info_detail_id as sub_product_info_detail_id, b.parent_id as sub_parent_id, b.product_info_id as sub_product_info_id, b.product_info_detail_title as sub_product_info_detail_title, b.product_info_detail_desc as sub_product_info_detail_desc, b.product_info_detail_order as sub_product_info_detail_order, b.product_info_detail_pic as sub_product_info_detail_pic, b.ancestors as sub_ancestors, b.create_time as sub_create_time, b.create_by as sub_create_by, b.update_time as sub_update_time, b.update_by as sub_update_by, + b.config_modal AS config_model from hw_product_info a left join hw_product_info_detail b on b.product_info_id = a.product_info_id