🐞 fix(gvg): 帮收玩家名记录错误
This commit is contained in:
@@ -317,7 +317,7 @@ export async function getContribute(myUserData: GVGUserDataType) {
|
||||
}
|
||||
|
||||
export async function getLeagueRankBox(configId: number, leagueCode: string, roleId: string) {
|
||||
let canReceiveLeagueRanks = await GVGVestigeLeagueRankModel.getCanReceiveRanks(configId, leagueCode);
|
||||
let canReceiveLeagueRanks = await GVGVestigeLeagueRankModel.getCanReceiveRanks(configId, leagueCode, roleId);
|
||||
let canReceivePlayerRanks = await GVGVestigeSumRankModel.getCanReceiveRanks(configId, roleId);
|
||||
let { canReceiveBox } = calVestigeLeagueBoxRewards(canReceiveLeagueRanks, canReceivePlayerRanks);
|
||||
return { canReceiveBox }
|
||||
|
||||
@@ -108,9 +108,9 @@ export default class GVGLeagueFarm extends BaseModel {
|
||||
}));
|
||||
const result = await GVGLeagueFarmModel.bulkWrite(lands.map(({ fieldId, addType }) => {
|
||||
if(addType > 0) {
|
||||
return { updateOne: { filter: { configId, leagueCode, farmId, fieldId, $or:[{ unlockTime: { $lt: nowSeconds() }}, {lockRoleId: roleId, lockRoleName: roleName} ] }, update: { $set: { addType, unlockTime: nowSeconds() + GVG.GVG_FARM_LOCK_TIME, lockRoleId: roleId }, $push: { addTypes: { addType, roleId } } } } }
|
||||
return { updateOne: { filter: { configId, leagueCode, farmId, fieldId, $or:[{ unlockTime: { $lt: nowSeconds() }}, {lockRoleId: roleId } ] }, update: { $set: { addType, unlockTime: nowSeconds() + GVG.GVG_FARM_LOCK_TIME, lockRoleId: roleId, lockRoleName: roleName }, $push: { addTypes: { addType, roleId } } } } }
|
||||
} else {
|
||||
return { updateOne: { filter: { configId, leagueCode, farmId, fieldId, $or:[{ unlockTime: { $lt: nowSeconds() }}, {lockRoleId: roleId, lockRoleName: roleName} ] }, update: { $set: { addType, unlockTime: nowSeconds() + GVG.GVG_FARM_LOCK_TIME, lockRoleId: roleId } } } }
|
||||
return { updateOne: { filter: { configId, leagueCode, farmId, fieldId, $or:[{ unlockTime: { $lt: nowSeconds() }}, {lockRoleId: roleId } ] }, update: { $set: { addType, unlockTime: nowSeconds() + GVG.GVG_FARM_LOCK_TIME, lockRoleId: roleId, lockRoleName: roleName } } } }
|
||||
}
|
||||
}));
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user