Commit 5eec525e authored by hujun's avatar hujun

判断

parent 1758a2e9
......@@ -34,13 +34,20 @@ class CActivity extends Model
/**
* 查询
*
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getActivity($field,$params)
{
$params['status'] = 0;
if (!isset($params['status'])) {
$params['status'] = 0;
}
$result = $this->db_
->field($field)
->where($params)
......
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