From 7f55c18d7db36c9cad2ac96e481680bc1107e51c Mon Sep 17 00:00:00 2001 From: Hentua <wangdoubleone@gmail.com> Date: Thu, 15 Jun 2023 11:16:11 +0800 Subject: [PATCH] Merge branch 'meiye_mall' of http://120.27.238.55:7000/r/xc-mall into meiye_mall --- src/main/resources/mapper/modules/MallNewsInfoMapper.xml | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/resources/mapper/modules/MallNewsInfoMapper.xml b/src/main/resources/mapper/modules/MallNewsInfoMapper.xml index c0bf00f..dc26a1a 100644 --- a/src/main/resources/mapper/modules/MallNewsInfoMapper.xml +++ b/src/main/resources/mapper/modules/MallNewsInfoMapper.xml @@ -8,23 +8,30 @@ c.title categoryName, b.goods_name targetName FROM mall_news_info a + inner join mall_news_category c on a.category_id=c.id + <if test="record.code != null and record.code != ''"> + and c.code=#{record.code} + </if> left join mall_goods b on a.target_id = b.id - left join mall_news_category c on a.category_id=c.id group by a.id order by a.CREATED_TIME desc </select> <select id="selectNewsVoInPage" resultType="cc.mrbird.febs.mall.vo.NewsListVo"> - select * from mall_news_info + select * from mall_news_info newsInfo + inner join mall_news_category category on newsInfo.category_id=category.id <where> 1=1 <if test="record.categoryId != null"> - and category_id=#{record.categoryId} + and newsInfo.category_id=#{record.categoryId} + </if> + <if test="record.code != null and record.code != ''"> + and category.code=#{record.code} </if> <if test="record.isTop != null"> - and is_top=#{record.isTop} + and newsInfo.is_top=#{record.isTop} </if> </where> - order by CREATED_TIME desc + order by newsInfo.CREATED_TIME desc </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1