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 |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/modules/MallNewsInfoMapper.xml b/src/main/resources/mapper/modules/MallNewsInfoMapper.xml
index 186ff7e..dc26a1a 100644
--- a/src/main/resources/mapper/modules/MallNewsInfoMapper.xml
+++ b/src/main/resources/mapper/modules/MallNewsInfoMapper.xml
@@ -5,11 +5,33 @@
     <select id="getNewInfoListInPage" resultType="cc.mrbird.febs.mall.vo.AdminMallNewsInfoVo">
         SELECT
                a.*,
+               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
         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 newsInfo
+        inner join mall_news_category category on newsInfo.category_id=category.id
+        <where>
+            1=1
+            <if test="record.categoryId != null">
+                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 newsInfo.is_top=#{record.isTop}
+            </if>
+        </where>
+        order by newsInfo.CREATED_TIME desc
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1