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.
|
|
|
package order
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.oa00.com/supply-chain/service/client"
|
|
|
|
"github.com/shopspring/decimal"
|
|
|
|
"golang.org/x/net/context"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Order struct {
|
|
|
|
order
|
|
|
|
}
|
|
|
|
|
|
|
|
type order struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
type ArgsOrderFreightFee struct {
|
|
|
|
OrderSn string
|
|
|
|
FreightFee decimal.Decimal
|
|
|
|
FreightFile string
|
|
|
|
}
|
|
|
|
|
|
|
|
// FreightFee @Title 运费处理
|
|
|
|
func (o *order) FreightFee(ctx context.Context, args ArgsOrderFreightFee) (err error) {
|
|
|
|
xClient, err := client.GetClient(o)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
reply := 0
|
|
|
|
err = xClient.Call(ctx, "FreightFee", args, &reply)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Close @Title 订单关闭
|
|
|
|
func (o *order) Close(ctx context.Context, orderSn string) (err error) {
|
|
|
|
xClient, err := client.GetClient(o)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
reply := 0
|
|
|
|
err = xClient.Call(ctx, "Close", orderSn, &reply)
|
|
|
|
return
|
|
|
|
}
|