军团:许愿池修复

This commit is contained in:
luying
2022-05-10 15:14:20 +08:00
parent c02d02b3f6
commit e85eae5991
5 changed files with 39 additions and 23 deletions

View File

@@ -223,7 +223,7 @@ export default class UserGuild extends BaseModel {
}
public static async donateUpdate(roleId: string, dntRoleName: string, id: string, select?: string) {
const result: UserGuildType = await UserGuildModel.findOneAndUpdate({ roleId, status: USER_GUILD_STATUS.ON, 'wishGoods.id': id }, { $inc: { 'wishGoods.$.receiveCnt': 1, 'wishGoods.$.drawCnt': 1}, $push:{'wishGoods.$.dntRoleNames': dntRoleName} }, { new: true }).select(select).lean();
const result: UserGuildType = await UserGuildModel.findOneAndUpdate({ roleId, status: USER_GUILD_STATUS.ON, 'wishGoods.id': id }, { $inc: { 'wishGoods.$.receiveCnt': 1, 'wishGoods.$.drawCnt': 1}, $push:{'wishGoods.$.donateNames': dntRoleName} }, { new: true }).select(select).lean();
return result;
}
}