Преглед изворни кода

账户扣款信息bug修复

eganwu пре 2 година
родитељ
комит
0cb08720e2
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4 2
      src/custom/restcontroller/webmanage/sale/order/OrderItemsHelper.java

+ 4 - 2
src/custom/restcontroller/webmanage/sale/order/OrderItemsHelper.java

@@ -34,8 +34,10 @@ public class OrderItemsHelper extends BaseClass {
 
 
     public long getAccountClassId(String type) throws YosException {
     public long getAccountClassId(String type) throws YosException {
 
 
-        if ((type.equals("标准订单") || type.equals("特殊订单"))) {
-            return content.getLong("sa_accountclassid");
+        Long sa_accountclassid = content.getLong("sa_accountclassid");
+
+        if ((type.equals("标准订单") || type.equals("特殊订单")) && sa_accountclassid > 0) {
+            return sa_accountclassid;
         }
         }
         if (type.equals("促销订单")) {
         if (type.equals("促销订单")) {
             Rows accountclassRows = dbConnect.runSqlQuery("select sa_accountclassid from sa_promotion where siteid='" + controller.siteid + "' and sa_promotionid=" + content.getLongValue("sa_promotionid"));
             Rows accountclassRows = dbConnect.runSqlQuery("select sa_accountclassid from sa_promotion where siteid='" + controller.siteid + "' and sa_promotionid=" + content.getLongValue("sa_promotionid"));