create($data); return $this->add($data); } public function getUserData($develop_id){ $map['develop_id'] = $develop_id; $map['status'] = ['gt',0]; $data = $this->where($map)->order('create_time desc')->select(); return $data; } /** * 用户未读消息 * @param $develop_id * @return mixed * author: xmy 280564871@qq.com */ public function countMsg($develop_id){ $map['develop_id'] = $develop_id; $map['status'] = 2; return $this->where($map)->count(); } /** * 设置状态 * @param $ids * @param $status * @return bool * author: xmy 280564871@qq.com */ public function setStatus($ids,$status){ $map['id'] = ['in',$ids]; return $this->where($map)->setField(['status'=>$status]); } }