MaiXinRong 3 年之前
父節點
當前提交
a3a6b23ac4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/base/base_service.js

+ 1 - 1
app/base/base_service.js

@@ -96,7 +96,7 @@ class BaseService extends Service {
      * @return {Array} - 返回数据
      */
     async getAllDataByCondition(condition) {
-        if (!condition.where) throw '缺少查询条件';
+        if (!condition.where && !condition.limit) throw '缺少查询条件,如查询全表,请自建sql';
         return await this.db.select(this.tableName, condition);
     }