wangrong
8 天以前 cd35d65daa2fb81ebb04823f045e6baf68eaddde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { CoolEvent, EVENT, Event } from '@cool-midway/core';
import { Inject } from '@midwayjs/core';
import { RecycleDataService } from '../service/data';
 
/**
 * 接受数据事件
 */
@CoolEvent()
export class RecycleDataEvent {
  @Inject()
  recycleDataService: RecycleDataService;
 
  /**
   * 数据被删除
   * @param params
   */
  @Event(EVENT.SOFT_DELETE)
  async softDelete(params) {
    await this.recycleDataService.record(params);
  }
}