|
@@ -281,6 +281,14 @@ abstract class AbstractDao {
|
|
|
return array_pop($result);
|
|
|
}
|
|
|
|
|
|
+ public function fetchAll($condition = null, $limit = 10, $order = null, $selectCols = '*') {
|
|
|
+ $result = self::findBy($condition, null, $limit, $selectCols, $order);
|
|
|
+ if (!$result) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
* 获取所有
|
|
|
* @param string $order 排序方式。默认以主键倒序;有效的格式:"create_time desc"
|