瀏覽代碼

促销方案经销商查询bug修复

hu 1 年之前
父節點
當前提交
39fcbfa94e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/custom/restcontroller/sale/promotion/SQL/促销方案列表查询.sql

+ 2 - 2
src/custom/restcontroller/sale/promotion/SQL/促销方案列表查询.sql

@@ -73,7 +73,7 @@ FROM
 					AND t2.sys_enterpriseid =$sys_enterpriseid$
 				AND
 				IF
-				( t2.islimit = 1, t2.saledamount < t2.limitamount, 1 = 1 ))
+				( t2.islimit = 1,  ifnull(t2.saledamount,0)  < t2.limitamount, 1 = 1 ))
 				or t1.sa_promotionid IN (
 				SELECT
 					sa_promotionid
@@ -113,7 +113,7 @@ FROM
 					AND t2.sys_enterpriseid = $sys_enterpriseid$
 				AND
 				IF
-				( t2.islimit = 1, t2.saledamount < t2.limitamount, 1 = 1 )) or t1.sa_promotionid IN (
+				( t2.islimit = 1,  ifnull(t2.saledamount,0)  < t2.limitamount, 1 = 1 )) or t1.sa_promotionid IN (
 			SELECT
 				sa_promotionid
 			FROM