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