feat(api): 添加key码API发放状态字段转换功能

- 在导出接口中新增merchant_key_send.status字段的转换逻辑
- 根据状态码映射常量将状态值转换为中文标签
- 增加MerchantKeySendStatus枚举定义,包含已发放、已核销、已作废和充值中状态
- 优化导出数据时的特殊字段处理流程
This commit is contained in:
zhouyonggao 2025-12-18 15:46:53 +08:00
parent 1c169cf2d7
commit 8fb3eeee42
2 changed files with 17 additions and 0 deletions

View File

@ -1227,6 +1227,15 @@ func transformRow(ds string, fields []string, vals []string) []string {
}
continue
}
// merchant_key_send.status - key码API发放状态
if f == "merchant_key_send.status" {
if n := parseIntVal(v); n >= 0 {
if label, ok := constants.MerchantKeySendStatus[n]; ok {
vals[i] = label
}
}
continue
}
// ==================== 特殊字段转换 ====================
// 解密/转换订单 key

View File

@ -143,6 +143,14 @@ var MarketingOrderCashStatus = map[int]string{
2: "已过期",
}
// MerchantKeySendStatus key码API发放状态映射
var MerchantKeySendStatus = map[int]string{
1: "已发放",
2: "已核销",
3: "已作废",
4: "充值中",
}
// ==================== 通用枚举 ====================
// ThirdPartyType 第三方类型映射