Przeglądaj źródła

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

hu 1 rok temu
rodzic
commit
39fcbfa94e

+ 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