mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-11 16:52:49 +00:00
去除数据库关键字
This commit is contained in:
parent
1b4374c272
commit
b89eb0685c
@ -19,6 +19,9 @@ import { TaskInfoService } from '../../service/info';
|
|||||||
api: ['add', 'delete', 'update', 'info', 'page'],
|
api: ['add', 'delete', 'update', 'info', 'page'],
|
||||||
entity: TaskInfoEntity,
|
entity: TaskInfoEntity,
|
||||||
service: TaskInfoService,
|
service: TaskInfoService,
|
||||||
|
before: ctx => {
|
||||||
|
ctx.request.body.limit = ctx.request.body.repeatCount;
|
||||||
|
},
|
||||||
pageQueryOp: {
|
pageQueryOp: {
|
||||||
fieldEq: ['status', 'type'],
|
fieldEq: ['status', 'type'],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -263,6 +263,19 @@ export class TaskInfoService extends BaseService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
* @param id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async info(id: any): Promise<any> {
|
||||||
|
const info = await this.taskInfoEntity.findOne({ id });
|
||||||
|
return {
|
||||||
|
...info,
|
||||||
|
repeatCount: info.limit,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新任务状态
|
* 刷新任务状态
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user