From aa3df428b141ba4195c2ac6bd37ab6f11d5be698 Mon Sep 17 00:00:00 2001 From: zhouyonggao <1971162852@qq.com> Date: Thu, 18 Dec 2025 15:27:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(api):=20=E6=94=AF=E6=8C=81voucher.is=5Fweb?= =?UTF-8?q?view=E5=AD=97=E6=AE=B5=E5=A4=9A=E8=AF=AD=E8=A8=80=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增voucher.is_webview字段的转换,将0、1、2映射为微信小程序、公众号、通用 - 优化导出接口中voucher打开方式的显示逻辑 - 在枚举常量中添加MarketingSettlementType的未设置状态0映射说明 --- server/internal/api/exports.go | 12 ++++++++++++ server/internal/constants/enums.go | 1 + 2 files changed, 13 insertions(+) diff --git a/server/internal/api/exports.go b/server/internal/api/exports.go index f71172d..b4e6c65 100644 --- a/server/internal/api/exports.go +++ b/server/internal/api/exports.go @@ -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 { diff --git a/server/internal/constants/enums.go b/server/internal/constants/enums.go index 1f2958b..3cb23d7 100644 --- a/server/internal/constants/enums.go +++ b/server/internal/constants/enums.go @@ -90,6 +90,7 @@ var YMTSettlementType = map[int]string{ // MarketingSettlementType 营销系统结算方式映射 var MarketingSettlementType = map[int]string{ + 0: "未设置", 1: "发放结算", 2: "打开结算", 3: "打开成功结算",