|
@@ -4,6 +4,7 @@ import beans.datacontrllog.DataContrlLog;
|
|
|
import beans.itemprice.ItemPrice;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.sun.jdi.LongValue;
|
|
|
import common.Controller;
|
|
|
import common.YosException;
|
|
|
import common.annotation.API;
|
|
@@ -40,6 +41,7 @@ public class ShoppingCart extends Controller {
|
|
|
BigDecimal width = content.getBigDecimal("width");
|
|
|
String itemno = content.getString("itemno");
|
|
|
String tradefield = content.getStringValue("tradefield");
|
|
|
+ long sa_promotionid =content.getLongValue("sa_promotionid");
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "购物车新增");
|
|
|
Long sa_shoppingcartid = 0L;
|
|
|
Rows rows = dbConnect.runSqlQuery("SELECT sa_shoppingcartid FROM sa_shoppingcart WHERE siteid = '" + siteid +
|
|
@@ -47,7 +49,7 @@ public class ShoppingCart extends Controller {
|
|
|
" and length="+length+" and width="+width+" AND itemid = " + itemid +
|
|
|
" AND sys_enterpriseid = " + sys_enterpriseid +
|
|
|
" AND tradefield = '" + tradefield +
|
|
|
- "' AND itemno = '" + itemno + "'");
|
|
|
+ "' AND itemno = '" + itemno + "' and sa_promotionid="+sa_promotionid);
|
|
|
if (rows.isNotEmpty()) {
|
|
|
sa_shoppingcartid = rows.get(0).getLong("sa_shoppingcartid");
|
|
|
}
|
|
@@ -69,6 +71,7 @@ public class ShoppingCart extends Controller {
|
|
|
sqlFactory.addParameter("itemno", itemno);
|
|
|
sqlFactory.addParameter("length", length);
|
|
|
sqlFactory.addParameter("width", width);
|
|
|
+ sqlFactory.addParameter("sa_promotionid", sa_promotionid);
|
|
|
sqlFactory.addParameter("tradefield", tradefield);
|
|
|
sqlFactory.addParameter("sa_shoppingcartid", sa_shoppingcartid);
|
|
|
sqlFactory.addParameter("sa_brandid", sa_brandid);
|
|
@@ -147,6 +150,7 @@ public class ShoppingCart extends Controller {
|
|
|
where.append("or t3.spec like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
where.append(")");
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
boolean isExport = content.getBooleanValue("isExport");
|
|
@@ -157,6 +161,8 @@ public class ShoppingCart extends Controller {
|
|
|
}
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);
|
|
|
+ sqlFactory.addParameter("sa_promotionid", content.getLongValue("sa_promotionid"));
|
|
|
+
|
|
|
sqlFactory.addParameter("istool", istool);
|
|
|
sqlFactory.addParameter_SQL("where", where);
|
|
|
String sql = sqlFactory.getSQL();
|