Administrator
2025-07-23 9feb0b26e8c150b4b34e5bbc121c9d5eb1861d7e
feat(mall): 服饰社交列表增加分类筛选和展示功能

- 在 AdminClothesSocialListDto 中添加 categoryId 字段,用于筛选指定分类的社交信息
- 在 AdminClothesSocialListVo 中添加 categoryName 字段,用于展示社交信息的分类名称
- 修改 ClothesSocialMapper.xml,增加分类名称的查询和分类 ID 的筛选条件
- 在社交列表页面模板中添加分类名称的列显示
4 files modified
10 ■■■■■ changed files
src/main/java/cc/mrbird/febs/mall/dto/clothes/AdminClothesSocialListDto.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/vo/clothes/AdminClothesSocialListVo.java 1 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/ClothesSocialMapper.xml 6 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/clothesType/socialList.html 1 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/dto/clothes/AdminClothesSocialListDto.java
@@ -13,6 +13,8 @@
     */
    private Integer state;
    private Long categoryId;
    private String startTime;
    private String endTime;
src/main/java/cc/mrbird/febs/mall/vo/clothes/AdminClothesSocialListVo.java
@@ -5,6 +5,7 @@
@Data
public class AdminClothesSocialListVo {
    private Long id;
    private String categoryName;
    private String name;
    private String socialTitle;
    private Integer socialState;
src/main/resources/mapper/modules/ClothesSocialMapper.xml
@@ -4,8 +4,10 @@
    <select id="selectSocialListInPage" resultType="cc.mrbird.febs.mall.vo.clothes.AdminClothesSocialListVo">
        select
        c.name as categoryName,
        b.name as name,
        a.id as id,
        a.name as socialTitle,
        a.name as socialTitle,
        a.del_flag as delFlag,
        a.hot_state as hotState,
@@ -17,6 +19,7 @@
        a.state as socialState
        from clothes_social a
        left join mall_member b on a.member_id = b.id
        left join clothes_social_category c on a.category_id = c.id
        <where>
            <if test="record != null">
                <if test="record.name != null and record.name != ''">
@@ -25,6 +28,9 @@
                <if test="record.state != null">
                    and a.state = #{record.status}
                </if>
                <if test="record.categoryId != null">
                    and c.id = #{record.categoryId}
                </if>
                <if test="record.startTime != null and record.startTime != ''">
                    and a.created_time &gt;= #{record.startTime}
                </if>
src/main/resources/templates/febs/views/modules/clothesType/socialList.html
@@ -278,6 +278,7 @@
                            {type: 'numbers', title: '序号', rowspan: 2, width: 80},
                            {title: '操作', toolbar: '#activityOption', minWidth: 400, rowspan: 2,align: 'center'},
                            {field: 'name', title: '发布人', minWidth: 150,rowspan: 2,align:'center'},
                            {field: 'categoryName', title: '分类', minWidth: 150,rowspan: 2,align:'center'},
                            {field: 'socialTitle', title: '标题', minWidth: 150,rowspan: 2,align:'center'},
                            {align: 'center', title: '点赞', colspan: 2},
                            {align: 'center', title: '收藏', colspan: 2},