You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
1.7 KiB
75 lines
1.7 KiB
package skycrane
|
|
|
|
import (
|
|
"context"
|
|
"git.oa00.com/supply-chain/service/client"
|
|
)
|
|
|
|
type callback struct {
|
|
}
|
|
|
|
// Cancel @TITLE 取消订单
|
|
func (c *callback) Cancel(ctx context.Context, sourceOrderSn string) error {
|
|
xClient, err := client.GetClient(c)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := 0
|
|
return xClient.Call(ctx, "Cancel", sourceOrderSn, &reply)
|
|
}
|
|
|
|
// StockOut @Title 出库
|
|
func (c *callback) StockOut(ctx context.Context, sourceOrderSn string) error {
|
|
xClient, err := client.GetClient(c)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := 0
|
|
return xClient.Call(ctx, "StockOut", sourceOrderSn, &reply)
|
|
}
|
|
|
|
// Delivered @Title 订单妥投
|
|
func (c *callback) Delivered(ctx context.Context, sourceOrderSn string) error {
|
|
xClient, err := client.GetClient(c)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := 0
|
|
return xClient.Call(ctx, "Delivered", sourceOrderSn, &reply)
|
|
}
|
|
|
|
// Finish @Title 订单完成
|
|
func (c *callback) Finish(ctx context.Context, sourceOrderSn string) error {
|
|
xClient, err := client.GetClient(c)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := 0
|
|
return xClient.Call(ctx, "Finish", sourceOrderSn, &reply)
|
|
}
|
|
|
|
// Logistics @Title 更新包裹信息
|
|
func (c *callback) Logistics(ctx context.Context, sourceOrderSn string) error {
|
|
xClient, err := client.GetClient(c)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := 0
|
|
return xClient.Call(ctx, "Logistics", sourceOrderSn, &reply)
|
|
}
|
|
|
|
type ArgsCallbackAfsStepResult struct {
|
|
ReturnOrderCode string
|
|
ReturnOrderStatus int64
|
|
}
|
|
|
|
// AfsStepResult @Title 售后处理
|
|
func (c *callback) AfsStepResult(ctx context.Context, args ArgsCallbackAfsStepResult) error {
|
|
xClient, err := client.GetClient(c)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := 0
|
|
return xClient.Call(ctx, "AfsStepResult", args, &reply)
|
|
}
|