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 ('1107','1741','2036','2039','2041','2146','2147','2148','2149','2150','2151','2152','2153','2154','2902','2903','2934','2936','2937','2938','2939','2940','2951','2953','2955','2956','3376','3380','3381','3516','4149','4219','4220','4221','4222','4223','5085','5087','5789','5893','5894','6144','6145','6146','6147','6148','6150','6151','6152','6154','6155','6156','6157','6206','6216','6220','6221','6226','6227','6228','6229','6230','6231','6232','6233','6443','6447','6504','6507','6511','6518','6524','6529','6533','6537','6540','6543','6546','6547','6548','6551','6552','6556','6557','6560','6563','6567','6570','6606','6607','6609','6610','6611','6612','6613','6614','6615','6646','6648','6650','6655','6658','6661','6664','7349','7350','7351','7352','7353','7354','7355','7356','7711','7713','7716','7783','7911','7918','7920','7925','7928','7929','7934','7935','8684','8687','8690','8693','8697','8699','8701','8720','8721','8722','8723','8724','8725','8726','8727','8728','8729','8730','8731','8732','8733','8734','8736','8737','8738','8763','8766','8770','8773','8776','8777','8781','8782','8785','8786','8787','8790','8793','8796','8800','8804','8809','8815','8822','8825','8828','8885','8889','9200','9201','9207','9208','9209','9871','9872','9873','9874','9876','9877','9878','9880','9881','9882','10060','10061','10065','11148','11151','11161','11899','11900','11901','11902','11904','11905','11906','11908','11909','11910','12573','12574','12575','12576','12582','12583','12584','12585','12586','12587','12608','12609','13900','13901','13902','13992','13993','13994','13995','13996','14006','14007','14008','14009','14010','15817') ) 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,1420,1416,2274,1425,1354,1443,1421,1422,1417) , g.store_sort asc LIMIT 0,16