where($map)->page($page["page"],$page["size"])->select(); $res["count"] = (new Product)->where($map)->count(); return $res; } public static function getProductInfoById($id) { return Product::find($id); } public static function addProduct($info):bool { return (new Product)->save($info); } public static function editProduct($info,$id): Product { return Product::update($info,["id"=>$id]); } public static function delProduct($id): bool { return Product::destroy($id); } public static function getProductListIsPch($qydm){ return Product::where("t_product.qydm",$qydm)->field("t_product.*")->join("t_product_batch p","t_product.id=p.product_id")->select(); } }