MaiXinRong 3 lat temu
rodzic
commit
a3a6b23ac4
1 zmienionych plików z 1 dodań i 1 usunięć
  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);
     }