mirror of
https://github.com/certd/certd.git
synced 2026-08-03 12:05:06 +08:00
refactor(plugin): 简化插件模块代码,复用BaseService方法
This commit is contained in:
@@ -102,6 +102,18 @@ export abstract class BaseService<T> {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 按条件直接更新,不触发子类 update 的业务生命周期。
|
||||
*/
|
||||
async updateWhere(where: any, data: any) {
|
||||
await this.getRepository().update(
|
||||
{
|
||||
...where,
|
||||
},
|
||||
data
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param ids 删除的ID集合 如:[1,2,3] 或者 1,2,3
|
||||
|
||||
Reference in New Issue
Block a user