35 lines
790 B
Go
35 lines
790 B
Go
package ebai
|
|
|
|
import (
|
|
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
|
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler"
|
|
"git.rosy.net.cn/jx-callback/business/model"
|
|
"git.rosy.net.cn/jx-callback/globals/api"
|
|
)
|
|
|
|
var (
|
|
curPurchaseHandler *PurchaseHandler
|
|
)
|
|
|
|
type PurchaseHandler struct {
|
|
scheduler.BasePurchasePlatform
|
|
}
|
|
|
|
func init() {
|
|
if api.EbaiAPI != nil {
|
|
curPurchaseHandler = new(PurchaseHandler)
|
|
scheduler.CurrentScheduler.RegisterPurchasePlatform(curPurchaseHandler)
|
|
}
|
|
}
|
|
|
|
func EbaiBusStatus2JxStatus(ebaiStatus int) int {
|
|
if ebaiStatus == ebaiapi.ShopBusStatusOffline || ebaiStatus == ebaiapi.ShopBusStatusSuspended {
|
|
return model.StoreStatusClosed
|
|
}
|
|
return model.StoreStatusOpened
|
|
}
|
|
|
|
func (p *PurchaseHandler) GetVendorID() int {
|
|
return model.VendorIDEBAI
|
|
}
|