package partner import ( "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" "git.rosy.net.cn/jx-callback/business/model/dao" ) const ( FuncCreateStoreSkus = 1 FuncDeleteStoreSkus = 2 FuncUpdateStoreSkusStatus = 3 FuncUpdateStoreSkusPrice = 4 FuncUpdateStoreSkus = 5 ) type BareStoreSkuInfo struct { SkuID int `json:"skuID,omitempty"` VendorSkuID string `json:"vendorSkuID,omitempty"` NameID int `json:"nameID,omitempty"` VendorNameID string `json:"vendorNameID,omitempty"` Price int `json:"prrice,omitempty"` Status int `json:"status,omitempty"` } type BareStoreSkuInfoList []*BareStoreSkuInfo func (l BareStoreSkuInfoList) GetVendorSkuIDList() (vendorSkuIDList []string) { vendorSkuIDList = make([]string, len(l)) for k, v := range l { vendorSkuIDList[k] = v.VendorSkuID } return vendorSkuIDList } type BareCategoryInfo struct { VendorCatID string `json:"vendorCatID"` Level int `json:"level"` Name string `json:"name"` Seq int `json:"seq,omitempty"` Children []*BareCategoryInfo `json:"children,omitempty"` } type IPurchasePlatformStoreSkuHandler interface { GetStoreSkusBatchSize(funcID int) int CreateStoreSkus(ctx *jxcontext.Context, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (err error) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*BareStoreSkuInfo) (err error) UpdateStoreSkusStatus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*BareStoreSkuInfo) (err error) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*BareStoreSkuInfo) (err error) } type ISingleStoreStoreSkuHandler interface { IPurchasePlatformStoreSkuHandler ReadStoreCategory(ctx *jxcontext.Context, vendorStoreID string) (cats []*BareCategoryInfo, err error) CreateStoreSkuCategory(ctx *jxcontext.Context, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error) UpdateStoreSkuCategory(ctx *jxcontext.Context, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error) DeleteStoreSkuCategory(ctx *jxcontext.Context, vendorStoreID, vendorCatID string) (err error) UpdateStoreSkus(ctx *jxcontext.Context, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (err error) }