食堂项目功能修改

This commit is contained in:
2026-07-31 15:19:38 +08:00
parent dc68cda5d5
commit c42331c13e
9 changed files with 65 additions and 16 deletions

View File

@@ -6,14 +6,10 @@
insert into food_repo(
<if test="foodProductId != null">food_product_id,</if>
<if test="repoId != null">repo_id,</if>
<if test="orderNo != null and orderNo != ''">order_no,</if>
<if test="orderItemNo != null and orderItemNo != ''">order_item_no,</if>
<if test="foodProductNum != null">food_product_num</if>
)values(
<if test="foodProductId != null">#{foodProductId},</if>
<if test="repoId != null">#{repoId},</if>
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
<if test="orderItemNo != null and orderItemNo != ''">#{orderItemNo},</if>
<if test="foodProductNum != null">#{foodProductNum}</if>)
</insert>
@@ -22,8 +18,6 @@
<set>
<if test="foodProductId != null">food_product_id=#{foodProductId},</if>
<if test="repoId != null">repo_id=#{repoId},</if>
<if test="orderNo != null and orderNo != ''">order_no=#{orderNo},</if>
<if test="orderItemNo != null and orderItemNo != ''">order_item_no=#{orderItemNo},</if>
<if test="foodProductNum != null">food_product_num=#{foodProductNum}</if>
</set>
where id=#{id}
@@ -31,8 +25,17 @@
<select id="selectByProductIdAndRepoId" resultType="FoodRepo">
select id, food_product_id foodProductId, repo_id repoId, order_no orderNo, order_item_no orderItemNo, food_product_num foodProductNum
select id, food_product_id foodProductId, repo_id repoId, food_product_num foodProductNum
from food_repo where food_product_id=#{productId} and repo_id=#{repoId}
</select>
<select id="selectByRepoId" resultType="FoodRepo">
select id, food_product_id foodProductId, repo_id repoId, food_product_num foodProductNum
from food_repo where repo_id in
<foreach collection="repoIds" item="repoId" index="index"
separator="," open="(" close=")">
#{repoId}
</foreach>
</select>
</mapper>