package yb

import (
	"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.YinBaoAPI != nil {
		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
}

func (p *PurchaseHandler) GetVendorCategories(ctx *jxcontext.Context) (vendorCats []*model.SkuVendorCategory, err error) {
	return vendorCats, err
}

func (p *PurchaseHandler) GetOrderRider(vendorOrgCode, vendorStoreID string, param map[string]interface{}) (err error) {
	return nil
}

