修复错误购买报错的问题,修复接口返回虚流量启动错误的问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m48s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m48s
This commit is contained in:
@@ -212,21 +212,6 @@ func (s *Service) validatePackageUsageRules(ctx context.Context, carrierType str
|
||||
return errors.New(errors.CodeMainPackageExists, "一次只能购买一个主套餐")
|
||||
}
|
||||
|
||||
if formalCount == 1 {
|
||||
hasBlockingMain, err := packagepkg.HasBlockingMainPackageForFormal(
|
||||
s.db.WithContext(ctx),
|
||||
carrierType,
|
||||
carrierID,
|
||||
time.Now(),
|
||||
)
|
||||
if err != nil {
|
||||
return errors.Wrap(errors.CodeDatabaseError, err, "查询主套餐失败")
|
||||
}
|
||||
if hasBlockingMain {
|
||||
return errors.New(errors.CodeMainPackageExists)
|
||||
}
|
||||
}
|
||||
|
||||
if hasAddon {
|
||||
if _, err := packagepkg.FindAttachableMainPackageForAddon(
|
||||
s.db.WithContext(ctx),
|
||||
|
||||
Reference in New Issue
Block a user