This commit is contained in:
van
2026-09-07 19:27:22 +08:00
parent a169a554b9
commit 3b5081ce25
11 changed files with 199 additions and 22 deletions
@@ -13,6 +13,7 @@
<result property="rebateAmount" column="rebate_amount"/>
<result property="address" column="address"/>
<result property="logisticsLink" column="logistics_link"/>
<result property="waybillNo" column="waybill_no"/>
<result property="tencentDocPushed" column="tencent_doc_pushed"/>
<result property="tencentDocPushTime" column="tencent_doc_push_time"/>
<result property="orderId" column="order_id"/>
@@ -48,7 +49,7 @@
<sql id="selectJDOrderBase">
select id, remark, distribution_mark, model_number, model_shop, link, payment_amount, rebate_amount,
address, logistics_link, order_id, buyer, order_time, create_time, update_time, status, is_count_enabled, third_party_order_no, jingfen_actual_price,
address, logistics_link, waybill_no, order_id, buyer, order_time, create_time, update_time, status, is_count_enabled, third_party_order_no, jingfen_actual_price,
is_refunded, refund_date, is_refund_received, refund_received_date, is_rebate_received, rebate_received_date,
is_price_protected, price_protected_date, is_invoice_opened, invoice_opened_date, is_review_posted, review_posted_date,
rebate_remark_json, rebate_remark_has_abnormal,
@@ -65,6 +66,7 @@
order_id like concat('%', #{params.orderSearch}, '%')
or third_party_order_no like concat('%', #{params.orderSearch}, '%')
or distribution_mark like concat('%', #{params.orderSearch}, '%')
or waybill_no like concat('%', #{params.orderSearch}, '%')
)
</if>
<if test="params.quickRecordSearch != null and params.quickRecordSearch != ''">
@@ -76,6 +78,8 @@
or order_id like concat('%', #{params.quickRecordSearch}, '%')
or third_party_order_no like concat('%', #{params.quickRecordSearch}, '%')
or distribution_mark like concat('%', #{params.quickRecordSearch}, '%')
or waybill_no like concat('%', #{params.quickRecordSearch}, '%')
or logistics_link like concat('%', #{params.quickRecordSearch}, '%')
)
</if>
<if test="distributionMark != null and distributionMark != ''"> and distribution_mark = #{distributionMark}</if>
@@ -96,6 +100,7 @@
<if test="rebateAmount != null"> and rebate_amount = #{rebateAmount}</if>
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
<if test="logisticsLink != null and logisticsLink != ''"> and logistics_link like concat('%', #{logisticsLink}, '%')</if>
<if test="waybillNo != null and waybillNo != ''"> and waybill_no like concat('%', #{waybillNo}, '%')</if>
<if test="buyer != null and buyer != ''"> and buyer like concat('%', #{buyer}, '%')</if>
<if test="orderTime != null"> and order_time = #{orderTime}</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
@@ -135,6 +140,7 @@
order_id like concat('%', #{params.orderSearch}, '%')
or third_party_order_no like concat('%', #{params.orderSearch}, '%')
or distribution_mark like concat('%', #{params.orderSearch}, '%')
or waybill_no like concat('%', #{params.orderSearch}, '%')
)
</if>
<if test="params.quickRecordSearch != null and params.quickRecordSearch != ''">
@@ -146,6 +152,8 @@
or order_id like concat('%', #{params.quickRecordSearch}, '%')
or third_party_order_no like concat('%', #{params.quickRecordSearch}, '%')
or distribution_mark like concat('%', #{params.quickRecordSearch}, '%')
or waybill_no like concat('%', #{params.quickRecordSearch}, '%')
or logistics_link like concat('%', #{params.quickRecordSearch}, '%')
)
</if>
<if test="distributionMark != null and distributionMark != ''"> and distribution_mark = #{distributionMark}</if>
@@ -166,6 +174,7 @@
<if test="rebateAmount != null"> and rebate_amount = #{rebateAmount}</if>
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
<if test="logisticsLink != null and logisticsLink != ''"> and logistics_link like concat('%', #{logisticsLink}, '%')</if>
<if test="waybillNo != null and waybillNo != ''"> and waybill_no like concat('%', #{waybillNo}, '%')</if>
<if test="buyer != null and buyer != ''"> and buyer like concat('%', #{buyer}, '%')</if>
<if test="orderTime != null"> and order_time = #{orderTime}</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
@@ -213,7 +222,7 @@
<insert id="insertJDOrder" parameterType="JDOrder" useGeneratedKeys="true" keyProperty="id">
insert into jd_order (
remark, distribution_mark, model_number, model_shop, link,
payment_amount, rebate_amount, address, logistics_link,
payment_amount, rebate_amount, address, logistics_link, waybill_no,
tencent_doc_pushed, tencent_doc_push_time,
order_id, buyer, order_time, create_time, update_time, status, is_count_enabled, third_party_order_no, jingfen_actual_price,
is_refunded, refund_date, is_refund_received, refund_received_date, is_rebate_received, rebate_received_date,
@@ -221,7 +230,7 @@
selling_price_type, selling_price, profit, selling_price_manual, profit_manual, extra_cost
) values (
#{remark}, #{distributionMark}, #{modelNumber}, #{modelShop}, #{link},
#{paymentAmount}, #{rebateAmount}, #{address}, #{logisticsLink},
#{paymentAmount}, #{rebateAmount}, #{address}, #{logisticsLink}, #{waybillNo},
0, null,
#{orderId}, #{buyer}, #{orderTime}, now(), now(), #{status}, #{isCountEnabled}, #{thirdPartyOrderNo}, #{jingfenActualPrice},
#{isRefunded}, #{refundDate}, #{isRefundReceived}, #{refundReceivedDate}, #{isRebateReceived}, #{rebateReceivedDate},
@@ -242,6 +251,7 @@
<if test="rebateAmount != null"> rebate_amount = #{rebateAmount},</if>
<if test="address != null"> address = #{address},</if>
<if test="logisticsLink != null"> logistics_link = #{logisticsLink},</if>
<if test="waybillNo != null"> waybill_no = #{waybillNo},</if>
<if test="tencentDocPushed != null"> tencent_doc_pushed = #{tencentDocPushed},</if>
<if test="tencentDocPushTime != null"> tencent_doc_push_time = #{tencentDocPushTime},</if>
<if test="orderId != null"> order_id = #{orderId},</if>
@@ -317,6 +327,13 @@
limit 1
</select>
<select id="selectJDOrderByWaybillNo" parameterType="string" resultMap="JDOrderResult">
<include refid="selectJDOrderBase"/>
where waybill_no = #{waybillNo}
order by order_time desc
limit 1
</select>
<select id="selectJDOrderByThirdPartyOrderNo" parameterType="string" resultMap="JDOrderResult">
<include refid="selectJDOrderBase"/>
where third_party_order_no = #{thirdPartyOrderNo}