From 4308fb5fa81b2ece3856942fc0b1b90b3c62050d Mon Sep 17 00:00:00 2001 From: cool Date: Thu, 28 Sep 2023 15:26:41 +0800 Subject: [PATCH] release 7.x --- src/modules/base/entity/sys/log.ts | 2 +- src/modules/base/service/sys/param.ts | 4 ++-- src/modules/cloud/service/db.ts | 15 +++++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/modules/base/entity/sys/log.ts b/src/modules/base/entity/sys/log.ts index 94dccaf..437c6e7 100644 --- a/src/modules/base/entity/sys/log.ts +++ b/src/modules/base/entity/sys/log.ts @@ -11,7 +11,7 @@ export class BaseSysLogEntity extends BaseEntity { userId: number; @Index() - @Column({ comment: '行为', length: 100 }) + @Column({ comment: '行为' }) action: string; @Index() diff --git a/src/modules/base/service/sys/param.ts b/src/modules/base/service/sys/param.ts index fbb0821..9430516 100644 --- a/src/modules/base/service/sys/param.ts +++ b/src/modules/base/service/sys/param.ts @@ -63,7 +63,7 @@ export class BaseSysParamService extends BaseService { * 添加或者修改 * @param param */ - async addOrUpdate(param: any): Promise { + async addOrUpdate(param: any, type): Promise { const find = { keyName: param.keyName, }; @@ -74,7 +74,7 @@ export class BaseSysParamService extends BaseService { if (check) { throw new CoolCommException('存在相同的keyName'); } - await super.addOrUpdate(param); + await super.addOrUpdate(param, type); } /** diff --git a/src/modules/cloud/service/db.ts b/src/modules/cloud/service/db.ts index 22b37ea..fb73088 100644 --- a/src/modules/cloud/service/db.ts +++ b/src/modules/cloud/service/db.ts @@ -81,7 +81,7 @@ export class CloudDBService extends BaseService { * @param param * @returns */ - async addOrUpdate(param) { + async addOrUpdate(param, type) { const { tableName, className } = this.coolCloudDb.parseCode(param.content); // 更新 if (param.id) { @@ -108,11 +108,14 @@ export class CloudDBService extends BaseService { throw new CoolCommException('已存在相同的类名'); } } - await super.addOrUpdate({ - ...param, - tableName, - className: className.replace('CLOUD', ''), - }); + await super.addOrUpdate( + { + ...param, + tableName, + className: className.replace('CLOUD', ''), + }, + type + ); } /**