Commit 223ed239 authored by zhuwei's avatar zhuwei

1

parent 01f97435
......@@ -34,9 +34,12 @@ class FStoreCostExt extends BaseModel
* 查询数据
* @param $field
* @param $params
* @param $pageNo
* @param $pageSize
* @param string $order
* @return false|\PDOStatement|string|\think\Collection
*/
public function getStoreCostExt($field,$params,$pageNo, $pageSize)
public function getStoreCostExt($field,$params,$pageNo, $pageSize,$order='a.id desc')
{
$params["b.status"] = 0;
$result = $this->db_
......@@ -47,6 +50,7 @@ class FStoreCostExt extends BaseModel
->where($params)
->limit($pageSize)
->page($pageNo)
->order($order)
->select();
// echo $this->getLastSql();
return $result;
......@@ -66,7 +70,7 @@ class FStoreCostExt extends BaseModel
return $result;
}
public function getStoreCostExtExcel($field,$params)
public function getStoreCostExtExcel($field,$params,$order='a.id desc')
{
$params["b.status"] = 0;
$result = $this->db_
......@@ -74,6 +78,7 @@ class FStoreCostExt extends BaseModel
->alias('a')
->join('f_store_cost b', 'a.cost_id = b.id', 'left')
->where($params)
->order($order)
->select();
return $result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment