Sfoglia il codice sorgente

购物车添加字段

hu 1 anno fa
parent
commit
18be4eeefa

+ 1 - 0
src/custom/restcontroller/sale/shoppingcart/SQL/购物车列表.sql

@@ -4,6 +4,7 @@ SELECT t1.sa_shoppingcartid,
        t3.itemname,
        t1.itemno,
        t1.sa_promotionid,
+       t1.sa_promotion_itemsid,
        t1.tradefield tradefield_shoppingcart,
        t2.brandname,
        t1.qty,

+ 2 - 2
src/custom/restcontroller/sale/shoppingcart/SQL/购物车新增.sql

@@ -1,4 +1,4 @@
 insert into sa_shoppingcart (siteid, sa_shoppingcartid, createuserid, createby, createdate, changeby, changedate,
-                             sa_brandid, itemid, qty, itemno, sys_enterpriseid,tradefield,length,width,sa_promotionid)
+                             sa_brandid, itemid, qty, itemno, sys_enterpriseid,tradefield,length,width,sa_promotionid,sa_promotion_itemsid)
 values ($siteid$, $sa_shoppingcartid$, $userid$, $username$, current_time, $username$, current_time, $sa_brandid$,
-        $itemid$, $qty$, $itemno$, $sys_enterpriseid$,$tradefield$,$length$,$width$,$sa_promotionid$);
+        $itemid$, $qty$, $itemno$, $sys_enterpriseid$,$tradefield$,$length$,$width$,$sa_promotionid$,$sa_promotion_itemsid$);

+ 1 - 0
src/custom/restcontroller/sale/shoppingcart/SQL/购物车详情.sql

@@ -7,6 +7,7 @@ SELECT t1.sa_shoppingcartid,
        t1.itemno,
        t1.tradefield,
        t1.sa_promotionid,
+       t1.sa_promotion_itemsid,
        t2.brandname,
        t3.itemname,
        t3.model,

+ 4 - 0
src/custom/restcontroller/sale/shoppingcart/ShoppingCart.java

@@ -42,6 +42,7 @@ public class ShoppingCart extends Controller {
         String itemno = content.getString("itemno");
         String tradefield = content.getStringValue("tradefield");
         long sa_promotionid =content.getLongValue("sa_promotionid");
+        long sa_promotion_itemsid =content.getLongValue("sa_promotion_itemsid");
         SQLFactory sqlFactory = new SQLFactory(this, "购物车新增");
         Long sa_shoppingcartid = 0L;
         Rows rows = dbConnect.runSqlQuery("SELECT sa_shoppingcartid FROM sa_shoppingcart WHERE siteid = '" + siteid +
@@ -72,6 +73,7 @@ public class ShoppingCart extends Controller {
         sqlFactory.addParameter("length", length);
         sqlFactory.addParameter("width", width);
         sqlFactory.addParameter("sa_promotionid", sa_promotionid);
+        sqlFactory.addParameter("sa_promotion_itemsid", sa_promotion_itemsid);
         sqlFactory.addParameter("tradefield", tradefield);
         sqlFactory.addParameter("sa_shoppingcartid", sa_shoppingcartid);
         sqlFactory.addParameter("sa_brandid", sa_brandid);
@@ -103,6 +105,7 @@ public class ShoppingCart extends Controller {
             String itemno = item.getString("itemno");
             String tradefield = item.getStringValue("tradefield");
             long sa_promotionid =item.getLongValue("sa_promotionid");
+            long sa_promotion_itemsid =item.getLongValue("sa_promotion_itemsid");
             SQLFactory sqlFactory = new SQLFactory(this, "购物车新增");
             Long sa_shoppingcartid = 0L;
             Rows rows = dbConnect.runSqlQuery("SELECT sa_shoppingcartid FROM sa_shoppingcart WHERE siteid = '" + siteid +
@@ -133,6 +136,7 @@ public class ShoppingCart extends Controller {
             sqlFactory.addParameter("length", length);
             sqlFactory.addParameter("width", width);
             sqlFactory.addParameter("sa_promotionid", sa_promotionid);
+            sqlFactory.addParameter("sa_promotion_itemsid", sa_promotion_itemsid);
             sqlFactory.addParameter("tradefield", tradefield);
             sqlFactory.addParameter("sa_shoppingcartid", sa_shoppingcartid);
             sqlFactory.addParameter("sa_brandid", sa_brandid);