This commit is contained in:
邹宗楠
2022-09-21 10:03:21 +08:00
parent 9915fa1eb2
commit e2b41bf9db
33 changed files with 2919 additions and 3032 deletions

View File

@@ -3,22 +3,24 @@ 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/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/model"
)
// 美团回调接口
func OnCallbackMsg(msg *tiktokShop.CreateOrderCallback) (resp *mtwmapi.CallbackResponse) {
// OnCallbackMsg 抖音
func OnCallbackMsg(msg *tiktokShop.OrderCallback) (response *tiktokShop.CallbackResponse) {
if CurPurchaseHandler != nil {
switch msg.Tag {
case tiktokShop.CallbackMsgTagId:
if msg.Data != "" && len(msg.Body) > 0 {
jxutils.CallMsgHandler(func() {
response = CurPurchaseHandler.onOrderMsg(msg)
}, jxutils.ComposeUniversalOrderID(msg.MsgId, model.VendorIDDD))
}
}
return response
}
func GetOrderIDFromMsg(msg *tiktokShop.CreateOrderCallback) string {
return utils.Int64ToStr(msg.Data.PId)
func GetOrderIDFromMsg(msg *mtwmapi.CallbackMsg) string {
return msg.FormData.Get(mtwmapi.KeyOrderID)
}
func GetVendorStoreIDFromMsg(msg *mtwmapi.CallbackMsg) string {