训练场宝箱展示bug
This commit is contained in:
@@ -24,6 +24,8 @@ class WishGood {
|
||||
receiveCnt: number;
|
||||
@prop({ required: true, default:0 })
|
||||
drawCnt: number;
|
||||
@prop({ required: true, type: String, default: [] })
|
||||
donateNames: string[];
|
||||
}
|
||||
|
||||
|
||||
@@ -198,8 +200,8 @@ export default class UserGuild extends BaseModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async donateUpdate(roleId: 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} }, { new: true }).select(select).lean();
|
||||
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();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user