Browse Source

促销方案生成订单价格错误修复

hu 1 year ago
parent
commit
d6e5a05144

+ 2 - 2
src/custom/restcontroller/sale/shoppingcart/ShoppingCart.java

@@ -61,7 +61,7 @@ public class ShoppingCart extends Controller {
             return getErrReturnObject().setErrMsg("商品【" + itemno + "】已添加至购物车,不能再次添加。").toString();
         }
 
-        if (sa_promotionid > 0 && dbConnect.runSqlQuery("SELECT 1 from sa_promotion_items WHERE  islimit=1 and groupqty <= saledqty  and  itemid=" + itemid + " and siteid='" + siteid + "' and sa_promotionid='" + sa_promotionid + "'").isNotEmpty()) {
+        if (sa_promotionid > 0 && dbConnect.runSqlQuery("SELECT 1 from sa_promotion_items WHERE  islimit=1 and groupqty <= saledqty  and  sa_promotion_itemsid=" + sa_promotion_itemsid + " and siteid='" + siteid + "' and sa_promotionid='" + sa_promotionid + "'").isNotEmpty()) {
             return getErrReturnObject().setErrMsg("商品【" + itemno + "】已售罄,不能添加。").toString();
         }
 
@@ -142,7 +142,7 @@ public class ShoppingCart extends Controller {
             colors = colors.equals("0") ? "" : colors;
             material = material.equals("0") ? "" : material;
 
-            if (sa_promotionid > 0 && dbConnect.runSqlQuery("SELECT 1 from sa_promotion_items WHERE  islimit=1 and groupqty <= saledqty  and  itemid=" + itemid + " and siteid='" + siteid + "' and sa_promotionid='" + sa_promotionid + "'").isNotEmpty()) {
+            if (sa_promotionid > 0 && dbConnect.runSqlQuery("SELECT 1 from sa_promotion_items WHERE  islimit=1 and groupqty <= saledqty  and  sa_promotion_itemsid=" + sa_promotion_itemsid + " and siteid='" + siteid + "' and sa_promotionid='" + sa_promotionid + "'").isNotEmpty()) {
                 return getErrReturnObject().setErrMsg("商品【" + itemno + "】已售罄,不能添加。").toString();
             }
 

+ 1 - 1
src/custom/restcontroller/webmanage/sale/order/OrderItems.java

@@ -97,7 +97,7 @@ public class OrderItems extends Controller {
             }
 
 
-            if (sa_promotionid > 0 && dbConnect.runSqlQuery("SELECT 1 from sa_promotion_items WHERE  islimit=1 and groupqty <= saledqty  and  sa_promotion_items=" + item.getLong("sa_promotion_itemsid") + " and siteid='" + siteid + "' and sa_promotionid='" + sa_promotionid + "'").isNotEmpty()) {
+            if (sa_promotionid > 0 && dbConnect.runSqlQuery("SELECT 1 from sa_promotion_items WHERE  islimit=1 and groupqty <= saledqty  and  sa_promotion_itemsid=" + item.getLong("sa_promotion_itemsid") + " and siteid='" + siteid + "' and sa_promotionid='" + sa_promotionid + "'").isNotEmpty()) {
                 return getErrReturnObject().setErrMsg("商品【" + itemRow.getString("itemno") + "】已售罄,不能添加。").toString();
             }