save($info); } public static function delGrid($info): bool { return Grid::destroy($info['id']); } public static function editGridInfo($info,$id): Grid { return Grid::update($info,["id"=>$id]); } /** * @throws ModelNotFoundException * @throws DataNotFoundException * @throws DbException */ public static function getGridList($page, $xzqdm) { switch (strlen($xzqdm) ){ case 4: $map[]=["xzqdm","like",'%'.$xzqdm.'%']; break; case 6: $map[] = ["xzqdm","like",'%'.$xzqdm.'%']; break; case 9: $map[] = ["xzqdm","like",'%'.$xzqdm.'%']; break; default: $map[]=[]; } return (new Grid())->where($map)->page($page["page"],$page["size"])->select(); } }