This commit is contained in:
COOL 2022-03-24 15:09:18 +08:00
parent 14a51132ec
commit 746ce5fdf9
3 changed files with 25 additions and 6 deletions

View File

@ -4,7 +4,7 @@
"description": "",
"private": true,
"dependencies": {
"@cool-midway/core": "^5.0.4",
"@cool-midway/core": "^5.0.5",
"@cool-midway/es": "^5.0.1",
"@cool-midway/file": "^5.0.1",
"@cool-midway/pay": "^5.0.0",

View File

@ -0,0 +1,23 @@
// import { EntityModel } from '@midwayjs/orm';
// import { BaseEntity } from '@cool-midway/core';
// import { Column } from 'typeorm';
// /**
// * 商品(多数据库连接)
// */
// @EntityModel('demo_goods_1', {
// connectionName: 'test',
// })
// export class DemoGoodsTestEntity extends BaseEntity {
// @Column({ comment: '标题' })
// title: string;
// @Column({ comment: '图片' })
// pic: string;
// @Column({ comment: '价格', type: 'decimal', precision: 5, scale: 2 })
// price: number;
// @Column({ comment: '分类', type: 'tinyint', default: 0 })
// type: number;
// }

View File

@ -1,15 +1,11 @@
import { Inject, Provide } from '@midwayjs/decorator';
import { Provide } from '@midwayjs/decorator';
import { BaseService } from '@cool-midway/core';
import { CoolRpc } from '@cool-midway/rpc';
/**
*
*/
@Provide()
export class DemoGoodsService extends BaseService {
@Inject()
rpc: CoolRpc;
async test() {
console.log('调用');
}