Notes
Notes - notes.io |
-query order ที่
--expired_at น้อยกว่า 23:59:59 ของเมื่อวาน
--order_Status = draft
--payment_method = (CCW, CCinstM, TMN_WALLET)
วนลูบ Order ที่ query ได้{
--เช็คว่า payment_source เป็น truemoney ถ้าไม่ใช่ก็หยุดทำงาน
--ถ้าเป็น TMN Order{
----ทำการ enquiry ยิง api ไปที่ TrueMoney api รับ result กลับมา
----ถ้า success จะเก็บ log payment-status-success และ reconcileData
----ถ้า fail จะเก็บ log Call saveFailedOrder from checkRequery และ payment-status-fail
----ถ้าไม่มี response กลับมา จะเก็บ log ว่า checkRequery แล้วไม่ success หรือ fail เลย
}
--ถ้าเป็น wetrust{
----ทำการยิง api ไปถาม wetrust ถ้า response = 0 จะทำการ reconcileData
}
2.returnCouponWhenPaymentFailed
-query order ที่
--payment_status = failed
--expired_at มากกว่า เวลาปัจจุบัน
วนลูบ Order ที่ query ได้{
--ทำการ delete promotion_code_log ของ order นี้ (return coupon)
}
ปรับ order ที่ query ได้ ให้ order_status เป็น cancel
3.clearOnlineExpiredOrder
-query from table order
--expire_at <= current_date
--payment_channel = online
--payment_status != failed
--order_status = draft
เก็บ log CLEAR-ONLINE-EXPIRED-ORDER โดยใส่ข้อมูล Order ทั้งหมดที่ query ได้ลงไป
วนลูบทีละ order {
--return coupon
--return point
--set stock_hold_booking status from convert-to-order to temporary (พึ่งจะเพิ่มเข้าไป)
--check order_verify ถ้ายังไม่ verify จะหยุดการทำงานแค่นี้ (bundle)
--ปรับ status order_verify เป็น reject
--เก็บ log ว่ามีการปรับ status เป็น reject
--เช็คว่าเป็น order ที่มีการขอ ย้ายค่ายรึเปล่า ถ้าใช่ก็ reset ข้อมูลส่วนนี้กลับไปเหมือนเดิม
--unhold สินค้าถ้าเป็นสินค้าประเภท bundle หรือ sim
}
ปรับให้ Order ทั้งหมดที่ query มา payment_status และ order_status เป็น expired
ปรับให้ OrderShipmentItem ทั้งหมด item_status เป็น new และ payment_status เป็น expired
4.clearOfflineExpiredOrder
-query from table order
--expire_at <= current_date
--payment_channel = offline
--payment_status != failed
--order_status = draft
ปรับให้ Order ทั้งหมดที่ query มา payment_status และ order_status เป็น expired
ปรับให้ OrderShipmentItem ทั้งหมด item_status เป็น new และ payment_status เป็น expired
5.removeOrderverifyWhenFailedOrExpired
query from table order join truemoveh_order_verify
--order.payment_status = failed
--truemoveh_order_verify.bundle_type = mnp
--truemoveh_order_verifys.delelted_at = null
ใส่วันที่ปัจจุบันลงใน delete_at ของ truemoveh_order_verifys ลงในทุก order ที่ query ได้
|
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team