Przeglądaj źródła

购物车转订单bug修复

eganwu 3 lat temu
rodzic
commit
93f80a2c2a

+ 4 - 4
src/custom/restcontroller/webmanage/sale/order/Order.java

@@ -207,17 +207,17 @@ public class Order extends Controller {
         JSONArray items = content.getJSONArray("items");
         JSONArray items = content.getJSONArray("items");
         ArrayList<Long> itemidids = new ArrayList();
         ArrayList<Long> itemidids = new ArrayList();
         //判断是否是同一个品牌的商品
         //判断是否是同一个品牌的商品
-//        for (Object obj : items) {
-//            JSONObject item = (JSONObject) obj;
+        for (Object obj : items) {
+            JSONObject item = (JSONObject) obj;
 //            Long temp_sa_brandid = item.getLongValue("sa_brandid");
 //            Long temp_sa_brandid = item.getLongValue("sa_brandid");
-//            itemidids.add(item.getLongValue("itemid"));
+            itemidids.add(item.getLongValue("itemid"));
 //            if (sa_brandid == 0) {
 //            if (sa_brandid == 0) {
 //                sa_brandid = temp_sa_brandid;
 //                sa_brandid = temp_sa_brandid;
 //            }
 //            }
 //            if (!sa_brandid.equals(temp_sa_brandid)) {
 //            if (!sa_brandid.equals(temp_sa_brandid)) {
 //                return getErrReturnObject().setErrMsg("请添加同一品牌的商品").toString();
 //                return getErrReturnObject().setErrMsg("请添加同一品牌的商品").toString();
 //            }
 //            }
-//        }
+        }
 
 
         //判断领域
         //判断领域
 //        String sql = "SELECT count(0) count from plm_item_tradefield WHERE tradefield='" + tradefield + "' and itemid in " + itemidids;
 //        String sql = "SELECT count(0) count from plm_item_tradefield WHERE tradefield='" + tradefield + "' and itemid in " + itemidids;