dingdan
This commit is contained in:
@@ -1,28 +1,19 @@
|
||||
package tiktok_store
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
tiktokShop "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
// OnCallbackMsg 抖音
|
||||
func OnCallbackMsg(msg *tiktokShop.OrderCallback) (response *tiktokShop.CallbackResponse) {
|
||||
// OnOrderMsg 抖音
|
||||
func OnOrderMsg(msgId string, msg interface{}) (response *tiktokShop.CallbackResponse) {
|
||||
if CurPurchaseHandler != nil {
|
||||
if msg.Data != "" && len(msg.Body) > 0 {
|
||||
jxutils.CallMsgHandler(func() {
|
||||
response = CurPurchaseHandler.onOrderMsg(msg)
|
||||
}, jxutils.ComposeUniversalOrderID(msg.MsgId, model.VendorIDDD))
|
||||
}
|
||||
orderId, _ := api.TiktokStore.GetCallbackOrderId(msgId, msg)
|
||||
jxutils.CallMsgHandler(func() {
|
||||
response = CurPurchaseHandler.onOrderMsg(msgId, orderId, msg)
|
||||
}, jxutils.ComposeUniversalOrderID(orderId, model.VendorIDDD))
|
||||
}
|
||||
return response
|
||||
}
|
||||
|
||||
func GetOrderIDFromMsg(msg *mtwmapi.CallbackMsg) string {
|
||||
return msg.FormData.Get(mtwmapi.KeyOrderID)
|
||||
}
|
||||
|
||||
func GetVendorStoreIDFromMsg(msg *mtwmapi.CallbackMsg) string {
|
||||
return msg.FormData.Get(mtwmapi.KeyAppPoiCode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user