build(desktop): 升级 electron-shell 版本至 1.6.3 并调整插件执行超时配置
- 插件执行超时默认延长至 6 小时,支持插件单独配置超时时间 - 新增插件根目录迁移逻辑,解决旧版权限问题 - 新增多个服务端实体、DTO、配置模块等基础代码 - 新增插件 UI 模板及相关静态资源
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { DemoGoodsService } from '../../service/goods';
|
||||
import { DemoGoodsEntity } from '../../entity/goods';
|
||||
import { Body, Inject, Post } from '@midwayjs/core';
|
||||
import { CoolController, BaseController } from '@cool-midway/core';
|
||||
import { InjectEntityModel } from '@midwayjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
|
||||
/**
|
||||
* 测试
|
||||
*/
|
||||
@CoolController({
|
||||
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
||||
entity: DemoGoodsEntity,
|
||||
service: DemoGoodsService,
|
||||
pageQueryOp: {
|
||||
fieldLike: ['title'],
|
||||
},
|
||||
})
|
||||
export class OpenDemoGoodsController extends BaseController {
|
||||
@InjectEntityModel(DemoGoodsEntity)
|
||||
demoGoodsEntity: Repository<DemoGoodsEntity>;
|
||||
|
||||
@Inject()
|
||||
demoGoodsService: DemoGoodsService;
|
||||
|
||||
@Post('/sqlPage', { summary: 'sql分页查询' })
|
||||
async sqlPage(@Body() query) {
|
||||
return this.ok(await this.demoGoodsService.sqlPage(query));
|
||||
}
|
||||
|
||||
@Post('/entityPage', { summary: 'entity分页查询' })
|
||||
async entityPage(@Body() query) {
|
||||
return this.ok(await this.demoGoodsService.entityPage(query));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user