🐞 fix(gvg): 帮收玩家名记录错误
This commit is contained in:
@@ -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