where($filter)->find(); if(!empty($result)) $result = $result->toArray(); return $result; } public function listClientData($filter ,$field = null) { $result = $this->where($filter); if(empty($field) && is_array($field)) $result = $result->field($field); $result = $result->select(); if(!empty($result)) $result = $result->toArray(); return $result; } public function getClientData($filter ,$field = null) { $result = $this->where($filter); if(empty($field) && is_array($field)) $result = $result->field($field); $result = $result->find(); if(!empty($result)) $result = $result->toArray(); return $result; } public function updateClientInfo($filter ,$data) { $data['update_time'] = time(); $result = $this->where($filter)->update($data); return !empty($result); } }