From 2f4fe9f1e91793b539a8d38266c4727b4a20c453 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 30 Nov 2022 16:25:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rpc/error.go | 82 ++++++++++++++++++---------------- supply/channel/afterService.go | 4 ++ 2 files changed, 47 insertions(+), 39 deletions(-) diff --git a/rpc/error.go b/rpc/error.go index 4592d5d..203d156 100644 --- a/rpc/error.go +++ b/rpc/error.go @@ -5,48 +5,52 @@ type Error uint const ( ErrorSystem Error = 11001 // 系统错误 - ErrorOrderRepeat Error = 11002 // 重复下单 - ErrorOrderFreightFee Error = 11003 // 运费错误 - ErrorOrderSubmit Error = 11004 // 下单失败 - ErrorOrderShipment Error = 11005 // 无法配送 - ErrorOrderSkuPrice Error = 11006 // 商品价格错误 - ErrorOrderAmount Error = 11007 // 订单金额错误 - ErrorOrderLadingBill Error = 11008 // 订单已提单 - ErrorOrderClose Error = 11009 // 订单已关闭 - ErrorOrderTimeOut Error = 11010 // 订单超时 - ErrorOrderError Error = 11011 // 订单错误 - ErrorOrderUnPay Error = 11012 // 订单未支付 - ErrorOrderInvalid Error = 11013 // 订单失效 - ErrorOrderSkuInvalid Error = 11014 // 订单商品错误 - ErrorAfterServiceTypeError Error = 11015 // 售后类型错误 - ErrorAfterServiceReasonError Error = 11016 // 售后原因错误 - ErrorAfterServiceError Error = 11017 // 售后单错误 - ErrorAfterServiceCloseError Error = 11018 // 售后已关闭 - ErrorAfterServiceFinishError Error = 11019 // 售后已完成 - ErrorOrderCancelError Error = 11020 // 订单取消失败 + ErrorOrderRepeat Error = 11002 // 重复下单 + ErrorOrderFreightFee Error = 11003 // 运费错误 + ErrorOrderSubmit Error = 11004 // 下单失败 + ErrorOrderShipment Error = 11005 // 无法配送 + ErrorOrderSkuPrice Error = 11006 // 商品价格错误 + ErrorOrderAmount Error = 11007 // 订单金额错误 + ErrorOrderLadingBill Error = 11008 // 订单已提单 + ErrorOrderClose Error = 11009 // 订单已关闭 + ErrorOrderTimeOut Error = 11010 // 订单超时 + ErrorOrderError Error = 11011 // 订单错误 + ErrorOrderUnPay Error = 11012 // 订单未支付 + ErrorOrderInvalid Error = 11013 // 订单失效 + ErrorOrderSkuInvalid Error = 11014 // 订单商品错误 + ErrorAfterServiceTypeError Error = 11015 // 售后类型错误 + ErrorAfterServiceReasonError Error = 11016 // 售后原因错误 + ErrorAfterServiceError Error = 11017 // 售后单错误 + ErrorAfterServiceCloseError Error = 11018 // 售后已关闭 + ErrorAfterServiceFinishError Error = 11019 // 售后已完成 + ErrorOrderCancelError Error = 11020 // 订单取消失败 + ErrorAfterServiceLogisticsAddressError Error = 11021 // 售后寄回地址获取失败 + ErrorAfterServiceLogisticsAddressReturnError Error = 11022 // 售后寄回地址已回传 ) var ErrorCodes = map[Error]string{ - ErrorSystem: "系统错误", - ErrorOrderRepeat: "重复下单", - ErrorOrderFreightFee: "运费错误", - ErrorOrderSubmit: "下单失败", - ErrorOrderShipment: "无法配送", - ErrorOrderSkuPrice: "商品价格错误", - ErrorOrderAmount: "订单金额错误", - ErrorOrderLadingBill: "订单已提单", - ErrorOrderClose: "订单已关闭", - ErrorOrderTimeOut: "订单超时", - ErrorOrderError: "订单错误", - ErrorOrderUnPay: "订单未支付", - ErrorOrderInvalid: "订单失效", - ErrorOrderSkuInvalid: "订单商品错误", - ErrorAfterServiceTypeError: "售后类型错误", - ErrorAfterServiceReasonError: "售后原因错误", - ErrorAfterServiceError: "售后单错误", - ErrorAfterServiceCloseError: "售后已关闭", - ErrorAfterServiceFinishError: "售后已完成", - ErrorOrderCancelError: "订单取消失败", + ErrorSystem: "系统错误", + ErrorOrderRepeat: "重复下单", + ErrorOrderFreightFee: "运费错误", + ErrorOrderSubmit: "下单失败", + ErrorOrderShipment: "无法配送", + ErrorOrderSkuPrice: "商品价格错误", + ErrorOrderAmount: "订单金额错误", + ErrorOrderLadingBill: "订单已提单", + ErrorOrderClose: "订单已关闭", + ErrorOrderTimeOut: "订单超时", + ErrorOrderError: "订单错误", + ErrorOrderUnPay: "订单未支付", + ErrorOrderInvalid: "订单失效", + ErrorOrderSkuInvalid: "订单商品错误", + ErrorAfterServiceTypeError: "售后类型错误", + ErrorAfterServiceReasonError: "售后原因错误", + ErrorAfterServiceError: "售后单错误", + ErrorAfterServiceCloseError: "售后已关闭", + ErrorAfterServiceFinishError: "售后已完成", + ErrorOrderCancelError: "订单取消失败", + ErrorAfterServiceLogisticsAddressError: "售后寄回地址获取失败", + ErrorAfterServiceLogisticsAddressReturnError: "售后寄回地址已回传", } func (e Error) Error() string { diff --git a/supply/channel/afterService.go b/supply/channel/afterService.go index 8326048..e5e11c5 100644 --- a/supply/channel/afterService.go +++ b/supply/channel/afterService.go @@ -14,6 +14,10 @@ const ( AfterServiceStatusHandle = 3 // 收货处理中 AfterServiceStatusFinal = 4 // 售后完成 AfterServiceStatusClose = 5 // 售后关闭 + + AfterServicePackageSendNone = 1 // 无 + AfterServicePackageSendWait = 2 // 待客户发货 + AfterServicePackageSendAlready = 3 // 客户已发货 ) type afterService struct {