package supply import ( "context" "git.oa00.com/supply-chain/service/client" ) type sourceRpc struct { Id uint `gorm:"primaryKey"` Name string // 供货商名称 Base string // rpc服务基础名称 SkuName string // sku名称 OrderName string // order名称 } type SourceItem struct { Id uint `json:"id"` Name string `json:"name"` } // Select @Title 订单列表 func (s *sourceRpc) Select(ctx context.Context) (reply []SourceItem, err error) { xClient, err := client.GetClient(s) if err != nil { return } args := 0 err = xClient.Call(ctx, "Select", args, &reply) return } type SourceInfo struct { Id uint `json:"id"` Name string `json:"name"` Base string `json:"base"` SkuName string `json:"skuName"` OrderName string `json:"orderName"` AfterService string `json:"afterService"` } // Info @Title 获取供货商 func (s *sourceRpc) Info(ctx context.Context, sourceId uint) (reply SourceInfo, err error) { xClient, err := client.GetClient(s) if err != nil { return } err = xClient.Call(ctx, "Info", sourceId, &reply) return }