gydx_2024_lyh 2 months ago
parent
commit
8ab002874f

+ 7 - 1
src/main/resources/mapper/RuleManagementMapper.xml

@@ -22,10 +22,16 @@
         delete from FoodRule where FoodRuleID = #{FoodRuleID}
     </delete>
     <select id="queryRule" resultMap="rulerm">
-        select * from FoodRule
+        select * from FoodRule item
+        <where>
+            <if test="FoodRuleName != null &amp;&amp; FoodRuleName != ''">
+                and item.FoodRuleName = #{FoodRuleName}
+            </if>
+        </where>
     </select>
 
     <select id="queryRuleByID" resultMap="rulerm">
         select * from FoodRule where FoodRuleID = #{FoodRuleID}
+
     </select>
 </mapper>

+ 14 - 0
src/main/resources/mapper/VendorManagementMapper.xml

@@ -28,6 +28,20 @@
 
     <select id="querySupplier" resultMap="rmlyh" parameterMap="pmlyh">
         select * from FoodSupplier item
+        <where>
+            <if test="FoodSupplierID!= null">
+                and item.FoodSupplierID = #{FoodSupplierID}
+            </if>
+            <if test="FoodSupplierName!= null">
+                and item.FoodSupplierName like concat('%',#{FoodSupplierName},'%')
+            </if>
+            <if test="FoodSupplierLink!= null">
+                and item.FoodSupplierLink like concat('%',#{FoodSupplierLink},'%')
+            </if>
+            <if test="FoodSupplierStatus != null">
+                and item.FoodSupplierStatus = #{FoodSupplierStatus}
+            </if>
+        </where>
     </select>
     <select id="queryLoginlyh" resultMap="rmlyh" parameterMap="pmlyh">
         select item.FoodSupplierName,item.FoodSupplierLink,item.FoodSupplierStatus,item.FoodSupplierID from FoodSupplier item where item.FoodSupplierLink = #{FoodSupplierLink} and item.FoodSupplierPass = #{FoodSupplierPass}