mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08:00
release 7.x
This commit is contained in:
parent
54dd4e3a40
commit
4308fb5fa8
@ -11,7 +11,7 @@ export class BaseSysLogEntity extends BaseEntity {
|
||||
userId: number;
|
||||
|
||||
@Index()
|
||||
@Column({ comment: '行为', length: 100 })
|
||||
@Column({ comment: '行为' })
|
||||
action: string;
|
||||
|
||||
@Index()
|
||||
|
@ -63,7 +63,7 @@ export class BaseSysParamService extends BaseService {
|
||||
* 添加或者修改
|
||||
* @param param
|
||||
*/
|
||||
async addOrUpdate(param: any): Promise<void> {
|
||||
async addOrUpdate(param: any, type): Promise<void> {
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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({
|
||||
await super.addOrUpdate(
|
||||
{
|
||||
...param,
|
||||
tableName,
|
||||
className: className.replace('CLOUD', ''),
|
||||
});
|
||||
},
|
||||
type
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user