$a = Db::name(表名)->field(字段)->where(条件)->buildSql(); $b = Db::name(表名)->field(字段)->where(条件)->buildSql(); $c = Db::name(表名)->field(字段)->where(条件)->union([$a, $b])->buildSql(); $list = Db::table($c . ' a')->order(排序)->paginate(每页个数);// $c . a是零时表名