Merge branch 'feat-hjj-packageManage#A116' into dev

This commit is contained in:
jiaji.H 2025-10-13 09:57:36 +08:00
commit d1647bb9cf

View File

@ -190,8 +190,21 @@ func SaveBundle(req *bundle.BundleProfile) (res *bundle.SaveResponse, err error)
} }
if !dao.ValidateQuotaCompatibility(benefitsQuota, optionalQuota) { if !dao.ValidateQuotaCompatibility(benefitsQuota, optionalQuota) {
return res, fmt.Errorf("服务类型%d的额度不兼容套餐权益额度为%d附加权益额度为%d", var serviceName string
detail.ServiceType, benefitsQuota.QuotaValue, optionalQuota.QuotaValue) 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)
} }
} }