Commit 8b48b303 authored by hujun's avatar hujun

edit

parent 0f1f1a48
......@@ -89,4 +89,39 @@ class ODaily extends BaseModel
return 0;
}
}
/**
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getDailyLogList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') {
return $this->alias('a')
->field($field)
->join('o_daily_log b', 'a.id=b.daily_id', 'left')
->where($params)
->order($order_)
->limit($pageSize)
->group('a.id')
->page($pageNo)
->select();
}
/**
* @param $params
* @return int|string
*/
public function getDailyLogTotal($params) {
return $this->alias('a')
->join('o_daily_log b', 'a.id=b.daily_id', 'left')
->where($params)
->group('a.id')
->count();
}
}
\ No newline at end of file
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