|
@@ -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>
|