|
@@ -22,4 +22,20 @@ class WechatPlan extends Model
|
|
|
} while (self::where(['order_id' => $orderId])->find());
|
|
|
return $orderId;
|
|
|
}
|
|
|
+ public static function lst($where)
|
|
|
+ {
|
|
|
+ $model = new self;
|
|
|
+ $xwhere = null;
|
|
|
+ $order = "id desc";
|
|
|
+ if (isset($where['cid']) && $where['cid'] > 0) $xwhere['cid'] = $where['cid'];
|
|
|
+ if (isset($where['plan_id']) && $where['plan_id'] > 0) $xwhere['plan_id'] = $where['plan_id'];
|
|
|
+ if (isset($where['price']) && $where['price'] > 0) $xwhere['price'] = $where['price'];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ $data = $model->where($xwhere)->order($order)->page($where['page'], $where['limit'])->select();
|
|
|
+ $count = $model->where($xwhere)->count();
|
|
|
+ return compact('count', 'data');
|
|
|
+ }
|
|
|
}
|