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