镇念塔:修复补发派遣任务奖励问题
This commit is contained in:
@@ -39,6 +39,7 @@ export class TaskHero {
|
||||
*/
|
||||
@index({ roleId: 1, status: 1 })
|
||||
@index({ batchCode: 1 })
|
||||
@index({ createdAt: -1 })
|
||||
export default class TowerTaskRec extends BaseModel {
|
||||
@prop({ required: true })
|
||||
roleId: string; // 角色 id
|
||||
@@ -71,7 +72,7 @@ export default class TowerTaskRec extends BaseModel {
|
||||
|
||||
public static async getPreTasks(roleId: string) {
|
||||
let today = getZeroPointD();
|
||||
const recs: TowerTaskRecType[] = await TowerTaskRecModel.find({ roleId, createdAt: { $lt: today }, status: TOWER_TASK_STATUS.DOINING }).sort({ position: 1}).lean();
|
||||
const recs: TowerTaskRecType[] = await TowerTaskRecModel.find({ roleId, createdAt: { $lt: today }, status: TOWER_TASK_STATUS.DOINING }).sort({ createdAt: -1, position: 1}).lean();
|
||||
return recs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user