113 lines
5.7 KiB
XML
113 lines
5.7 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.mhd.bms.domain.settlementCustomers.repository.mapper.SettlementCustomersMapper">
|
|
|
|
|
|
<sql id="selectSettlementCustomersPo">
|
|
select * from settlement_customers
|
|
</sql>
|
|
|
|
<sql id="selectSettlementCustomersPo1">
|
|
<where>
|
|
<if test="createByName != null and createByName != ''">
|
|
and create_by_name like concat('%', #{createByName}, '%')
|
|
</if>
|
|
<if test="updateByName != null and updateByName != ''">
|
|
and update_by_name like concat('%', #{updateByName}, '%')
|
|
</if>
|
|
<if test="topOrganizationId != null ">
|
|
and top_organization_id = #{topOrganizationId}
|
|
</if>
|
|
<if test="organizationId != null ">
|
|
and organization_id = #{organizationId}
|
|
</if>
|
|
<if test="organizationName != null and organizationName != ''">
|
|
and organization_name like concat('%', #{organizationName}, '%')
|
|
</if>
|
|
<if test="settlementCustomersCode != null and settlementCustomersCode != ''">
|
|
and settlement_customers_code = #{settlementCustomersCode}
|
|
</if>
|
|
<if test="settlementEntityId != null ">
|
|
and settlement_entity_id = #{settlementEntityId}
|
|
</if>
|
|
<if test="settlementEntity != null and settlementEntity != ''">
|
|
and settlement_entity = #{settlementEntity}
|
|
</if>
|
|
<if test="settlementMethod != null and settlementMethod != ''">
|
|
and settlement_method = #{settlementMethod}
|
|
</if>
|
|
<if test="settlementMethodCode != null and settlementMethodCode != ''">
|
|
and settlement_method_code = #{settlementMethodCode}
|
|
</if>
|
|
<if test="settlementDirection != null and settlementDirection != ''">
|
|
and settlement_direction = #{settlementDirection}
|
|
</if>
|
|
<if test="settlementDirectionCode != null and settlementDirectionCode != ''">
|
|
and settlement_direction_code = #{settlementDirectionCode}
|
|
</if>
|
|
<if test="bankName != null and bankName != ''">
|
|
and bank_name like concat('%', #{bankName}, '%')
|
|
</if>
|
|
<if test="bankCardNumber != null and bankCardNumber != ''">
|
|
and bank_card_number = #{bankCardNumber}
|
|
</if>
|
|
<if test="bankBindingName != null and bankBindingName != ''">
|
|
and bank_binding_name like concat('%', #{bankBindingName}, '%')
|
|
</if>
|
|
</where>
|
|
</sql>
|
|
|
|
<select id="queryList" parameterType="com.mhd.bms.domain.settlementCustomers.repository.todo.SettlementCustomersDO"
|
|
resultType="com.mhd.bms.domain.settlementCustomers.repository.po.SettlementCustomersPO">
|
|
select
|
|
*
|
|
from settlement_customers
|
|
where del_flag = 1
|
|
<include refid="common_where"/>
|
|
ORDER BY create_time DESC
|
|
</select>
|
|
<select id="querySettlementObjects"
|
|
resultType="com.mhd.bms.domain.settlementCustomers.repository.po.SettlementCustomersPO">
|
|
select
|
|
settlement_customers_code,settlement_entity,CONCAT(settlement_customers_code,settlement_entity) settlement_object
|
|
from settlement_customers
|
|
where del_flag = 1
|
|
</select>
|
|
|
|
<sql id="common_where">
|
|
<if test="settlementCustomersDO.settlementEntity != null and settlementCustomersDO.settlementEntity != ''">
|
|
and settlement_entity like concat('%', #{settlementCustomersDO.settlementEntity}, '%')
|
|
</if>
|
|
<if test="settlementCustomersDO.settlementCustomersCode != null and settlementCustomersDO.settlementCustomersCode != ''">
|
|
and settlement_customers_code like concat('%', #{settlementCustomersDO.settlementCustomersCode}, '%')
|
|
</if>
|
|
<if test="settlementCustomersDO.settlementEntity != null and settlementCustomersDO.settlementCustomersCode != ''">
|
|
and settlement_customers_code like concat('%', #{settlementCustomersDO.settlementCustomersCode}, '%')
|
|
</if>
|
|
<if test="settlementCustomersDO.settlementMethod != null and settlementCustomersDO.settlementMethod != ''">
|
|
and settlement_method like concat('%', #{settlementCustomersDO.settlementMethod}, '%')
|
|
</if>
|
|
<if test="settlementCustomersDO.remark != null and settlementCustomersDO.remark != ''">
|
|
and remark like concat('%', #{settlementCustomersDO.remark}, '%')
|
|
</if>
|
|
<if test="settlementCustomersDO.createTimeStart != null and settlementCustomersDO.createTimeStart != ''">
|
|
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{settlementCustomersDO.createTimeStart}
|
|
</if>
|
|
<if test="settlementCustomersDO.createTimeEnd != null and settlementCustomersDO.createTimeEnd != ''">
|
|
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{settlementCustomersDO.createTimeEnd}
|
|
</if>
|
|
<if test="settlementCustomersDO.createByName != null and settlementCustomersDO.createByName != ''">
|
|
and create_by_name like concat('%', #{settlementCustomersDO.createByName}, '%')
|
|
</if>
|
|
<if test="settlementCustomersDO.mainRole != null and settlementCustomersDO.mainRole != ''">
|
|
and main_role = #{settlementCustomersDO.mainRole}
|
|
</if>
|
|
<if test="settlementCustomersDO.topOrganizationId != null and settlementCustomersDO.topOrganizationId != ''">
|
|
and top_organization_id = #{settlementCustomersDO.topOrganizationId}
|
|
</if>
|
|
|
|
</sql>
|
|
</mapper>
|