34 lines
728 B
Go
34 lines
728 B
Go
package ebai
|
|
|
|
import (
|
|
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
|
"git.rosy.net.cn/jx-callback/business/model"
|
|
"git.rosy.net.cn/jx-callback/business/partner"
|
|
)
|
|
|
|
var (
|
|
CurPurchaseHandler *PurchaseHandler
|
|
)
|
|
|
|
type PurchaseHandler struct {
|
|
partner.BasePurchasePlatform
|
|
}
|
|
|
|
func init() {
|
|
CurPurchaseHandler = new(PurchaseHandler)
|
|
partner.RegisterPurchasePlatform(CurPurchaseHandler)
|
|
}
|
|
|
|
func EbaiBusStatus2JxStatus(ebaiStatus int) int {
|
|
if ebaiStatus == ebaiapi.ShopBusStatusOffline {
|
|
return model.StoreStatusDisabled
|
|
} else if ebaiStatus == ebaiapi.ShopBusStatusSuspended {
|
|
return model.StoreStatusClosed
|
|
}
|
|
return model.StoreStatusOpened
|
|
}
|
|
|
|
func (p *PurchaseHandler) GetVendorID() int {
|
|
return model.VendorIDEBAI
|
|
}
|