wangrong
7 小时以前 0d90e20ec20f0aeee642756a7ebf9e8514174124
src/modules/cs/service/session.ts
@@ -1,5 +1,5 @@
import { Provide } from '@midwayjs/core';
import { BaseService } from '@cool-midway/core';
import { BaseService, CoolCommException } from '@cool-midway/core';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm';
import { CsSessionEntity } from '../entity/session';
@@ -26,6 +26,9 @@
   * @returns
   */
  async create(userId: number) {
    if (!userId) {
      throw new CoolCommException('用户不存在');
    }
    const check = await this.detail(userId);
    if (check) {
      return check;