43 lines
984 B
Go
43 lines
984 B
Go
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.VendorIDJDShop
|
|
}
|
|
|
|
func (p *PurchaseHandler) UploadImg(ctx *jxcontext.Context, vendorOrgCode, imgURL string, imgData []byte, imgName string, imgType int) (imgHint string, err error) {
|
|
return imgHint, err
|
|
}
|