BankInfoMapper.xml 2.43 KB
<?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="cn.com.glsx.dj.platform.payment.mapper.BankInfoMapper" >
  <resultMap id="BaseResultMap" type="cn.com.glsx.dj.platform.payment.model.BankInfo" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="branch_bank_type" property="branchBankType" jdbcType="VARCHAR" />
    <result column="branch_bank_name" property="branchBankName" jdbcType="VARCHAR" />
    <result column="bank_type" property="bankType" jdbcType="VARCHAR" />
    <result column="bank_name" property="bankName" jdbcType="VARCHAR" />
    <result column="city_code" property="cityCode" jdbcType="VARCHAR" />
    <result column="allinpay_code" property="allinpayCode"/>
    <result column="created_by" property="createdBy" jdbcType="VARCHAR" />
    <result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
    <result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
    <result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
    <result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, branch_bank_type, branch_bank_name, bank_type, bank_name, city_code, allinpay_code,
    created_by, created_date, updated_by, updated_date, deleted_flag
  </sql>
  
  <select id="listBankName" resultMap="BaseResultMap">
  	select DISTINCT bank_type,bank_name from dj_payment_bank_info where deleted_flag='N'
  </select>
  
  <select id="list" parameterType="cn.com.glsx.dj.platform.payment.dto.BankInfoDTO" resultMap="BaseResultMap">
  	select 
  		branch_bank_type, branch_bank_name, bank_type, bank_name, city_code
    from dj_payment_bank_info
  	<where>
  		deleted_flag='N'
  		<if test="branchBankType != null and branchBankType !=''">
  			and branch_bank_type = #{branchBankType}
  		</if>
  		<if test="bankName != null and bankName !=''">
  			and bank_name = #{bankName}
  		</if>
  		<if test="bankType != null and bankType !=''">
  			and bank_type = #{bankType}
  		</if>
  		<if test="keyword != null and keyword !=''">
  			and branch_bank_name like concat('%', #{keyword}, '%')
  		</if>
  		<if test="cityCode != null and cityCode !=''">
  			and city_code = #{cityCode}
  		</if>
  	</where>
  </select>
</mapper>