Quellcode durchsuchen

促销方案选择商品添加营销类别查询

hu vor 3 Jahren
Ursprung
Commit
a3bf3d1165

+ 6 - 0
src/custom/restcontroller/webmanage/sale/promotion/promotionItems.java

@@ -42,6 +42,12 @@ public class promotionItems extends Controller {
             }
 
         }
+        JSONArray itemclassids = content.getJSONArray("itemclassids");
+        if (itemclassids.size() > 0) {
+            String sql = " and t1.itemid in ( SELECT itemid from sa_itemsaleclass WHERE itemclassid IN " + itemclassids + "  and siteid='" + siteid + "')";
+            sql = sql.replace("[", "(").replace("]", ")");
+            where=where+sql;
+        }
         Long sa_promotionid = content.getLong("sa_promotionid");
         Rows tradefieldrows =dbConnect.runSqlQuery("select tradefield from sa_promotion where siteid='"+siteid+"' and sa_promotionid="+sa_promotionid);
         JSONArray tradefield=new JSONArray();