feat(api): 添加红包状态映射转换功能
- 在导出API中添加对order_cash.status字段的状态转换处理 - 实现红包状态数值到字符串标签的映射(正常、已过期) - 在constants中新增MarketingOrderCashStatus枚举映射 - 保证红包状态值在有效范围时进行转换显示
This commit is contained in:
parent
51bc4f8faa
commit
ccb90005fe
|
|
@ -1158,6 +1158,15 @@ func transformRow(ds string, fields []string, vals []string) []string {
|
|||
}
|
||||
continue
|
||||
}
|
||||
// order_cash.status - 红包状态(营销系统)
|
||||
if f == "order_cash.status" {
|
||||
if n := parseIntVal(v); n >= 0 {
|
||||
if label, ok := constants.MarketingOrderCashStatus[n]; ok {
|
||||
vals[i] = label
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
// order_digit.order_type - 数字订单类型
|
||||
if f == "order_digit.order_type" {
|
||||
if n := parseIntVal(v); n >= 0 {
|
||||
|
|
|
|||
|
|
@ -137,6 +137,12 @@ var KeyBatchStyle = map[int]string{
|
|||
6: "白名单",
|
||||
}
|
||||
|
||||
// MarketingOrderCashStatus 营销系统红包状态映射
|
||||
var MarketingOrderCashStatus = map[int]string{
|
||||
1: "正常",
|
||||
2: "已过期",
|
||||
}
|
||||
|
||||
// ==================== 通用枚举 ====================
|
||||
|
||||
// ThirdPartyType 第三方类型映射
|
||||
|
|
|
|||
Loading…
Reference in New Issue