fix(realname): C 端实名检查改为按卡类型判断 REALNAME-03
- 删除 packagesNeedRealname 函数(依赖已废弃的 EnableRealnameActivation) - 改为按 assetInfo.CardCategory==normal 判断是否需要实名 - 行业卡(industry)绕过实名检查,普通卡(normal)需要实名
This commit is contained in:
@@ -112,7 +112,8 @@ func (s *Service) CreateOrder(ctx context.Context, customerID uint, req *dto.Cli
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if packagesNeedRealname(validationResult.Packages) && assetInfo.RealNameStatus != constants.RealNameStatusVerified {
|
||||
// REALNAME-03: 按卡类型判断实名需求,普通卡需要实名,行业卡不需要
|
||||
if assetInfo.CardCategory == "normal" && assetInfo.RealNameStatus != constants.RealNameStatusVerified {
|
||||
return nil, errors.New(errors.CodeNeedRealname)
|
||||
}
|
||||
|
||||
@@ -616,15 +617,6 @@ func resolveSellerShopID(result *purchase_validation.PurchaseValidationResult) u
|
||||
return 0
|
||||
}
|
||||
|
||||
func packagesNeedRealname(packages []*model.Package) bool {
|
||||
for _, pkg := range packages {
|
||||
if pkg != nil && pkg.EnableRealnameActivation {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func extractPackageIDs(packages []*model.Package) []uint {
|
||||
ids := make([]uint, 0, len(packages))
|
||||
for _, pkg := range packages {
|
||||
|
||||
Reference in New Issue
Block a user