Merge branch 'master' of git.oa00.com:supply-chain/service

finance
杨赟 2 years ago
commit a19367c735

@ -20,7 +20,7 @@ type ArgsSkuItemAdd struct {
}
// Add @Title 添加商品
func (i *item) Add(ctx context.Context, args []ArgsSkuItemAdd) (reply []ReplySkuItemHandle, err error) {
func (i *item) Add(ctx context.Context, args ArgsSkuItemAdd) (reply []ReplySkuItemHandle, err error) {
xClient, err := client.GetClient(i)
if err != nil {
return nil, err

@ -40,7 +40,7 @@ func (s *skuType) Del(ctx context.Context, id uint) error {
return err
}
reply := 0
return xClient.Call(ctx, "Add", id, &reply)
return xClient.Call(ctx, "Del", id, &reply)
}
type TypeItem struct {

@ -16,6 +16,8 @@ type OrderInterface interface {
Close(ctx context.Context, orderSn string, reply *int) error
// Cancel @Title 取消订单
Cancel(ctx context.Context, orderSn string, reply *int) error
// Trajectory @Title 物流轨迹
Trajectory(ctx context.Context, orderSn string, reply *[]ReplyTrajectory) error
}
type ArgsOrderFreightFee struct {
Skus []OrderFreightFeeSkuItem // 商品信息
@ -47,3 +49,14 @@ type OrderReceiver struct {
Email string // 邮件
ZipCode string // 邮编
}
type ReplyTrajectory struct {
LogisticsName string `json:"logisticsName"`
WaybillCode string `json:"waybillCode"`
Steps []PackageStep `json:"steps"`
}
type PackageStep struct {
State string `json:"state"`
Content string `json:"content"`
OperatorAt int64 `json:"operatorAt"`
}

@ -308,3 +308,37 @@ func (s *sku) ChangeData(ctx context.Context, args ArgsSkuChangeData) (err error
err = xClient.Call(ctx, "ChangeData", args, &reply)
return
}
type ByIdsSkuItem struct {
Id uint `json:"id"`
Name string `json:"name"` // 名称
BrandName string `json:"brandName"` // 品牌名称
FirstCategoryId uint `json:"firstCategoryId"` // 一级分类id
SecondCategoryId uint `json:"secondCategoryId"` // 二级分类id
ThirdCategoryId uint `json:"thirdCategoryId"` // 三级分类id
SupplyPrice decimal.Decimal `json:"supplyPrice"` // 采购价
GuidePrice decimal.Decimal `json:"guidePrice"` // 指导价
ImgUrl string `json:"imgUrl"` // 商品主图
PlatformStatus uint `json:"platformStatus"` // 平台状态 1=上架 2=下架
SourceName string `json:"sourceName"` // 供应商名称
SourceSkuId string `json:"sourceSkuId"` // 源skuId
SourceStatus uint `json:"sourceStatus"` // 供应商状态 1=上架 2=下架
CustomerPrice decimal.Decimal `json:"customerPrice"` // 供货最高价
CustomerProfitRate decimal.Decimal `json:"customerProfitRate"` // 供货利润率 供货利润/供货最高价%
AdjustType uint `json:"adjustType"` // 加价类型
AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额
AfterAdjustType uint `json:"afterAdjustType"` // 改价后加价类型
AfterAdjustPrice decimal.Decimal `json:"afterAdjustPrice"` // 改价后加价金额
Handle uint `json:"handle"` // 1=未处理 2=已处理
Reason string `json:"reason"` // 驳回原因
}
// FindByIds @Title 根据Ids查询sku信息
func (s *sku) FindByIds(ctx context.Context, ids []uint) (reply []ByIdsSkuItem, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return nil, err
}
err = xClient.Call(ctx, "FindByIds", ids, &reply)
return
}

Loading…
Cancel
Save