SELECT s.praise_rate,s.im_qq,s.im_ww,g.goods_id,g.store_sort, g.store_id, g.type, g.goods_name, g.cate_id, g.cate_name, g.brand, g.spec_qty, g.spec_name_1, g.spec_name_2,g.spec_name_3, g.if_show, g.closed, g.add_time, g.recommended, g.default_image, g.special, g.sort,g.store_sort, g.is_copy,g.delete_time,gs.spec_id, gs.spec_1, gs.spec_2, gs.spec_3, gs.yuanjia, gs.color_rgb, gs.price, gs.stock,gs.sku,gs.material, gs.pack,gs.inter_stock,gs.out_stock,gs.discount_x,gs.cost_x,gs.cost_z,gs.discount_z,gs.product_date,s.store_name, s.region_id, s.region_name, s.credit_value, s.sgrade, gp.pvs, gst.views, gst.sales, gst.comments FROM ecm_goods g LEFT JOIN ecm_goods_spec gs ON g.default_spec = gs.spec_id LEFT JOIN ecm_store s ON g.store_id = s.store_id LEFT JOIN ecm_goods_pvs gp ON g.goods_id=gp.goods_id LEFT JOIN ecm_goods_statistics gst ON g.goods_id = gst.goods_id LEFT JOIN `ecm_sbhh_goods` w ON g.goods_id = w.goods_id WHERE g.if_show = 1 AND g.closed = 0 AND g.is_delete=0 AND s.state != 0 AND s.state !=2 AND (g.goods_id IN ('6188','6189','6190','6191','6192','6193','6194','6195','6369','6375','7151','7153','7272','7273','7274','7275','7639','8012','8013','8014','8015','8018','8019','8036','8037','8038','8039','8040','8041','8042','8043','10438','10468','10579','10580','10689','10690','10691','10692','10693','10694','10756','10828','10982','10986','10988','10989','10990','10991','10992','10993','10994','10996','10997','10998','10999','11098','11099','11108','11109','11110','11111','11112','11113','11114','11115','11116','11117','11118','11119','11122','11123','11124','11127','11129','11130','11132','11272','11273','11274','11275','11276','11277','11278','11279','11280','11281','11282','11283','11284','11285','11286','11287','11288','11289','11290','11291','11292','11415','11416','11417','11418','11419','11420','11421','11422','11423','11424','11425','11426','11427','11428','14984','14989','14990','14995','15056','15057','15058','15059','15060','15061','15062','15063','15080','15081','15082','15806','16354','16355','16357','16358','16359','16360','16361','16362','16363','16364','16365','16366','16367','16368','16369','16370','16371','16372','16373','16374','16375','16376','16377','16378','17439','17722','17723','17724','17726','17727','17728','17729','17730','17731','17732','18192','18193','18194','18195','18196','18197','18198','18199','18200','18201') ) AND ( w.warehouse in (2) OR s.region_id in (510,511,512,513,514,515,516,517,518,519,360,361,362,363,366,403,404,405,406,407,408,409,410,411,412,413,414,416,417,418,419,420,424,426,431,436,439,441,442,444,448,453,454,456,467,476,511,512,513,514,517,518,519,520,521,522,523,524,525,530,545,555,562,570,572,573,581,589,598,606,611,633,646,687,691,692,702,795)) AND gs.spec_id IS NOT NULL AND s.store_id IS NOT NULL ORDER BY (case when special=3 then 1 ELSE 2 END) , FIELD(s.region_id,510,511,512,513,514,515,516,517,518,519,360,361,362,363,366,403,404,405,406,407,408,409,410,411,412,413,414,416,417,418,419,420,424,426,431,436,439,441,442,444,448,453,454,456,467,476,511,512,513,514,517,518,519,520,521,522,523,524,525,530,545,555,562,570,572,573,581,589,598,606,611,633,646,687,691,692,702,795) , FIELD(g.cate_id,2336,583,580,1186,1185,535,1184) , g.store_sort asc LIMIT 0,16