whereIn('id',$ids)->update(['is_delete' => 1]); } /** * @param $id * @return BaseModel|array|mixed|Model|null * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function findById($id) { return $this->where([ ['id','=',$id], ['is_delete','=', 0] ])->find(); } }