parent
c1e7466531
commit
a2ae2d4177
@ -0,0 +1,5 @@
|
||||
package goods
|
||||
|
||||
type Goods struct {
|
||||
Sku sku
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package goods
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.oa00.com/supply-chain/service/client"
|
||||
"git.oa00.com/supply-chain/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
const (
|
||||
SkuStatusNone = 1 // 待处理
|
||||
SkuStatusAdopt = 2 // 同步入库
|
||||
SkuStatusReject = 3 // 废弃商品
|
||||
)
|
||||
|
||||
type sku struct {
|
||||
}
|
||||
type SkuSearch struct {
|
||||
Name string // 商品名称
|
||||
SupplierSkuId uint64 // 京东SkuId
|
||||
CategoryId uint64 // 类目id
|
||||
BrandName string // 品牌
|
||||
MinSupplyPrice decimal.Decimal // 采购价最小
|
||||
MaxSupplyPrice decimal.Decimal // 采购价最大
|
||||
SupplierType uint // 供应商类型
|
||||
}
|
||||
type ArgsSkuList struct {
|
||||
Search SkuSearch
|
||||
Page bean.Page
|
||||
}
|
||||
|
||||
type SkuItem struct {
|
||||
Id uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
ImgUrl string `json:"imgUrl"`
|
||||
FirstCategoryName string `json:"firstCategoryName"`
|
||||
SecondCategoryName string `json:"secondCategoryName"`
|
||||
ThirdCategoryName string `json:"thirdCategoryName"`
|
||||
BrandName string `json:"brandName"`
|
||||
SupplyPrice decimal.Decimal `json:"supplyPrice"`
|
||||
GuidePrice decimal.Decimal `json:"guidePrice"`
|
||||
}
|
||||
type ReplySkuList struct {
|
||||
Lists []SkuItem `json:"lists"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
// Lists @Title 获取商品列表
|
||||
func (s *sku) Lists(ctx context.Context, args ArgsSkuList) (reply ReplySkuList, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Lists", args, &reply)
|
||||
return
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package supplier
|
||||
|
||||
import "git.oa00.com/supply-chain/service/supplier/goods"
|
||||
|
||||
type Supplier struct {
|
||||
Goods goods.Goods
|
||||
}
|
Loading…
Reference in new issue