feat(api): 支持voucher.is_webview字段多语言转换

- 新增voucher.is_webview字段的转换,将0、1、2映射为微信小程序、公众号、通用
- 优化导出接口中voucher打开方式的显示逻辑
- 在枚举常量中添加MarketingSettlementType的未设置状态0映射说明
This commit is contained in:
zhouyonggao 2025-12-18 15:27:44 +08:00
parent 326eec184f
commit aa3df428b1
2 changed files with 13 additions and 0 deletions

View File

@ -1131,6 +1131,18 @@ func transformRow(ds string, fields []string, vals []string) []string {
}
continue
}
// voucher.is_webview - 打开方式
if f == "voucher.is_webview" {
switch v {
case "0":
vals[i] = "微信小程序"
case "1":
vals[i] = "公众号"
case "2":
vals[i] = "通用"
}
continue
}
// order_cash.channel - 红包渠道
if f == "order_cash.channel" {
if n := parseIntVal(v); n >= 0 {

View File

@ -90,6 +90,7 @@ var YMTSettlementType = map[int]string{
// MarketingSettlementType 营销系统结算方式映射
var MarketingSettlementType = map[int]string{
0: "未设置",
1: "发放结算",
2: "打开结算",
3: "打开成功结算",