mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2026-01-20 12:48:12 +00:00
修复curd list接口无效,升级核心依赖
This commit is contained in:
parent
d0901f517e
commit
3cf3742803
@ -15,7 +15,7 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"md5": "^2.3.0",
|
"md5": "^2.3.0",
|
||||||
"midwayjs-cool-alipay": "^1.0.3",
|
"midwayjs-cool-alipay": "^1.0.3",
|
||||||
"midwayjs-cool-core": "^3.1.4",
|
"midwayjs-cool-core": "^3.1.5",
|
||||||
"midwayjs-cool-oss": "^1.0.12",
|
"midwayjs-cool-oss": "^1.0.12",
|
||||||
"midwayjs-cool-queue": "^1.0.6",
|
"midwayjs-cool-queue": "^1.0.6",
|
||||||
"midwayjs-cool-redis": "^1.0.9",
|
"midwayjs-cool-redis": "^1.0.9",
|
||||||
@ -44,7 +44,7 @@
|
|||||||
"node": ">=12.0.0"
|
"node": ">=12.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "egg-scripts start --title=cool-admin-midway --framework=@midwayjs/web --port=8001 --sticky",
|
"start": "egg-scripts start --daemon --title=cool-admin-midway --framework=@midwayjs/web --port=8001 --sticky",
|
||||||
"stop": "egg-scripts stop --title=cool-admin-midway",
|
"stop": "egg-scripts stop --title=cool-admin-midway",
|
||||||
"start_build": "npm run build && cross-env NODE_ENV=development midway-bin dev",
|
"start_build": "npm run build && cross-env NODE_ENV=development midway-bin dev",
|
||||||
"docker": "egg-scripts start --title=cool-admin-midway --framework=@midwayjs/web --sticky",
|
"docker": "egg-scripts start --title=cool-admin-midway --framework=@midwayjs/web --sticky",
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Get, Inject, Provide } from '@midwayjs/decorator';
|
import { Get, Inject, Provide } from '@midwayjs/decorator';
|
||||||
import { CoolController, BaseController } from 'midwayjs-cool-core';
|
import { CoolController, BaseController } from 'midwayjs-cool-core';
|
||||||
import { DemoAppGoodsEntity } from '../../entity/goods';
|
import { DemoAppGoodsEntity } from '../../../entity/goods';
|
||||||
import { DemoGoodsService } from '../../service/goods';
|
import { DemoGoodsService } from '../../../service/goods';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品
|
* 商品
|
||||||
@ -10,6 +10,9 @@ import { DemoGoodsService } from '../../service/goods';
|
|||||||
@CoolController({
|
@CoolController({
|
||||||
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
||||||
entity: DemoAppGoodsEntity,
|
entity: DemoAppGoodsEntity,
|
||||||
|
listQueryOp: {
|
||||||
|
keyWordLikeFields: ['title'],
|
||||||
|
},
|
||||||
})
|
})
|
||||||
export class DemoAppGoodsController extends BaseController {
|
export class DemoAppGoodsController extends BaseController {
|
||||||
@Inject()
|
@Inject()
|
||||||
@ -7,9 +7,6 @@ import { Column } from 'typeorm';
|
|||||||
*/
|
*/
|
||||||
@EntityModel('demo_app_goods')
|
@EntityModel('demo_app_goods')
|
||||||
export class DemoAppGoodsEntity extends BaseEntity {
|
export class DemoAppGoodsEntity extends BaseEntity {
|
||||||
@Column({ comment: '用户ID' })
|
|
||||||
userId: number;
|
|
||||||
|
|
||||||
@Column({ comment: '标题' })
|
@Column({ comment: '标题' })
|
||||||
title: string;
|
title: string;
|
||||||
|
|
||||||
|
|||||||
@ -35,8 +35,7 @@ export class ContainerLifeCycle implements ILifeCycle {
|
|||||||
@App()
|
@App()
|
||||||
app: Application;
|
app: Application;
|
||||||
// 应用启动完成
|
// 应用启动完成
|
||||||
async onReady(container?: IMidwayContainer) {
|
async onReady(container?: IMidwayContainer) {}
|
||||||
}
|
|
||||||
// 应用停止
|
// 应用停止
|
||||||
async onStop() {}
|
async onStop() {}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user