feat(api): 添加立减金主体类型映射及展示支持

- 在导出接口中将goods_voucher_subject_config.type字段的数值映射为对应标签显示
- 新增VoucherSubjectType映射,支持支付宝、微信、云闪付三种主体类型
- 修改字段标签描述,将“主体类型”更新为“立减金主体类型”以更准确表达含义
This commit is contained in:
zhouyonggao 2025-12-18 16:57:17 +08:00
parent 544a883dac
commit dcd4992bc8
3 changed files with 17 additions and 1 deletions

View File

@ -1146,6 +1146,15 @@ func transformRow(ds string, fields []string, vals []string) []string {
}
continue
}
// goods_voucher_subject_config.type - 主体类型
if f == "goods_voucher_subject_config.type" {
if n := parseIntVal(v); n >= 0 {
if label, ok := constants.VoucherSubjectType[n]; ok {
vals[i] = label
}
}
continue
}
// order_cash.channel - 红包渠道
if f == "order_cash.channel" {
if n := parseIntVal(v); n >= 0 {

View File

@ -217,6 +217,13 @@ var YMTVoucherReceiveMode = map[int]string{
2: "账号领取",
}
// VoucherSubjectType 立减金主体类型映射
var VoucherSubjectType = map[int]string{
1: "支付宝",
2: "微信",
3: "云闪付",
}
// OrderDigitOrderType 数字订单类型映射
var OrderDigitOrderType = map[int]string{
1: "直充",

View File

@ -199,7 +199,7 @@ func AllLabels() map[string]string {
"goods_voucher_batch.update_time": "更新时间",
"goods_voucher_subject_config.id": "主体配置ID",
"goods_voucher_subject_config.name": "主体名称",
"goods_voucher_subject_config.type": "主体类型",
"goods_voucher_subject_config.type": "立减金主体类型",
"goods_voucher_subject_config.create_time": "创建时间",
"merchant.id": "客户ID",
"merchant.name": "客户名称",