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 ('762','763','765','768','769','770','771','772','773','774','775','776','1119','1123','1124','1184','1185','1186','1191','1193','1195','1198','1202','1206','1211','1212','1213','1215','1216','1218','1576','1580','1581','1583','2094','2095','2422','2427','2433','2436','2440','2445','2447','2638','2651','2656','2657','2658','2659','2661','2662','2663','2665','2666','2904','2905','2906','2907','2915','2916','2918','2945','2946','2947','2948','3135','3136','3141','3144','3145','3150','3157','3158','3165','5697','5700','5702','5703','5704','5719','5729','5733','5736','5740','5745','5750','5755','5763','5766','5769','5773','6699','6742','6743','6744','6745','6746','6747','6748','6763','6766','6769','6771','6772','6773','6779','6780','6783','6785','6788','6789','6938','6939','6940','6942','6943','6944','7706','7708','7709','7710','7712','7714','7715','7717','7718','7719','7721','7723','7725','7727','7729','7730','7781','7782','8417','8418','8419','8421','8422','8423','8571','8572','8575','8577','8580','8581','8587','8588','8589','8591','8594','8597','8609','8610','8611','8612','8613','8614','8615','8654','9218','9220','9223','9225','9227','9231','9235','9238','9241','9243','9245','9246','9253','9263','9264','9265','9266','9267','10049','10050','10052','12461','12464','12465','12470','12472','12473','12474','12476','12477','12577','12578','12579','12580','12595','12597','12598','12604','12605','12606','12607','12754','12755','12756','12757','12758','12759','12760','12761','12762','12763','12764','12819','12820','12821','12822','12823','12824','12825','13893','13894','13897','13898','13919','13920','13921','13922','13923','13924','13925','13926','13927','13928','13929','13930','13931','13932','13933','13934','13935','13936','13937','13938','13939','13940','13941','13942','13943','13944','13945','13946','13947','13948','13949','13950','13951','13952','13953','13954','14004','14005','14027','14028','14029','14030','14035','14037','14038','14039','14041','14042','14043','14044') ) 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,1360,1370,1368,1363,1351,1367,1359,1358,1366,1369,1361,1362) , g.store_sort asc LIMIT 0,16