MaiXinRong hace 3 años
padre
commit
a3a6b23ac4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);
     }