From edd5bf1c50327c7da1c18f82b46f8cee64d5bab1 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Tue, 09 Jan 2024 14:37:59 +0800
Subject: [PATCH] 20220812

---
 src/main/resources/mapper/CmsFriendlyLinkMapper.xml |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/CmsFriendlyLinkMapper.xml b/src/main/resources/mapper/CmsFriendlyLinkMapper.xml
index 42a1ce9..edfe4b4 100644
--- a/src/main/resources/mapper/CmsFriendlyLinkMapper.xml
+++ b/src/main/resources/mapper/CmsFriendlyLinkMapper.xml
@@ -8,7 +8,23 @@
          b.name groupName
         from cms_friendly_link a
             left join cms_group_info b on a.group_id=b.id
-        where a.company_id=#{record.companyId}
+        <where>
+            a.company_id=#{record.companyId}
+            <if test="record.name != null and record.name != ''">
+                and a.name like concat(concat('%', #{record.name}), '%')
+            </if>
+        </where>
     </select>
 
+    <select id="selectByGroupIdAndCompanyId" resultType="com.xcong.farmer.cms.modules.system.entity.CmsFriendlyLinkEntity">
+        select * from cms_friendly_link
+        where group_id=#{groupId} and company_id=#{companyId}
+    </select>
+
+    <select id="selectByGroupCodeAndCompanyId" resultType="com.xcong.farmer.cms.modules.system.entity.CmsFriendlyLinkEntity">
+        select
+            *
+        from cms_friendly_link a, cms_group_info b
+        where a.group_id=b.id and b.code=#{code} and a.company_id=#{companyId}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1