feat(mall): 服饰社交列表增加分类筛选和展示功能
- 在 AdminClothesSocialListDto 中添加 categoryId 字段,用于筛选指定分类的社交信息
- 在 AdminClothesSocialListVo 中添加 categoryName 字段,用于展示社交信息的分类名称
- 修改 ClothesSocialMapper.xml,增加分类名称的查询和分类 ID 的筛选条件
- 在社交列表页面模板中添加分类名称的列显示
| | |
| | | */ |
| | | private Integer state; |
| | | |
| | | private Long categoryId; |
| | | |
| | | private String startTime; |
| | | |
| | | private String endTime; |
| | |
| | | @Data |
| | | public class AdminClothesSocialListVo { |
| | | private Long id; |
| | | private String categoryName; |
| | | private String name; |
| | | private String socialTitle; |
| | | private Integer socialState; |
| | |
| | | |
| | | <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, |
| | |
| | | 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 != ''"> |
| | |
| | | <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> |
| | |
| | | {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}, |