From c144a01a7fff4e9bd169eb9d03b6ea58bc8bafb6 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期二, 22 十月 2024 14:40:40 +0800
Subject: [PATCH] 1.钱包

---
 src/main/resources/mapper/flower/FlowerMarkupSpMapper.xml |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/flower/FlowerMarkupSpMapper.xml b/src/main/resources/mapper/flower/FlowerMarkupSpMapper.xml
index 60a976a..50062c8 100644
--- a/src/main/resources/mapper/flower/FlowerMarkupSpMapper.xml
+++ b/src/main/resources/mapper/flower/FlowerMarkupSpMapper.xml
@@ -16,7 +16,7 @@
         join t_flower_markup_sp sp on sp.flower_id = f.id and sp.partner_id = #{partnerId}
         left join t_supplier_info s on s.id = f.supplier_id
         left join t_flower_category c on f.category = c.id
-        WHERE f.deleted = 0 AND sp.fee > 0
+        WHERE f.deleted = 0
         <if test="condition.name != null and condition.name != ''">
             AND f.name LIKE concat('%', #{condition.name},'%')
         </if>
@@ -32,6 +32,19 @@
                     select 1 from t_flower_category fc where fc.id = f.category and fc.parent_id = #{condition.category}
                 )
             )
+        </if>
+        <if test="condition.supplierName != null and condition.supplierName != ''">
+            AND s.name LIKE concat('%', #{condition.supplierName},'%')
+        </if>
+        <if test="condition.isFee != null">
+        <choose>
+            <when test="condition.isFee == 'markup'">
+                AND sp.fee > 0
+            </when>
+            <otherwise>
+                AND (sp.fee is null or sp.fee = 0)
+            </otherwise>
+        </choose>
         </if>
         ORDER BY f.id
     </select>
@@ -68,6 +81,16 @@
             )
             )
         </if>
+        <if test="condition.isFee != null">
+            <choose>
+                <when test="condition.isFee == 'markup'">
+                    AND sp.fee > 0
+                </when>
+                <otherwise>
+                    AND (sp.fee is null or sp.fee = 0)
+                </otherwise>
+            </choose>
+        </if>
         ORDER BY f.id
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3