wangrong
2026-09-30 76cbe2e5f55b8fa40f6e8a2b7a2cf91a52ea4b10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { CoolController, BaseController } from '@cool-midway/core';
import { ReportJoblogEntity } from '../../entity/joblog';
import { ReportJoblogService } from '../../service/joblog';
 
/**
 * ETL任务日志控制器
 */
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: ReportJoblogEntity,
  service: ReportJoblogService,
  pageQueryOp: {
    keyWordLikeFields: ['a.jobName'],
    fieldEq: ['a.dataDate', 'a.status'],
    where: async ctx => {
      const { startTime, endTime } = ctx.request.body;
      const conditions: any[][] = [];
      if (startTime && endTime) {
        conditions.push(['a.dataDate BETWEEN :startTime AND :endTime', { startTime, endTime }]);
      }
      return conditions;
    }
  }
})
export class AdminReportJoblogController extends BaseController {}