|
|
|
@ -1,5 +1,10 @@
|
|
|
|
|
package supply
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"git.oa00.com/supply-chain/service/client"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Source struct {
|
|
|
|
|
Id uint `gorm:"primaryKey"`
|
|
|
|
|
Name string // 供货商名称
|
|
|
|
@ -7,3 +12,19 @@ type Source struct {
|
|
|
|
|
SkuName string // sku名称
|
|
|
|
|
OrderName string // order名称
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type SourceItem struct {
|
|
|
|
|
Id uint `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Select @Title 订单列表
|
|
|
|
|
func (s *Source) 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
|
|
|
|
|
}
|
|
|
|
|