新增平台京东商城

This commit is contained in:
苏尹岚
2020-05-08 17:25:13 +08:00
parent 9ab49d00f3
commit d511317a14
7 changed files with 419 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
package jdshop
import (
"fmt"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/partner"
"git.rosy.net.cn/jx-callback/business/partner/putils"
"git.rosy.net.cn/jx-callback/globals/api"
)
var (
CurPurchaseHandler *PurchaseHandler
)
type PurchaseHandler struct {
partner.BasePurchasePlatform
putils.DefSingleStorePlatform
}
func init() {
if api.JdShopAPI != nil {
fmt.Println("test111111111111111111111")
CurPurchaseHandler = New()
partner.RegisterPurchasePlatform(CurPurchaseHandler)
}
}
func New() (obj *PurchaseHandler) {
obj = new(PurchaseHandler)
obj.ISingleStoreStoreSkuHandler = obj
return obj
}
func (p *PurchaseHandler) GetVendorID() int {
return model.VendorIDYB
}
func (p *PurchaseHandler) UploadImg(ctx *jxcontext.Context, vendorOrgCode, imgURL string, imgData []byte, imgName string, imgType int) (imgHint string, err error) {
return imgHint, err
}