|
|
@@ -225,11 +225,13 @@ public class Order extends Controller {
|
|
|
|
|
|
JSONArray items = content.getJSONArray("items");
|
|
|
ArrayList<Long> itemidids = new ArrayList();
|
|
|
+ ArrayList<Long> sa_shoppingcartids = new ArrayList();
|
|
|
//判断是否是同一个品牌的商品
|
|
|
for (Object obj : items) {
|
|
|
JSONObject item = (JSONObject) obj;
|
|
|
Long temp_sa_brandid = item.getLongValue("sa_brandid");
|
|
|
itemidids.add(item.getLongValue("itemid"));
|
|
|
+ sa_shoppingcartids.add(item.getLongValue(" sa_shoppingcartid"));
|
|
|
if (sa_brandid == 0) {
|
|
|
sa_brandid = temp_sa_brandid;
|
|
|
}
|
|
|
@@ -344,7 +346,7 @@ public class Order extends Controller {
|
|
|
ArrayList<String> sqlList = new ArrayList<>();
|
|
|
|
|
|
//删除购物车中的数据
|
|
|
- String sql = "DELETE from sa_shoppingcart WHERE sys_enterpriseid = " + sys_enterpriseid + " and itemid in " + itemidids + " AND siteid ='" + siteid + "'";
|
|
|
+ String sql = "DELETE from sa_shoppingcart WHERE sys_enterpriseid = " + sys_enterpriseid + " and sa_shoppingcartid in " + sa_shoppingcartids + " AND siteid ='" + siteid + "'";
|
|
|
sql = sql.replace("[", "(").replace("]", ")");
|
|
|
sqlList.add(sql);
|
|
|
// //清除多余的操作记录
|