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.
service/rpc/error.go

37 lines
1.1 KiB

2 years ago
package rpc
type Error uint
const (
ErrorSystem Error = 11001 // 系统错误
ErrorOrderRepeat Error = 11002 // 重复下单
2 years ago
ErrorOrderFreightFee Error = 11003 // 运费错误
2 years ago
ErrorOrderSubmit Error = 11004 // 下单失败
ErrorOrderShipment Error = 11005 // 无法配送
2 years ago
ErrorOrderSkuPrice Error = 11006 // 商品价格错误
ErrorOrderAmount Error = 11007 // 订单金额错误
ErrorOrderLadingBill Error = 11008 // 订单已提单
ErrorOrderClose Error = 11009 // 订单已关闭
ErrorOrderTimeOut Error = 11010 // 订单超时
2 years ago
ErrorOrderError Error = 11011 // 订单错误
2 years ago
)
var ErrorCodes = map[Error]string{
ErrorSystem: "系统错误",
ErrorOrderRepeat: "重复下单",
2 years ago
ErrorOrderFreightFee: "运费错误",
2 years ago
ErrorOrderSubmit: "下单失败",
ErrorOrderShipment: "无法配送",
2 years ago
ErrorOrderSkuPrice: "商品价格错误",
ErrorOrderAmount: "订单金额错误",
ErrorOrderLadingBill: "订单已提单",
ErrorOrderClose: "订单已关闭",
ErrorOrderTimeOut: "订单超时",
2 years ago
ErrorOrderError: "订单错误",
2 years ago
}
func (e Error) Error() string {
return ErrorCodes[e]
}