diff --git a/backend/services/planting-service/src/application/services/planting-application.service.ts b/backend/services/planting-service/src/application/services/planting-application.service.ts index 86ef36d8..f3c8ab1b 100644 --- a/backend/services/planting-service/src/application/services/planting-application.service.ts +++ b/backend/services/planting-service/src/application/services/planting-application.service.ts @@ -24,9 +24,6 @@ import { FailureStage, } from '../../infrastructure/persistence/repositories/payment-compensation.repository'; -// 个人最大认种数量限制 -const MAX_TREES_PER_USER = 1000; - export interface CreateOrderResult { orderNo: string; treeCount: number; @@ -84,9 +81,6 @@ export class PlantingApplicationService { ): Promise { this.logger.log(`Creating order for user ${userId}, treeCount: ${treeCount}`); - // 风控检查 - await this.checkRiskControl(userId, treeCount); - // 检查余额 const balance = await this.walletService.getBalance(userId.toString()); const requiredAmount = treeCount * PRICE_PER_TREE; @@ -464,22 +458,6 @@ export class PlantingApplicationService { return { success: true }; } - /** - * 风控检查 - */ - private async checkRiskControl( - userId: bigint, - treeCount: number, - ): Promise { - // 检查用户限购 - const existingCount = await this.orderRepository.countTreesByUserId(userId); - if (existingCount + treeCount > MAX_TREES_PER_USER) { - throw new Error( - `超过个人最大认种数量限制: 已认种 ${existingCount} 棵, 本次 ${treeCount} 棵, 上限 ${MAX_TREES_PER_USER} 棵`, - ); - } - } - /** * 构建 Outbox 事件数据 *