feat(portal): 门户网站配置和产品信息功能优化

- 在 HwPortalConfig 模型中添加新字段,用于展示在首页配置类型的相关信息
- 新增 HwPortalConfigMapper 中的 selectHwPortalConfigList2 方法,用于查询门户网站配置列表
- 更新 HwPortalConfigServiceImpl 中的 selectHwPortalConfigList 方法,增加对新配置类型的支持
- 在 HwProductInfoDetail 模型中添加 configModel 字段,用于定义配置模式
- 更新 HwProductInfoMapper.xml 中的查询语句,增加 config_model 列的返回
- 修改 HwProductInfoServiceImpl 中的查询方法,对特定配置模式进行树形结构转换
master
zch 1 week ago
parent 0ff03d2195
commit dcf432f9cc

@ -51,6 +51,14 @@ public class HwPortalConfig extends BaseEntity
private String configTypeName; 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) public void setPortalConfigId(Long portalConfigId)
{ {
this.portalConfigId = portalConfigId; this.portalConfigId = portalConfigId;
@ -141,6 +149,55 @@ public class HwPortalConfig extends BaseEntity
this.configTypeName = configTypeName; 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 @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -156,6 +213,13 @@ public class HwPortalConfig extends BaseEntity
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy()) .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(); .toString();
} }
} }

@ -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时配置的") @Excel(name = "配置模式(1图标 +文字+内容横铺4个2左标题+内容右图片3左图标右标题+内容一行2个4左大图右标题+内容一行2个5上标题+下图片6上标题+内容下图片7图标标题内容一行3个,8一张图9上图下内容一行4个);针对右children时配置的")
private String configModal; 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 = "标题") @Excel(name = "标题")
private String productInfoDetailTitle; private String productInfoDetailTitle;
@ -120,6 +124,13 @@ public class HwProductInfoDetail extends TreeEntity
this.hwProductInfoDetailList = hwProductInfoDetailList; this.hwProductInfoDetailList = hwProductInfoDetailList;
} }
public String getConfigModel() {
return configModel;
}
public void setConfigModel(String configModel) {
this.configModel = configModel;
}
@Override @Override
public String toString() { public String toString() {

@ -69,4 +69,13 @@ public interface HwPortalConfigMapper
public List<HwPortalConfig> selectHwPortalConfigJoinList(HwPortalConfig hwPortalConfig); public List<HwPortalConfig> selectHwPortalConfigJoinList(HwPortalConfig hwPortalConfig);
/**
*
*
* @param hwPortalConfig
* @return
*/
public List<HwPortalConfig> selectHwPortalConfigList2(HwPortalConfig hwPortalConfig);
} }

@ -42,6 +42,10 @@ public class HwPortalConfigServiceImpl implements IHwPortalConfigService
@Override @Override
public List<HwPortalConfig> selectHwPortalConfigList(HwPortalConfig hwPortalConfig) public List<HwPortalConfig> selectHwPortalConfigList(HwPortalConfig hwPortalConfig)
{ {
if("2".equals(hwPortalConfig.getPortalConfigType())){
List<HwPortalConfig> hwPortalConfigs = hwPortalConfigMapper.selectHwPortalConfigList2(hwPortalConfig);
return hwPortalConfigs;
}
return hwPortalConfigMapper.selectHwPortalConfigList(hwPortalConfig); return hwPortalConfigMapper.selectHwPortalConfigList(hwPortalConfig);
} }

@ -124,6 +124,17 @@ public class HwProductInfoServiceImpl implements IHwProductInfoService
} }
} }
for (HwProductInfo productInfo : hwProductInfoJoinDetailList) {
List<HwProductInfoDetail> hwProductInfoDetailList = productInfo.getHwProductInfoDetailList();
for (HwProductInfoDetail hwProductInfoDetail : hwProductInfoDetailList) {
if ("13".equals(hwProductInfoDetail.getConfigModel())){
// 将每个产品信息的明细列表转换为树形结构
List<HwProductInfoDetail> treeStructureList = buildProductInfoDetailTree(productInfo.getHwProductInfoDetailList());
productInfo.setHwProductInfoDetailList(treeStructureList);
}
}
}
return hwProductInfoJoinDetailList; return hwProductInfoJoinDetailList;
} }

@ -21,8 +21,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="configTypeName" column="config_type_name" /> <result property="configTypeName" column="config_type_name" />
</resultMap> </resultMap>
<resultMap type="HwPortalConfig" id="HwPortalConfigResult2">
<result property="portalConfigId" column="portal_config_id" />
<result property="portalConfigType" column="portal_config_type" />
<result property="portalConfigTypeId" column="portal_config_type_id" />
<result property="portalConfigTitle" column="portal_config_title" />
<result property="portalConfigOrder" column="portal_config_order" />
<result property="portalConfigDesc" column="portal_config_desc" />
<result property="buttonName" column="button_name" />
<result property="routerAddress" column="router_address" />
<result property="portalConfigPic" column="portal_config_pic" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="configTypeName" column="config_type_name" />
<result property="homeConfigTypePic" column="home_config_type_pic" />
<result property="homeConfigTypeIcon" column="home_config_type_icon" />
<result property="homeConfigTypeName" column="home_config_type_name" />
<result property="homeConfigTypeClassfication" column="config_type_classfication" />
<result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" />
</resultMap>
<sql id="selectHwPortalConfigVo"> <sql id="selectHwPortalConfigVo">
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
</sql>
<sql id="selectHwPortalConfigVo2">
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
</sql> </sql>
<select id="selectHwPortalConfigList" parameterType="HwPortalConfig" resultMap="HwPortalConfigResult"> <select id="selectHwPortalConfigList" parameterType="HwPortalConfig" resultMap="HwPortalConfigResult">
@ -39,6 +81,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </select>
<select id="selectHwPortalConfigList2" parameterType="HwPortalConfig" resultMap="HwPortalConfigResult2">
<include refid="selectHwPortalConfigVo2"/>
<where>
<if test="portalConfigType != null and portalConfigType != ''"> and portal_config_type = #{portalConfigType}</if>
<if test="portalConfigTypeId != null "> and portal_config_type_id = #{portalConfigTypeId}</if>
<if test="portalConfigTitle != null and portalConfigTitle != ''"> and portal_config_title like concat('%', #{portalConfigTitle}, '%')</if>
<if test="portalConfigOrder != null "> and portal_config_order = #{portalConfigOrder}</if>
<if test="portalConfigDesc != null and portalConfigDesc != ''"> and portal_config_desc = #{portalConfigDesc}</if>
<if test="buttonName != null and buttonName != ''"> and button_name like concat('%', #{buttonName}, '%')</if>
<if test="routerAddress != null and routerAddress != ''"> and router_address = #{routerAddress}</if>
<if test="portalConfigPic != null and portalConfigPic != ''"> and portal_config_pic = #{portalConfigPic}</if>
</where>
</select>
<select id="selectHwPortalConfigByPortalConfigId" parameterType="Long" resultMap="HwPortalConfigResult"> <select id="selectHwPortalConfigByPortalConfigId" parameterType="Long" resultMap="HwPortalConfigResult">
<include refid="selectHwPortalConfigVo"/> <include refid="selectHwPortalConfigVo"/>
where portal_config_id = #{portalConfigId} where portal_config_id = #{portalConfigId}

@ -19,6 +19,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="parentId" column="parent_id" /> <result property="parentId" column="parent_id" />
<result property="configTypeName" column="config_type_name" /> <result property="configTypeName" column="config_type_name" />
</resultMap> </resultMap>
<resultMap id="HwProductInfoHwProductInfoDetailResult" type="HwProductInfo" extends="HwProductInfoResult"> <resultMap id="HwProductInfoHwProductInfoDetailResult" type="HwProductInfo" extends="HwProductInfoResult">
@ -38,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="sub_create_by" /> <result property="createBy" column="sub_create_by" />
<result property="updateTime" column="sub_update_time" /> <result property="updateTime" column="sub_update_time" />
<result property="updateBy" column="sub_update_by" /> <result property="updateBy" column="sub_update_by" />
<result property="configModel" column="config_model" />
</resultMap> </resultMap>
<sql id="selectHwProductInfoVo"> <sql id="selectHwProductInfoVo">
@ -122,7 +125,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectHwProductInfoJoinDetailList" parameterType="HwProductInfo" resultMap="HwProductInfoHwProductInfoDetailResult"> <select id="selectHwProductInfoJoinDetailList" parameterType="HwProductInfo" resultMap="HwProductInfoHwProductInfoDetailResult">
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, 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 from hw_product_info a
left join hw_product_info_detail b on b.product_info_id = a.product_info_id left join hw_product_info_detail b on b.product_info_id = a.product_info_id
<where> <where>

Loading…
Cancel
Save