Bladeren bron

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

hu 3 jaren geleden
bovenliggende
commit
a3bf3d1165
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. 6 0
      src/custom/restcontroller/webmanage/sale/promotion/promotionItems.java

+ 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");
         Long sa_promotionid = content.getLong("sa_promotionid");
         Rows tradefieldrows =dbConnect.runSqlQuery("select tradefield from sa_promotion where siteid='"+siteid+"' and sa_promotionid="+sa_promotionid);
         Rows tradefieldrows =dbConnect.runSqlQuery("select tradefield from sa_promotion where siteid='"+siteid+"' and sa_promotionid="+sa_promotionid);
         JSONArray tradefield=new JSONArray();
         JSONArray tradefield=new JSONArray();