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:
parent
577979bc83
commit
023d71ac33
|
|
@ -37,8 +37,8 @@ Authorization Service 是 RWA 榴莲皇后平台的授权管理微服务,负
|
|||
- 省公司团队权益:20 USDT/棵
|
||||
|
||||
初始考核:
|
||||
- 伞下团队认种总量达到500棵后权益自动生效
|
||||
- 考核的500棵权益归上级省公司所有(无上级则归总部社区账户)
|
||||
- 伞下团队认种总量达到3000棵后权益自动生效
|
||||
- 考核的3000棵权益归上级省公司所有(无上级则归总部社区账户)
|
||||
```
|
||||
|
||||
### 2. 授权市公司功能
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export class AuthorizationResponse {
|
|||
@ApiProperty({ description: '是否豁免占比考核' })
|
||||
exemptFromPercentageCheck: boolean
|
||||
|
||||
@ApiProperty({ description: '初始考核目标(社区10,市100,省500)' })
|
||||
@ApiProperty({ description: '初始考核目标(社区100,市500,省3000)' })
|
||||
initialTargetTreeCount: number
|
||||
|
||||
@ApiProperty({ description: '当前团队认种数量' })
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export interface AuthorizationDTO {
|
|||
requireLocalPercentage: number
|
||||
exemptFromPercentageCheck: boolean
|
||||
// 考核进度字段
|
||||
initialTargetTreeCount: number // 初始考核目标(社区10,市100,省500)
|
||||
initialTargetTreeCount: number // 初始考核目标(社区100,市500,省3000)
|
||||
currentTreeCount: number // 当前团队认种数量
|
||||
monthlyTargetTreeCount: number // 月度考核目标(社区固定10)
|
||||
createdAt: Date
|
||||
|
|
|
|||
|
|
@ -1669,7 +1669,7 @@ export class AuthorizationApplicationService {
|
|||
|
||||
for (const authProvince of expiredAuthProvinces) {
|
||||
const accountSequence = authProvince.userId.accountSequence
|
||||
const AUTH_PROVINCE_TARGET = 500 // 省团队授权固定目标:500棵
|
||||
const AUTH_PROVINCE_TARGET = 3000 // 省团队授权固定目标:3000棵
|
||||
|
||||
// 使用 getTreesForAssessment 获取正确的考核数据
|
||||
const treesForAssessment = authProvince.getTreesForAssessment(now)
|
||||
|
|
@ -2382,7 +2382,7 @@ export class AuthorizationApplicationService {
|
|||
const rawSubordinateCount = stats?.subordinateTeamPlantingCount ?? 0
|
||||
// 修复竞态条件:减去本次认种数量来还原"认种前"的下级团队数
|
||||
const currentTeamCount = Math.max(0, rawSubordinateCount - treeCount)
|
||||
const initialTarget = nearestAuthProvince.getInitialTarget() // 500棵
|
||||
const initialTarget = nearestAuthProvince.getInitialTarget() // 3000棵
|
||||
|
||||
this.logger.debug(
|
||||
`[getProvinceTeamRewardDistribution] rawSubordinateCount=${rawSubordinateCount}, treeCount=${treeCount}, currentTeamCount(before)=${currentTeamCount}`,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export class AssessmentConfig {
|
|||
}
|
||||
|
||||
static forAuthProvince(): AssessmentConfig {
|
||||
return new AssessmentConfig(500, MonthlyTargetType.LADDER)
|
||||
return new AssessmentConfig(3000, MonthlyTargetType.LADDER)
|
||||
}
|
||||
|
||||
static forProvince(): AssessmentConfig {
|
||||
|
|
|
|||
Loading…
Reference in New Issue