feat(authorization): 提高省团队权益初始激活门槛至3000棵

省团队(AUTH_PROVINCE_COMPANY)初始激活门槛: 500棵 → 3000棵

当前各角色初始激活门槛汇总:
- 社区(COMMUNITY): 100棵(上次已调整: 10→100)
- 市团队(AUTH_CITY_COMPANY): 500棵(上次已调整: 100→500)
- 省团队(AUTH_PROVINCE_COMPANY): 3000棵(本次调整: 500→3000)
- 市区域(CITY_COMPANY): 10000棵(未变)
- 省区域(PROVINCE_COMPANY): 50000棵(未变)

变更说明:
- 仅调整初始激活门槛,月度阶梯考核目标不变
- 已激活用户不受影响(祖父条款),仅对新申请的授权生效
- 数据库已有记录的 initialTargetTreeCount 保持旧值不变
- 需在服务器重新部署 authorization-service 后生效

修改文件:
- assessment-config.vo.ts: 核心门槛配置 500→3000
- authorization-application.service.ts: AUTH_PROVINCE_TARGET 常量及注释同步
- authorization.dto.ts: DTO 注释同步
- authorization.response.ts: ApiProperty 注释同步
- DEVELOPMENT_GUIDE.md: 文档说明同步

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-26 01:44:02 -08:00
parent 577979bc83
commit 023d71ac33
5 changed files with 7 additions and 7 deletions

View File

@ -37,8 +37,8 @@ Authorization Service 是 RWA 榴莲皇后平台的授权管理微服务,负
- 省公司团队权益20 USDT/棵 - 省公司团队权益20 USDT/棵
初始考核: 初始考核:
- 伞下团队认种总量达到500棵后权益自动生效 - 伞下团队认种总量达到3000棵后权益自动生效
- 考核的500棵权益归上级省公司所有无上级则归总部社区账户 - 考核的3000棵权益归上级省公司所有无上级则归总部社区账户
``` ```
### 2. 授权市公司功能 ### 2. 授权市公司功能

View File

@ -35,7 +35,7 @@ export class AuthorizationResponse {
@ApiProperty({ description: '是否豁免占比考核' }) @ApiProperty({ description: '是否豁免占比考核' })
exemptFromPercentageCheck: boolean exemptFromPercentageCheck: boolean
@ApiProperty({ description: '初始考核目标社区10市100省500' }) @ApiProperty({ description: '初始考核目标社区100市500省3000' })
initialTargetTreeCount: number initialTargetTreeCount: number
@ApiProperty({ description: '当前团队认种数量' }) @ApiProperty({ description: '当前团队认种数量' })

View File

@ -13,7 +13,7 @@ export interface AuthorizationDTO {
requireLocalPercentage: number requireLocalPercentage: number
exemptFromPercentageCheck: boolean exemptFromPercentageCheck: boolean
// 考核进度字段 // 考核进度字段
initialTargetTreeCount: number // 初始考核目标社区10市100省500 initialTargetTreeCount: number // 初始考核目标社区100市500省3000
currentTreeCount: number // 当前团队认种数量 currentTreeCount: number // 当前团队认种数量
monthlyTargetTreeCount: number // 月度考核目标社区固定10 monthlyTargetTreeCount: number // 月度考核目标社区固定10
createdAt: Date createdAt: Date

View File

@ -1669,7 +1669,7 @@ export class AuthorizationApplicationService {
for (const authProvince of expiredAuthProvinces) { for (const authProvince of expiredAuthProvinces) {
const accountSequence = authProvince.userId.accountSequence const accountSequence = authProvince.userId.accountSequence
const AUTH_PROVINCE_TARGET = 500 // 省团队授权固定目标500棵 const AUTH_PROVINCE_TARGET = 3000 // 省团队授权固定目标3000棵
// 使用 getTreesForAssessment 获取正确的考核数据 // 使用 getTreesForAssessment 获取正确的考核数据
const treesForAssessment = authProvince.getTreesForAssessment(now) const treesForAssessment = authProvince.getTreesForAssessment(now)
@ -2382,7 +2382,7 @@ export class AuthorizationApplicationService {
const rawSubordinateCount = stats?.subordinateTeamPlantingCount ?? 0 const rawSubordinateCount = stats?.subordinateTeamPlantingCount ?? 0
// 修复竞态条件:减去本次认种数量来还原"认种前"的下级团队数 // 修复竞态条件:减去本次认种数量来还原"认种前"的下级团队数
const currentTeamCount = Math.max(0, rawSubordinateCount - treeCount) const currentTeamCount = Math.max(0, rawSubordinateCount - treeCount)
const initialTarget = nearestAuthProvince.getInitialTarget() // 500棵 const initialTarget = nearestAuthProvince.getInitialTarget() // 3000棵
this.logger.debug( this.logger.debug(
`[getProvinceTeamRewardDistribution] rawSubordinateCount=${rawSubordinateCount}, treeCount=${treeCount}, currentTeamCount(before)=${currentTeamCount}`, `[getProvinceTeamRewardDistribution] rawSubordinateCount=${rawSubordinateCount}, treeCount=${treeCount}, currentTeamCount(before)=${currentTeamCount}`,

View File

@ -11,7 +11,7 @@ export class AssessmentConfig {
} }
static forAuthProvince(): AssessmentConfig { static forAuthProvince(): AssessmentConfig {
return new AssessmentConfig(500, MonthlyTargetType.LADDER) return new AssessmentConfig(3000, MonthlyTargetType.LADDER)
} }
static forProvince(): AssessmentConfig { static forProvince(): AssessmentConfig {