^ "SELECT `p`.`id`,`p`.`name`,p.stock as product_stock,IFNULL(SUM(ps.stock), 0) as spec_total_stock FROM `ls_goods` `p` LEFT JOIN `ls_goods_item` `ps` ON `p`.`id`=`ps`.`goods_id` GROUP BY `p`.`id`,`p`.`name`,`p`.`stock` HAVING product_stock != spec_total_stock"