|
|
|
@ -126,30 +126,3 @@ func (g *goods) GetImgs(ctx context.Context, goodsId uint) (reply []string, err
|
|
|
|
|
err = xClient.Call(ctx, "GetImgs", goodsId, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type AdoptItem struct {
|
|
|
|
|
Id uint `json:"id"`
|
|
|
|
|
GoodsNum string `json:"goodsNum"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Error string `json:"error"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Adopt @Title 批量入库
|
|
|
|
|
func (g *goods) Adopt(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) {
|
|
|
|
|
xClient, err := client.GetClient(g)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(ctx, "Adopt", goodsIds, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Discard @Title 批量废弃
|
|
|
|
|
func (g *goods) Discard(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) {
|
|
|
|
|
xClient, err := client.GetClient(g)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(ctx, "Discard", goodsIds, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|