|
|
@@ -208,12 +208,18 @@ public class OrderItems extends Controller {
|
|
|
JSONArray items = content.getJSONArray("items");
|
|
|
|
|
|
OrderItemsHelper orderItemsHelper = new OrderItemsHelper(this);
|
|
|
+ //批量查询商品信息
|
|
|
+ RowsMap itemRowsMap = orderItemsHelper.getItemRowsMap(items);
|
|
|
Rows rows = new Rows();
|
|
|
for (Object obj : items) {
|
|
|
JSONObject item = (JSONObject) obj;
|
|
|
Long itemid = item.getLongValue("itemid");
|
|
|
- String customproperties = orderItemsHelper.getcustomproperties(item);
|
|
|
- Rows temprows = dbConnect.runSqlQuery("SELECT itemname from sa_orderitems WHERE sa_orderid=" + sa_orderid + " and siteid='" + siteid + "' and itemid=" + itemid + " and ifnull(customproperties,'')='" + customproperties + "'");
|
|
|
+ JSONArray customproperties = new JSONArray();
|
|
|
+ customproperties = orderItemsHelper.getCustomProperties(itemRowsMap, item);
|
|
|
+
|
|
|
+ String custompropertie=customproperties.toJSONString().replace("[", "").replace("]", "").replace("\"", "");
|
|
|
+
|
|
|
+ Rows temprows = dbConnect.runSqlQuery("SELECT itemname from sa_orderitems WHERE sa_orderid=" + sa_orderid + " and siteid='" + siteid + "' and itemid=" + itemid + " and ifnull(customproperties,'')='" + custompropertie + "'");
|
|
|
rows.addAll(temprows);
|
|
|
}
|
|
|
Rows orderRows = beans.order.Order.getOrderRows(this, sa_orderid);
|