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 ('756','757','1118','1125','2134','2137','2517','2519','2520','2522','2523','2524','2525','2538','2613','2616','2897','2938','2939','2940','4226','5708','5782','5783','5904','5905','5906','6143','6144','6145','6700','6800','6801','6803','6804','6805','6806','7183','7184','7185','7194','7206','7209','7217','7221','7222','7223','7227','7228','7229','7271','7793','7794','7796','7797','7798','7799','7800','7801','7802','7803','7804','7806','7807','7808','7809','7810','7811','7812','7813','7814','7815','7816','7817','7818','7819','7820','8554','8555','8556','8557','8559','8560','8653','9200','9201','9202','9204','9205','9206','9210','9211','9260','11151','11161','12582','12583','12584','12613','12770','12771','12789','12795','12796','12797','12798','12799','12800','12801','14099','14158','14159','14160','14161','14162','14163','14164','14165','14167','14168','14169','14170','14171','14172','14173','14181','14182','14183','14205','14206','14207','14209','14424','14425','14426','14427','14428','14429') ) 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,1444,1447,1448,1356,1443) , g.store_sort asc LIMIT 0,16