fix: 后台平台自营与赠送套餐订单不再按 C 端购买跳过实名门槛
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m29s

isCEndPurchase 只看 buyer_type=personal,后台平台自营资产与赠送套餐线下订单
买家也记为 personal,导致未实名资产的实名即生效套餐下单即生效、不进沉默期。
增加订单来源为 client 的条件,与同文件其他 C 端判定保持一致。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
邹进
2026-10-27 17:30:53 +09:00
parent 94b6cfb47a
commit 69ec98aa5f
2 changed files with 111 additions and 1 deletions

View File

@@ -2697,7 +2697,8 @@ func (s *Service) activateMainPackage(ctx context.Context, tx *gorm.DB, order *m
}
// 判断是否 C 端购买(C 端购买前已做实名前置检查,直接激活)
isCEndPurchase := order.BuyerType == model.BuyerTypePersonal
// 后台平台自营 / 赠送订单的买家也记为 personal,但未做实名前置检查,须按来源区分
isCEndPurchase := order.Source == constants.OrderSourceClient && order.BuyerType == model.BuyerTypePersonal
if !isCEndPurchase {
// 后台囤货路径:按 expiry_base 决定是否等实名