4.x 就绪

This commit is contained in:
ap 2021-12-03 17:08:12 +08:00
parent f587a0bd38
commit dc863f859e
4 changed files with 22 additions and 5 deletions

View File

@ -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",

View File

@ -27,7 +27,7 @@ export class BaseCommController extends BaseController {
@Inject('cool:file')
coolFile: ICoolFile;
@Inject('cool:eps')
@Inject('cool:eps:admin')
eps;
/**

View File

@ -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获得网页内容()
*/

View File

@ -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 },