Browse Source

待审核订单数修改

rgb 6 năm trước cách đây
mục cha
commit
9c60f4a584

+ 6 - 4
diagbotman-service/src/main/resources/mapper/ProductOrderMapper.xml

@@ -73,10 +73,12 @@
     </select>
 
     <select id="waitExamOrderCou" resultType="int">
-    	SELECT
-			count(DISTINCT a.num)
-		from diag_product_order a join diag_order_details b on a.num=b.order_num
-		where b.audit_status=2
+    	SELECT 
+			count(1) 
+		FROM diag_product_order a join
+		(SELECT DISTINCT order_num
+		from diag_order_details where is_deleted='N' and audit_status=2) b on a.num=b.order_num
+		where a.is_deleted='N'
     </select>
 
     <select id="selectAllProductOrder" resultMap="BaseResultWrapper">