where("qydm",$qydm)->page($page["page"],$page["size"])->select(); $res["row"] =(new Input)->where("qydm",$qydm)->page($page["page"],$page["size"])->select(); $res["count"]= (new Input)->where($qydm=="qydm")->count(); return $res; } /** * @throws ModelNotFoundException * @throws DataNotFoundException * @throws DbException */ public static function getInputById($id){ return Db::name("input")->field("t_input.*,t_enterprises.enterprises_name")->where("t_input.id","=",$id)->leftJoin("t_enterprises","t_input.qydm=t_enterprises.qydm")->select(); } public static function eidtInputInfo($info,$id): Input{ return Input::update($info,["id"=>$id]); } public static function addInput($info):bool{ $input =new Input(); return $input->save($info); } public static function delInputById($id):bool{ return Input::destroy($id); } }