Updata:更新错误返回信息
This commit is contained in:
parent
d915175416
commit
f1b0c0d388
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user