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

范围内非授权逻辑增加

hu пре 1 година
родитељ
комит
3fa7610852
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      src/custom/restcontroller/webmanage/sale/promotion/promotion.java

+ 3 - 0
src/custom/restcontroller/webmanage/sale/promotion/promotion.java

@@ -556,6 +556,9 @@ public class promotion extends Controller {
                     return getErrReturnObject().setErrMsg("返利促销授权的经销商必须都为限购").toString();
                 }
             }
+            if(!rows.get(0).getBoolean("authmethod") && dbConnect.runSqlQuery("select * from sa_promotion_auth where siteid='" + siteid + "' and sa_promotionid=" + sa_promotionid).isEmpty()){
+                return getErrReturnObject().setErrMsg("请添加范围内非授权经销商名单!").toString();
+            }
             for (Row row:rowsdetails) {
                 if(row.getBigDecimal("orderminqty").compareTo(BigDecimal.ZERO)==0 || row.getBigDecimal("orderaddqty").compareTo(BigDecimal.ZERO)==0){
                     return getErrReturnObject().setErrMsg("该促销方案【"+row.getString("itemno")+"】商品起订量或增量为0,无法审核").toString();