ソースを参照

update 分润设置

周箭河 5 年 前
コミット
cd17bd8d36

+ 16 - 8
mec-biz/src/main/resources/config/mybatis/SysPaymentConfigMapper.xml

@@ -158,14 +158,22 @@
     <select id="getPaymentConfigs" resultMap="SysPaymentConfig">
         SELECT spc.*, o.name_ organ_name
         FROM sys_payment_config spc
-                 LEFT JOIN organization o on spc.organ_id_ = o.id_
-        WHERE pay_type_ = #{payType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
-        <if test='payType != null and payType.code.equals("YQPAY")'>
-            AND spc.yq_mer_no_ is not null
-        </if>
-        <if test='payType != null and payType.code.equals("ADAPAY")'>
-            AND spc.hf_mer_no_ is not null
-        </if>
+        LEFT JOIN organization o on spc.organ_id_ = o.id_
+        <where>
+            <if test="payType == null">
+                pay_type_ IS NOT NULL
+                AND (spc.yq_mer_no_ IS NOT NULL OR spc.hf_mer_no_ IS NOT NULL)
+            </if>
+            <if test="payType != null">
+                AND pay_type_ = #{payType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+            </if>
+            <if test='payType != null and payType.code.equals("YQPAY")'>
+                AND spc.yq_mer_no_ IS NOT NULL
+            </if>
+            <if test='payType != null and payType.code.equals("ADAPAY")'>
+                AND spc.hf_mer_no_ IS NOT NULL
+            </if>
+        </where>
 
     </select>
 </mapper>