Merge branch 'master' of git.oa00.com:supply-chain/service

finance
黄伟 2 years ago
commit 28740fd189

@ -23,6 +23,7 @@ const (
ErrorAfterServiceError Error = 11017 // 售后单错误 ErrorAfterServiceError Error = 11017 // 售后单错误
ErrorAfterServiceCloseError Error = 11018 // 售后已关闭 ErrorAfterServiceCloseError Error = 11018 // 售后已关闭
ErrorAfterServiceFinishError Error = 11019 // 售后已完成 ErrorAfterServiceFinishError Error = 11019 // 售后已完成
ErrorOrderCancelError Error = 11020 // 订单取消失败
) )
var ErrorCodes = map[Error]string{ var ErrorCodes = map[Error]string{
@ -45,6 +46,7 @@ var ErrorCodes = map[Error]string{
ErrorAfterServiceError: "售后单错误", ErrorAfterServiceError: "售后单错误",
ErrorAfterServiceCloseError: "售后已关闭", ErrorAfterServiceCloseError: "售后已关闭",
ErrorAfterServiceFinishError: "售后已完成", ErrorAfterServiceFinishError: "售后已完成",
ErrorOrderCancelError: "订单取消失败",
} }
func (e Error) Error() string { func (e Error) Error() string {

@ -121,14 +121,19 @@ func (o *order) Close(ctx context.Context, channelId string, orderSn string) (er
return xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Close", orderSn, &reply) return xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Close", orderSn, &reply)
} }
type ArgsOrderChannel struct {
OrderSn string // 订单编号
Reason string // 取消原因
}
// Cancel @Title 订单取消 // Cancel @Title 订单取消
func (o *order) Cancel(ctx context.Context, channelId string, orderSn string) (err error) { func (o *order) Cancel(ctx context.Context, channelId string, args ArgsOrderChannel) (err error) {
reply := 0 reply := 0
xClient, err := client.GetClient(o) xClient, err := client.GetClient(o)
if err != nil { if err != nil {
return return
} }
return xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Cancel", orderSn, &reply) return xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Cancel", args, &reply)
} }
type OrderListsSearch struct { type OrderListsSearch struct {

@ -15,12 +15,16 @@ type OrderInterface interface {
// Close @Title 关闭订单 // Close @Title 关闭订单
Close(ctx context.Context, orderSn string, reply *int) error Close(ctx context.Context, orderSn string, reply *int) error
// Cancel @Title 取消订单 // Cancel @Title 取消订单
Cancel(ctx context.Context, orderSn string, reply *int) error Cancel(ctx context.Context, args ArgsOrderCancel, reply *int) error
// Trajectory @Title 物流轨迹 // Trajectory @Title 物流轨迹
Trajectory(ctx context.Context, orderSn string, reply *[]ReplyTrajectory) error Trajectory(ctx context.Context, orderSn string, reply *[]ReplyTrajectory) error
// Finish @Title 确认收货 // Finish @Title 确认收货
Finish(ctx context.Context, orderSn string, reply *int) error Finish(ctx context.Context, orderSn string, reply *int) error
} }
type ArgsOrderCancel struct {
OrderSn string // 订单编号
Reason string // 取消原因
}
type ArgsOrderFreightFee struct { type ArgsOrderFreightFee struct {
Skus []OrderFreightFeeSkuItem // 商品信息 Skus []OrderFreightFeeSkuItem // 商品信息
Address string // 地址 Address string // 地址

Loading…
Cancel
Save