退單流程:
一、上游 api:根據訂單號,將訂單狀態
state 改待肯定(501)
-- 查上游訂單
SELECT id,user_id,sm_order_id,point,state FROM rk_order WHERE id in (210652,210651);
二、下游 scoremall:根據上游訂單號,找到下游
sm_order_id,
將訂單狀態 state 改取消訂單(103)
-- 查下游訂單
SELECT id,user_id,price,state FROM sm_order WHERE id in (24970,24971); #user_id僅爲區分otc跟rx
-- 查用戶積分餘額
SELECT point_user,earn_all_point,total_point FROM rk_user WHERE id=12689;
三、上游api:若是是訂單成功改失敗,須執行 php tools/sh/reSendOrderToSdp.php 訂單id
——執行後,上游訂單狀態爲301(失敗訂單),用戶poing_user自動加回扣除積分,並添加到rk_fortunelog
SELECT * FROM rk_fortunelog WHERE user_id=12689 ORDER BY createtime desc