远征:修改碾压判断条件
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
|
||||
import { genCode } from '../pubUtils/util';
|
||||
import { RoleModel } from './Role';
|
||||
|
||||
class Heroes {
|
||||
@prop({ required: true })
|
||||
@@ -41,6 +42,7 @@ export default class ExpeditionRecord extends BaseModel {
|
||||
const code = genCode(8);
|
||||
|
||||
const result: ExpeditionRecordType = await ExpeditionRecordModel.findOneAndUpdate({ expeditionCode: code }, {...params, status: 1}, { new: true, upsert: true }).lean(lean);
|
||||
await RoleModel.increaseExpeditionCnt(params.roleId, 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user