Commit 3d57e543 authored by 汪忙忙's avatar 汪忙忙

fix: 更新update返回结果

parent 09e8c4ca
...@@ -51,8 +51,9 @@ class BaseDao { ...@@ -51,8 +51,9 @@ class BaseDao {
*/ */
async update(query, options) { async update(query, options) {
let result = await CURD_REQUEST({db: this.db, TABLE: this.TABLE, type: `update`, query: query || {}, options: options || {}}); let result = await CURD_REQUEST({db: this.db, TABLE: this.TABLE, type: `update`, query: query || {}, options: options || {}});
console.log(`update结果`, result); let res = result.nModified > 0 ? 1: 0;
return result; console.log(`update结果`, res);
return res;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment