Merge branch 'version/v0.1' of gitlab.trgame.cn:zyztech/zyz_server

# Conflicts:
#	shared/resource/jsons/dic_api.json
This commit is contained in:
luying
2022-01-19 13:46:57 +08:00
27 changed files with 86 additions and 68 deletions

View File

@@ -39,13 +39,13 @@ export default class HangUpRecord extends BaseModel {
received: boolean; // 是否已经领取true-领取false-未领取
public static async initRecord(roleId: string, roleName: string, lean = true) {
console.log('****** initRecord before')
// console.log('****** initRecord before')
const curTime = new Date();
const recDoc = new HangUpRecordModel();
const update = Object.assign(recDoc.toJSON(), {roleId, roleName, startTime: curTime, startLv: dicParam.TOWER_HANG_UP.TOWER_HANG_UP_ENABLE_LV + 1});
const rec: HangUpRecordType = await HangUpRecordModel.findOneAndUpdate({roleId, startLv: dicParam.TOWER_HANG_UP.TOWER_HANG_UP_ENABLE_LV + 1}, { $setOnInsert: update }, {upsert: true, new: true}).lean(lean);
console.log('****** initRecord after')
// console.log('****** initRecord after')
return rec;
}