mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2025-12-11 05:42:49 +00:00
兼容 mariadb add 强制去除id
This commit is contained in:
parent
8f35e571fb
commit
b526c75161
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-midway/core",
|
||||
"version": "7.1.15",
|
||||
"version": "7.1.16",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"typings": "index.d.ts",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-midway/core",
|
||||
"version": "7.1.15",
|
||||
"version": "7.1.16",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
|
||||
@ -58,6 +58,7 @@ export abstract class BaseService {
|
||||
async init() {
|
||||
const services = {
|
||||
mysql: this.baseMysqlService,
|
||||
mariadb: this.baseMysqlService,
|
||||
postgres: this.basePgService,
|
||||
sqlite: this.baseSqliteService,
|
||||
};
|
||||
@ -209,6 +210,7 @@ export abstract class BaseService {
|
||||
*/
|
||||
async add(param: any | any[]): Promise<Object> {
|
||||
if (!this.entity) throw new CoolValidateException(ERRINFO.NOENTITY);
|
||||
delete param.id;
|
||||
await this.addOrUpdate(param, "add");
|
||||
return {
|
||||
id:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user