按id查询订单

This commit is contained in:
2024-12-19 13:56:17 +08:00
parent 7d8f047087
commit b15cc542e1
8 changed files with 27 additions and 10 deletions

View File

@@ -18,6 +18,9 @@
p.order_no = o.order_no
WHERE
o.account_id = #{accountId}
<if test="id !=null and id gt 0">
AND p.id = #{id}
</if>
AND p.create_time BETWEEN #{startTime} AND #{endTime}
ORDER BY
p.id DESC
@@ -35,6 +38,9 @@
p.order_no = o.order_no
WHERE
o.account_id = #{accountId}
<if test="id !=null and id gt 0">
AND p.id = #{id}
</if>
AND p.create_time BETWEEN #{startTime} AND #{endTime};
</select>