mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2026-01-11 15:03:47 +00:00
4.x 就绪
This commit is contained in:
parent
f587a0bd38
commit
dc863f859e
@ -5,7 +5,7 @@
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@cool-midway/alipay": "^4.0.3",
|
||||
"@cool-midway/core": "^4.0.8",
|
||||
"@cool-midway/core": "^4.0.9",
|
||||
"@cool-midway/es": "^4.0.2",
|
||||
"@cool-midway/oss": "^4.0.2",
|
||||
"@cool-midway/queue": "^4.0.3",
|
||||
|
||||
@ -27,7 +27,7 @@ export class BaseCommController extends BaseController {
|
||||
@Inject('cool:file')
|
||||
coolFile: ICoolFile;
|
||||
|
||||
@Inject('cool:eps')
|
||||
@Inject('cool:eps:admin')
|
||||
eps;
|
||||
|
||||
/**
|
||||
|
||||
@ -28,6 +28,18 @@ export class BaseOpenController extends BaseController {
|
||||
@Inject()
|
||||
ctx: Context;
|
||||
|
||||
@Inject('cool:eps:open')
|
||||
eps;
|
||||
|
||||
/**
|
||||
* 实体信息与路径
|
||||
* @returns
|
||||
*/
|
||||
@Get('/eps', { summary: '实体信息与路径' })
|
||||
public async getEps() {
|
||||
return this.ok(this.eps);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据配置参数key获得网页内容(富文本)
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Get, Inject, Post, Provide } from '@midwayjs/decorator';
|
||||
import { CoolController, BaseController } from '@cool-midway/core';
|
||||
import { CoolController, BaseController, CoolUrlTag } from '@cool-midway/core';
|
||||
import { IQueue } from '@cool-midway/queue';
|
||||
import { DemoGoodsEntity } from '../../entity/goods';
|
||||
import { DemoGoodsService } from '../../service/goods';
|
||||
@ -12,6 +12,10 @@ import { DemoGoodsService } from '../../service/goods';
|
||||
{
|
||||
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
||||
entity: DemoGoodsEntity,
|
||||
urlTag: {
|
||||
name: 'ignoreToken',
|
||||
url: ['add'],
|
||||
},
|
||||
listQueryOp: {
|
||||
keyWordLikeFields: ['title'],
|
||||
},
|
||||
@ -32,7 +36,8 @@ export class DemoAppGoodsController extends BaseController {
|
||||
* 请求所有数据
|
||||
* @returns
|
||||
*/
|
||||
@Get('/all')
|
||||
@CoolUrlTag('ignoreToken')
|
||||
@Get('/all', { summary: '获得所有' })
|
||||
async all() {
|
||||
return this.ok(await this.demoGoodsService.all());
|
||||
}
|
||||
@ -40,7 +45,7 @@ export class DemoAppGoodsController extends BaseController {
|
||||
/**
|
||||
* 发送数据到队列
|
||||
*/
|
||||
@Post('/queue')
|
||||
@Post('/queue', { summary: '发送队列数据' })
|
||||
async queue() {
|
||||
this.demoQueue.queue.add(
|
||||
{ a: 1 },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user