| 1 | /* |
| 2 | * @Author: nevin |
| 3 | * @Date: 2025-01-20 22:02:54 |
| 4 | * @LastEditTime: 2025-04-01 18:17:38 |
| 5 | * @LastEditors: nevin |
| 6 | * @Description: Test test |
| 7 | */ |
| 8 | import { Controller, Icp, Inject } from '../core/decorators'; |
| 9 | import { TestService } from './service'; |
| 10 | import { EtEvent } from '../../global/event'; |
| 11 | |
| 12 | @Controller() |
| 13 | export class TestController { |
| 14 | @Inject(TestService) |
| 15 | private readonly testService!: TestService; |
| 16 | |
| 17 | /** |
| 18 | * 测试-抖音登录 |
| 19 | */ |
| 20 | @Icp('ICP_GET_FILE_MATE_INFO') |
| 21 | async testDouyinVideoLogin(event: Electron.IpcMainInvokeEvent): Promise<any> { |
| 22 | console.log('---- res ----', 1); |
| 23 | EtEvent.emit('ET_TRACING_ACCOUNT_ADD', { |
| 24 | id: 111, |
| 25 | desc: '添加账户', |
| 26 | }); |
| 27 | |
| 28 | return 1; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * 每10秒运行一次 |
| 33 | */ |
| 34 | // @Scheduled('0/10 * * * * *') |
| 35 | async testScheduleJob(): Promise<any> { |
| 36 | console.log('---- Scheduled test ----'); |
| 37 | } |
| 38 | } |
| 39 |