fix: 未使用的参数
This commit is contained in:
@@ -188,17 +188,17 @@ export default class UserGuild extends BaseModel {
|
||||
return userGuilds;
|
||||
}
|
||||
|
||||
public static async pushAndUpdate(roleId: string, update: UserGuildUpdateParam, pushData:{wishGoods?: WishGood}, select?: string, lean = true) {
|
||||
public static async pushAndUpdate(roleId: string, update: UserGuildUpdateParam, pushData:{wishGoods?: WishGood}, select?: string) {
|
||||
const result: UserGuildType = await UserGuildModel.findOneAndUpdate({ roleId, status: USER_GUILD_STATUS.ON }, { $set: update, $push: pushData }, { new: true }).select(select).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async donateGoods(roleId: string, wishDntCnt: number, select?: string, lean = true) {
|
||||
public static async donateGoods(roleId: string, wishDntCnt: number, select?: string) {
|
||||
const result: UserGuildType = await UserGuildModel.findOneAndUpdate({ roleId, status: USER_GUILD_STATUS.ON }, { $inc: { wishDntCnt } }, { new: true }).select(select).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async donateUpdate(roleId: string, id: string, select?: string, lean = true) {
|
||||
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();
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user