$arr6=$hotnews->distinct(true)->field('class')->count(); //总条数
SELECT DISTINCT COUNT(*) AS tp_count FROM `tp_hotnews` LIMIT 1