Commit 5eec525e authored by hujun's avatar hujun

判断

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