add sales order

This commit is contained in:
Timi
2026-09-06 12:09:58 +08:00
parent 41f692aad9
commit f3166f0413
43 changed files with 560 additions and 73 deletions
@@ -18,6 +18,8 @@
<if test="orderType != null">AND o.`order_type` = #{orderType}</if>
<if test="status != null">AND o.`status` = #{status}</if>
<if test="paymentStatus != null">AND o.`payment_status` = #{paymentStatus}</if>
<if test="refundStatus != null">AND o.`refund_status` = #{refundStatus}</if>
<if test="pendingReceive != null and pendingReceive">AND o.`status` IN ('ACTIVE', 'FULFILLED') AND o.`payment_status` IN ('UNPAID', 'PARTIALLY_PAID')</if>
<if test="fulfilledButUnpaid != null and fulfilledButUnpaid">AND o.`status` = 'FULFILLED' AND o.`paid_amount` &lt; o.`sale_amount`</if>
<if test="keyword != null and keyword.trim() != ''">AND (o.`order_no` LIKE CONCAT('%', #{keyword}, '%') OR c.`name` LIKE CONCAT('%', #{keyword}, '%') OR c.`code` LIKE CONCAT('%', #{keyword}, '%'))</if>
<if test="beginAt != null">AND o.`purchased_at` &gt;= #{beginAt}</if>
@@ -48,4 +50,9 @@
SET `status` = #{status}, `updated_at` = FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000)
WHERE `id` = #{id} AND `deleted_at` IS NULL
</update>
<update id="updateRemark">
UPDATE `gao_sales_order`
SET `remark` = #{remark}, `updated_at` = FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000)
WHERE `id` = #{id} AND `deleted_at` IS NULL
</update>
</mapper>