拍卖行:增加测试接口和用例
This commit is contained in:
@@ -67,7 +67,7 @@ export default class Dividend extends BaseModel {
|
||||
}
|
||||
|
||||
public static async findReadyDividend(guildCode: string, sourceType: number) {
|
||||
const result: DividendType = await DividendModel.findOne({ guildCode, sourceType, status: DIVIDEND_STATUS.END }).select('-_id -__v').lean();
|
||||
const result: DividendType = await DividendModel.findOne({ guildCode, sourceType, status: DIVIDEND_STATUS.ING }).select('-_id -__v').lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -76,8 +76,8 @@ export default class Dividend extends BaseModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async updateDividendReady(guildCode: string, sourceType: number) {
|
||||
const result: DividendType = await DividendModel.findOneAndUpdate({ guildCode, sourceType }, { status: DIVIDEND_STATUS.END }, { new: true }).select('-_id -__v').lean();
|
||||
public static async updateDividendStatus(guildCode: string, sourceType: number, status: number) {
|
||||
const result: DividendType = await DividendModel.findOneAndUpdate({ guildCode, sourceType }, { status }, { new: true }).select('-_id -__v').lean();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user