卡密,直充,订单结果msg处理
This commit is contained in:
parent
fe8e56420f
commit
50ab391039
|
@ -19,6 +19,13 @@ var orderStatusMap = map[OrderStatus]proto.Status{
|
|||
OrderFail: proto.Status_FAIL,
|
||||
}
|
||||
|
||||
var orderStatusTextMap = map[OrderStatus]string{
|
||||
OrderSuccess: "充值成功",
|
||||
OrderPending: "充值处理中",
|
||||
OrderFail: "充值失败",
|
||||
OrderAbnormal: "充值异常,处理中",
|
||||
}
|
||||
|
||||
func (o OrderStatus) IsSuccess() bool {
|
||||
return o == OrderSuccess
|
||||
}
|
||||
|
@ -41,3 +48,10 @@ func (o OrderStatus) GetOrderStatus() proto.Status {
|
|||
}
|
||||
return proto.Status_ING
|
||||
}
|
||||
|
||||
func (o OrderStatus) GetOrderStatusText() string {
|
||||
if text, ok := orderStatusTextMap[o]; ok {
|
||||
return text
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
|
|
@ -19,6 +19,13 @@ var orderStatusMap = map[OrderStatus]proto.Status{
|
|||
OrderFail: proto.Status_FAIL,
|
||||
}
|
||||
|
||||
var orderStatusTextMap = map[OrderStatus]string{
|
||||
OrderSuccess: "充值成功",
|
||||
OrderPending: "充值处理中",
|
||||
OrderFail: "充值失败",
|
||||
OrderAbnormal: "充值异常,处理中",
|
||||
}
|
||||
|
||||
func (o OrderStatus) IsSuccess() bool {
|
||||
return o == OrderSuccess
|
||||
}
|
||||
|
@ -41,3 +48,10 @@ func (o OrderStatus) GetOrderStatus() proto.Status {
|
|||
}
|
||||
return proto.Status_ING
|
||||
}
|
||||
|
||||
func (o OrderStatus) GetOrderStatusText() string {
|
||||
if text, ok := orderStatusTextMap[o]; ok {
|
||||
return text
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue