package jx

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"
)

type PurchaseHandler struct {
	partner.BasePurchasePlatform
}

var (
	CurPurchaseHandler *PurchaseHandler
)

func init() {
	if true {
		CurPurchaseHandler = new(PurchaseHandler)
		// 不能注册京西
		// partner.RegisterPurchasePlatform(CurPurchaseHandler)
		partner.RegisterPurchaseOrderHandler(CurPurchaseHandler.GetVendorID(), CurPurchaseHandler)
	}
}

func (c *PurchaseHandler) GetVendorID() int {
	return model.VendorIDJX
}

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) GetOrderRider(vendorOrgCode, vendorStoreID string, param map[string]interface{}) (err error) {
	return nil
}
