gimgsemapper.xml 1.52 KB
Newer Older
hulei committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
<?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.brilliance.isc.mda.dao.GimGseMapper">

    <select id="selectJoinCount" resultType="int">
        select count(1)
        from GIMGSE
        where BICCOD = #{bicCod,jdbcType=VARCHAR}
          and BNKSTA = 'ADDD'
    </select>

    <select id="queryAllByLimit" resultType="com.brilliance.isc.vo.manager.GimgVo">
        select
        innera.BICCOD,
        innera.bnksta,
        innerb.MSGTYP,
        innerb.BICCOD biccod8,
        innerb.bnksta bnksta8,
        innerb.STSCOD,
        case when ( innera.bnksta = 'ADDD' and innerb.bnksta = 'ADDD' and innerb.STSCOD = '0' ) then '可发送' else '不可发送' end issend
        from GIMGSE innera, GIMGSP innerb
        where 1=1
        <if test="entity.biccod != null and entity.biccod != ''">
            and innera.biccod like concat(concat('%',#{entity.biccod}),'%')
        </if>
        <if test="entity.msgtyp != null and entity.msgtyp != ''">
            and innerb.msgtyp = #{entity.msgtyp}
        </if>
        and substr(innera.biccod,1,8)=innerb.biccod and (substr(innerb.msgtyp,3,1) in ('4','7') or innerb.msgtyp='MT999')
    </select>

    <select id="queryAllByLmt" resultType="com.brilliance.isc.vo.manager.GimgVo">
        select innera.BICCOD, innera.bnksta, '' msgtyp, '' biccod8, '' bnksta8, '' stscod, '' issend from GIMGSE innera where innera.biccod like concat(#{entity.biccod},'%')
    </select>

</mapper>