From f14c50cb0036d3ddd655ce4e34732ba396a836c4 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 30 五月 2023 12:42:03 +0800
Subject: [PATCH] optimize 统计
---
java110-db/src/main/resources/mapper/scm/SupplierConfigV1ServiceDaoImplMapper.xml | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/scm/SupplierConfigV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/scm/SupplierConfigV1ServiceDaoImplMapper.xml
index c7c3038..ed49e71 100644
--- a/java110-db/src/main/resources/mapper/scm/SupplierConfigV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/scm/SupplierConfigV1ServiceDaoImplMapper.xml
@@ -18,8 +18,10 @@
<!-- 鏌ヨ渚涘簲鍟嗛厤缃俊鎭� add by wuxw 2018-07-03 -->
<select id="getSupplierConfigInfo" parameterType="Map" resultType="Map">
select t.supplier_id,t.supplier_id supplierId,t.config_id,t.config_id configId,t.status_cd,t.status_cd
- statusCd,t.column_value,t.column_value columnValue,t.column_key,t.column_key columnKey
+ statusCd,t.column_value,t.column_value columnValue,t.column_key,t.column_key columnKey,sk.name, sk.remark
from supplier_config t
+ inner join supplier s on t.supplier_id = s.supplier_id and s.status_cd = '0'
+ inner join supplier_key sk on s.bean_name = sk.bean_name and sk.column_key = t.column_key and sk.status_cd = '0'
where 1 =1
<if test="supplierId !=null and supplierId != ''">
and t.supplier_id= #{supplierId}
@@ -50,9 +52,7 @@
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if>
- <if test="supplierId !=null and supplierId != ''">
- , t.supplier_id= #{supplierId}
- </if>
+
<if test="columnValue !=null and columnValue != ''">
, t.column_value= #{columnValue}
</if>
@@ -63,6 +63,9 @@
<if test="configId !=null and configId != ''">
and t.config_id= #{configId}
</if>
+ <if test="supplierId !=null and supplierId != ''">
+ and t.supplier_id= #{supplierId}
+ </if>
</update>
@@ -70,6 +73,8 @@
<select id="querySupplierConfigsCount" parameterType="Map" resultType="Map">
select count(1) count
from supplier_config t
+ inner join supplier s on t.supplier_id = s.supplier_id and s.status_cd = '0'
+ inner join supplier_key sk on s.bean_name = sk.bean_name and sk.column_key = t.column_key and sk.status_cd = '0'
where 1 =1
<if test="supplierId !=null and supplierId != ''">
and t.supplier_id= #{supplierId}
--
Gitblit v1.8.0