Compare commits
2 Commits
7fe3cfe17b
...
d1647bb9cf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1647bb9cf | ||
|
|
f1b0c0d388 |
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user