release 7.x

This commit is contained in:
cool 2023-09-28 15:26:41 +08:00
parent 54dd4e3a40
commit 4308fb5fa8
3 changed files with 12 additions and 9 deletions

View File

@ -11,7 +11,7 @@ export class BaseSysLogEntity extends BaseEntity {
userId: number; userId: number;
@Index() @Index()
@Column({ comment: '行为', length: 100 }) @Column({ comment: '行为' })
action: string; action: string;
@Index() @Index()

View File

@ -63,7 +63,7 @@ export class BaseSysParamService extends BaseService {
* *
* @param param * @param param
*/ */
async addOrUpdate(param: any): Promise<void> { async addOrUpdate(param: any, type): Promise<void> {
const find = { const find = {
keyName: param.keyName, keyName: param.keyName,
}; };
@ -74,7 +74,7 @@ export class BaseSysParamService extends BaseService {
if (check) { if (check) {
throw new CoolCommException('存在相同的keyName'); throw new CoolCommException('存在相同的keyName');
} }
await super.addOrUpdate(param); await super.addOrUpdate(param, type);
} }
/** /**

View File

@ -81,7 +81,7 @@ export class CloudDBService extends BaseService {
* @param param * @param param
* @returns * @returns
*/ */
async addOrUpdate(param) { async addOrUpdate(param, type) {
const { tableName, className } = this.coolCloudDb.parseCode(param.content); const { tableName, className } = this.coolCloudDb.parseCode(param.content);
// 更新 // 更新
if (param.id) { if (param.id) {
@ -108,11 +108,14 @@ export class CloudDBService extends BaseService {
throw new CoolCommException('已存在相同的类名'); throw new CoolCommException('已存在相同的类名');
} }
} }
await super.addOrUpdate({ await super.addOrUpdate(
...param, {
tableName, ...param,
className: className.replace('CLOUD', ''), tableName,
}); className: className.replace('CLOUD', ''),
},
type
);
} }
/** /**