修改util链接为相对路径;删掉注释

This commit is contained in:
liangtongchuan
2020-10-16 15:15:21 +08:00
parent bd6646c6fe
commit c8a826466b
5 changed files with 3 additions and 17 deletions

View File

@@ -1 +1 @@
/Users/bantu/zyz_server/shared/pubUtils
../../shared/pubUtils

View File

@@ -156,7 +156,7 @@ export default class Role extends BaseModel {
if (cnt < 0) return null;
const result = await RoleModel.findOneAndUpdate({roleId}, {$inc: {hangUpSpdUpCnt: -cnt}, lastSpdUpTime: curTime}, {new: true}).lean(lean);
const lastSpdUpTime = result?result.lastSpdUpTime: curTime;
const lastSpdUpTime = result?result.lastSpdUpTime: curTime;
let role = null;
if (shouldRefresh(lastSpdUpTime, curTime, HANG_UP_CONSTS.REFRESH_TIME, 1) && cnt <= HANG_UP_CONSTS.MAX_SPD_UP_CNT) {
role = await RoleModel.findOneAndUpdate({roleId}, {hangUpSpdUpCnt: HANG_UP_CONSTS.MAX_SPD_UP_CNT - cnt, lastSpdUpTime: curTime}, {new: true}).lean(lean);

View File

@@ -1,17 +1,6 @@
import BaseModel from './BaseModel';
import { index, getModelForClass, prop } from '@typegoose/typegoose';
// class TowerTask {
// @prop({ required: true })
// id: number; // 任务唯一 Id来自任务表
// @prop({ required: true})
// taskCode: string; // 服务器生成的任务唯一编号
// @prop({ required: true, type: Number, default: []})
// heroes: Array<number>; // 派遣武将 hid
// @prop({ required: true })
// status: boolean; // 派遣任务当前状态0-可派遣1-已派遣2-已完成3-已领取
// }
function genCodeTmp(len) {
const chars = '123456789ABCDEFGHJKLMNPQRSTWXYZabcdefghijklmnopqrstuvwxyz';
const charArr = chars.split('');

View File

@@ -1,9 +1,6 @@
import { getGamedata } from './gamedata';
// import { CounterModel } from '../db/Counter';
// import { EquipModel } from '../db/Equip';
import { HeroModel } from '../db/Hero';
// import { GOOD_TYPE } from '../consts/consts';
const moment = require('moment');
export function genCode(len) {

View File

@@ -1 +1 @@
/Users/bantu/zyz_server/shared/pubUtils
../../shared/pubUtils