From f1b0c0d388e1ae82d3f438f02b7226e14b771261 Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Mon, 13 Oct 2025 09:57:23 +0800 Subject: [PATCH] =?UTF-8?q?Updata:=E6=9B=B4=E6=96=B0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/bundleLogic.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/internal/logic/bundleLogic.go b/internal/logic/bundleLogic.go index 31d2718..46935c7 100644 --- a/internal/logic/bundleLogic.go +++ b/internal/logic/bundleLogic.go @@ -190,8 +190,21 @@ func SaveBundle(req *bundle.BundleProfile) (res *bundle.SaveResponse, err error) } if !dao.ValidateQuotaCompatibility(benefitsQuota, optionalQuota) { - return res, fmt.Errorf("服务类型%d的额度不兼容:套餐权益额度为%d,附加权益额度为%d", - detail.ServiceType, benefitsQuota.QuotaValue, optionalQuota.QuotaValue) + var serviceName string + switch detail.ServiceType { + case msg.VideoService: + serviceName = "视频" + case msg.TextService: + serviceName = "图文" + case msg.DataReportService: + serviceName = "数据报表" + case msg.AccountService: + serviceName = "账号数" + case msg.AvailableTimeService: + serviceName = "可用时长" + } + return res, fmt.Errorf("服务类型%s的额度不兼容:套餐权益额度为%d,附加权益额度为%d", + serviceName, benefitsQuota.QuotaValue, optionalQuota.QuotaValue) } }