From 9feb0b26e8c150b4b34e5bbc121c9d5eb1861d7e Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 23 Jul 2025 11:32:23 +0800
Subject: [PATCH] feat(mall): 服饰社交列表增加分类筛选和展示功能
---
src/main/java/cc/mrbird/febs/mall/vo/clothes/AdminClothesSocialListVo.java | 1 +
src/main/resources/templates/febs/views/modules/clothesType/socialList.html | 1 +
src/main/java/cc/mrbird/febs/mall/dto/clothes/AdminClothesSocialListDto.java | 2 ++
src/main/resources/mapper/modules/ClothesSocialMapper.xml | 6 ++++++
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/dto/clothes/AdminClothesSocialListDto.java b/src/main/java/cc/mrbird/febs/mall/dto/clothes/AdminClothesSocialListDto.java
index ea26ebb..214cf9d 100644
--- a/src/main/java/cc/mrbird/febs/mall/dto/clothes/AdminClothesSocialListDto.java
+++ b/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;
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/clothes/AdminClothesSocialListVo.java b/src/main/java/cc/mrbird/febs/mall/vo/clothes/AdminClothesSocialListVo.java
index 6ee7a50..18ccb07 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/clothes/AdminClothesSocialListVo.java
+++ b/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;
diff --git a/src/main/resources/mapper/modules/ClothesSocialMapper.xml b/src/main/resources/mapper/modules/ClothesSocialMapper.xml
index fefeeb1..d847b4f 100644
--- a/src/main/resources/mapper/modules/ClothesSocialMapper.xml
+++ b/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 >= #{record.startTime}
</if>
diff --git a/src/main/resources/templates/febs/views/modules/clothesType/socialList.html b/src/main/resources/templates/febs/views/modules/clothesType/socialList.html
index bf0c22d..49bfefc 100644
--- a/src/main/resources/templates/febs/views/modules/clothesType/socialList.html
+++ b/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},
--
Gitblit v1.9.1