单次记录增加跳过绑定检查的功能,以防止新加的记录由于用户参加过预充值而无法查询到的问题

This commit is contained in:
CounterFire2023 2024-10-09 14:56:22 +08:00
parent 7f15bed3ea
commit fb24772d29
2 changed files with 18 additions and 8 deletions

View File

@ -72,7 +72,8 @@ const queryCECClaimStatus = async (address: string) => {
if (CEC_CLAIM_STAGE === 0) { if (CEC_CLAIM_STAGE === 0) {
available += (currentTotal * BigInt(val.rate)) / 100n available += (currentTotal * BigInt(val.rate)) / 100n
} else { } else {
if (bindRecord && !bindRecord.invalid) { // 预充值, 且记录有效, 且没有跳过绑定检查
if (bindRecord && !bindRecord.invalid && !record.skipBind) {
claimed += (currentTotal * BigInt(val.rate)) / 100n claimed += (currentTotal * BigInt(val.rate)) / 100n
} else if (val.status === ClaimStatusEnum.NORMAL){ } else if (val.status === ClaimStatusEnum.NORMAL){
available += (currentTotal * BigInt(val.rate)) / 100n available += (currentTotal * BigInt(val.rate)) / 100n

View File

@ -57,13 +57,14 @@ export class CECRecordTotalClass extends BaseModule {
* p2a: 2, 3 * p2a: 2, 3
* game test parse 1: 4 * game test parse 1: 4
* Loyalty Points Rewards: 5 * Loyalty Points Rewards: 5
* Badge staking rewards: 6, 7 * Badge staking rewards: 6, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25
* Gacha Journey: 8, 9 * Gacha Journey: 8, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25
* Rase of Gacha: 10, 11 * Rase of Gacha: 10, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25
* game season rank: 12, 13 * game season rank: 12, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25
* hash rate rewards: 14, 15 * hash rate rewards: 14, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25
* old game event: 16, 17 * old game event: 16, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25
* p2e season 2: 18 * discord ticket: 26, 7, 9, 11, 13, 15, 17, 20, 21, 22, 23, 24, 25
* p2e season 2(Contribution Clash): 18
* founder's tag holder: 19 * founder's tag holder: 19
*/ */
@prop({ type: () => ClaimStatus, _id: false }) @prop({ type: () => ClaimStatus, _id: false })
@ -78,6 +79,14 @@ export class CECRecordTotalClass extends BaseModule {
@prop() @prop()
public firstRate: number public firstRate: number
/**
*
* 1: 跳过
* 0: 不跳过
*/
@prop()
public skipBind: number
@prop({ enum: CECStatusEnum, default: CECStatusEnum.NORMAL }) @prop({ enum: CECStatusEnum, default: CECStatusEnum.NORMAL })
public status: CECStatusEnum public status: CECStatusEnum