1
This commit is contained in:
@@ -6,8 +6,6 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
@@ -31,13 +29,8 @@ type PurchaseHandler struct {
|
||||
locker sync.RWMutex
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) GetOrderStatus(vendorOrgCode, vendorOrderID string) (status int, err error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func init() {
|
||||
if api.MtwmAPI != nil || api.Mtwm2API != nil {
|
||||
if api.TiktokStore != nil {
|
||||
CurPurchaseHandler = New()
|
||||
partner.RegisterPurchasePlatform(CurPurchaseHandler)
|
||||
}
|
||||
@@ -50,7 +43,7 @@ func New() (obj *PurchaseHandler) {
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) GetVendorID() int {
|
||||
return model.VendorIDMTWM
|
||||
return model.VendorIDDD
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) GetVendorCategories(ctx *jxcontext.Context) (vendorCats []*model.SkuVendorCategory, err error) {
|
||||
@@ -234,17 +227,17 @@ func (p *PurchaseHandler) getUploadImgPoiCode() (poiCode string) {
|
||||
|
||||
func getAPI(appOrgCode string, storeID int, vendorStoreID string) (apiObj *tiktok_api.API) {
|
||||
apiObj = partner.CurAPIManager.GetAPI(model.VendorIDDD, appOrgCode).(*tiktok_api.API)
|
||||
if appOrgCode == globals.TiktokShopCode {
|
||||
var storeDetail *dao.StoreDetail
|
||||
if storeID != 0 {
|
||||
storeDetail, _ = dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDDD, appOrgCode)
|
||||
} else if vendorStoreID != "" {
|
||||
storeDetail, _ = dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, model.VendorIDDD, appOrgCode)
|
||||
}
|
||||
if storeDetail != nil {
|
||||
apiObj.SetToken(storeDetail.MtwmToken)
|
||||
}
|
||||
}
|
||||
//if appOrgCode == globals.TiktokShopCode {
|
||||
// var storeDetail *dao.StoreDetail
|
||||
// if storeID != 0 {
|
||||
// storeDetail, _ = dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDDD, appOrgCode)
|
||||
// } else if vendorStoreID != "" {
|
||||
// storeDetail, _ = dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, model.VendorIDDD, appOrgCode)
|
||||
// }
|
||||
// if storeDetail != nil {
|
||||
// apiObj.SetToken(storeDetail.MtwmToken)
|
||||
// }
|
||||
//}
|
||||
return apiObj
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user