Browse Source

增加状态查询方法

master v0.3.4
guzeng 3 years ago
parent
commit
aee06f252a
1 changed files with 22 additions and 0 deletions
  1. +22
    -0
      status..go

+ 22
- 0
status..go View File

@ -0,0 +1,22 @@
package orderrpcv2
func GetStatus(key string) string {
statusList := StatusList()
if _, ok := statusList[key]; ok {
return statusList[key]
}
return ""
}
func StatusList() map[string]string {
return map[string]string{
"created": "已创建",
"payed": "已支付",
"finished": "已完成",
"autofinished": "自动完成",
"cancel": "取消",
"autocancel": "自动取消",
"closed": "关闭",
"shipped": "已发货",
}
}

Loading…
Cancel
Save