<?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.FxdselMapper"> <resultMap id="BaseResultMap" type="com.brilliance.isc.funds.bo.Fxd"> <result property="inr" column="inr" jdbcType="VARCHAR"/> <result property="ownref" column="ownref" jdbcType="VARCHAR"/> <result property="nam" column="nam" jdbcType="VARCHAR"/> <result property="opndat" column="opndat" jdbcType="DATE"/> <result property="ownusr" column="ownusr" jdbcType="VARCHAR"/> <result property="fxtyp" column="fxtyp" jdbcType="VARCHAR"/> <result property="rat" column="rat" jdbcType="DECIMAL"/> <result property="midrat" column="midrat" jdbcType="DECIMAL"/> <result property="quoref" column="quoref" jdbcType="VARCHAR"/> <result property="fudref" column="fudref" jdbcType="VARCHAR"/> <result property="valdat" column="valdat" jdbcType="DATE"/> <result property="cnfdat" column="cnfdat" jdbcType="DATE"/> <result property="setdat" column="setdat" jdbcType="DATE"/> <result property="setdatfrm" column="setdatfrm" jdbcType="DATE"/> <result property="setdatto" column="setdatto" jdbcType="DATE"/> <result property="clsdat" column="clsdat" jdbcType="DATE"/> <result property="ver" column="ver" jdbcType="VARCHAR"/> <result property="branchinr" column="branchinr" jdbcType="VARCHAR"/> <result property="bchkeyinr" column="bchkeyinr" jdbcType="VARCHAR"/> <result property="trdint" column="trdint" jdbcType="VARCHAR"/> <result property="trdout" column="trdout" jdbcType="VARCHAR"/> <result property="trnman" column="trnman" jdbcType="VARCHAR"/> <result property="acc" column="acc" jdbcType="VARCHAR"/> <result property="acc2" column="acc2" jdbcType="VARCHAR"/> <result property="usr" column="usr" jdbcType="VARCHAR"/> <result property="dsp" column="dsp" jdbcType="VARCHAR"/> <result property="dsp2" column="dsp2" jdbcType="VARCHAR"/> <result property="cshpct" column="cshpct" jdbcType="DECIMAL"/> <result property="rat1" column="rat1" jdbcType="DECIMAL"/> <result property="accmng" column="accmng" jdbcType="VARCHAR"/> <result property="hdbch" column="hdbch" jdbcType="VARCHAR"/> <result property="etyextkey" column="etyextkey" jdbcType="VARCHAR"/> </resultMap> <sql id="Base_Column_List"> inr,ownref,nam,opndat,ownusr,fxtyp,rat,midrat,quoref,fudref,valdat,cnfdat,setdat,setdatfrm,setdatto,clsdat,ver,branchinr,bchkeyinr,trdint,trdout,trnman,acc,acc2,usr,dsp,dsp2,cshpct,rat1,accmng,hdbch,etyextkey </sql> <select id="query" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from fxd where <if test=" opndatfrom != null "> fxd.OPNDAT>=#{opndatfrom,jdbcType=DATE} </if> <if test=" opndatto != null "> AND fxd.OPNDAT<=#{opndatto,jdbcType=DATE} </if> <if test=" seaownref != null and seaownref != ''"> AND fxd.OWNREF=#{ seaownref,jdbcType=VARCHAR} </if> <if test=" nam != null and nam != ''"> AND fxd.NAM=#{ nam,jdbcType=VARCHAR} </if> <if test=" ownusr != null and ownusr != ''"> AND fxd.OWNUSR=#{ ownusr,jdbcType=VARCHAR} </if> <if test=" usr != null and usr != ''"> AND fxd.USR=#{ usr,jdbcType=VARCHAR} </if> <if test=" accmng != null and accmng != ''"> AND fxd.accmng=#{ accmng,jdbcType=VARCHAR} </if> <if test=" fxtyp != null and fxtyp != ''"> AND fxd.FXTYP=#{ fxtyp,jdbcType=VARCHAR} </if> <if test=" acc != null and acc != ''"> AND fxd.acc=#{ acc,jdbcType=VARCHAR} </if> <if test=" acc2 != null and acc2 != ''"> AND fxd.acc2=#{ acc2,jdbcType=VARCHAR} </if> <!-- <if test=" chnipt != null and chnipt != ''">--> <!-- <choose>--> <!-- <when test=" chnipt == 'BLK'">--> <!-- AND M1.nxtchncod=--> <!-- </when>--> <!-- <when test=" chnipt == 'wu'">--> <!-- AND M1.tgtchncod IS NULL--> <!-- </when>--> <!-- <otherwise>--> <!-- AND M1.tgtchncod=--> <!-- </otherwise>--> <!-- </choose>--> <!-- </if>--> <!-- <if test=" msgtyp != null and msgtyp != ''">--> <!-- AND M2.msgtyp=#{ msgtyp,jdbcType=VARCHAR}--> <!-- </if>--> <!-- <if test=" subtyp != null and subtyp != ''">--> <!-- AND M2.subtyp=#{ subtyp,jdbcType=VARCHAR}--> <!-- </if>--> <!-- <if test=" gpi != null and gpi != ''">--> <!-- AND M2.gpi=#{ gpi,jdbcType=VARCHAR}--> <!-- </if>--> <!-- <if test=" sndbak != null and sndbak != ''">--> <!-- AND M2.sndbic like '%' || #{sndbak,jdbcType=VARCHAR} || '%'--> <!-- </if>--> <!-- <if test=" revbak != null and revbak != ''">--> <!-- AND M2.rcvbic like '%' || #{revbak,jdbcType=VARCHAR} || '%'--> <!-- </if>--> <!-- <if test=" othref != null and othref != ''">--> <!-- AND M2.othref like '%' || #{othref,jdbcType=VARCHAR} || ''--> <!-- </if>--> <!-- <if test=" ownref != null and ownref != ''">--> <!-- AND M2.ownref like '%' || #{ ownref,jdbcType=VARCHAR} || '%'--> <!-- </if>--> <!-- <if test=" act != null and act != ''">--> <!-- AND M2.act like '%' || #{ act,jdbcType=VARCHAR} || '%'--> <!-- </if>--> <!-- <if test=" cur != null and cur != ''">--> <!-- AND M2.cur=#{ cur,jdbcType=VARCHAR}--> <!-- </if>--> <!-- <if test=" dtlchg != null and dtlchg != ''">--> <!-- AND M2.dtlchg=#{ dtlchg,jdbcType=VARCHAR}--> <!-- </if>--> <!-- <if test=" amtmin != null and amtmin != ''">--> <!-- AND M2.amt >= #{ amtmin,jdbcType=DECIMAL}--> <!-- </if>--> <!-- <if test=" amtmax != null and amtmax != ''">--> <!-- AND M2.amt <= #{ amtmax,jdbcType=DECIMAL}--> <!-- </if>--> <!-- <if test=" actbic != null and actbic != ''">--> <!-- AND (M2.actbic like '%' || #{ actbic,jdbcType=VARCHAR} || '%'--> <!-- or M2.t53bic LIKE '%' || #{ actbic,jdbcType=VARCHAR} || '%')--> <!-- </if>--> <!-- <if test=" sta != null and sta != ''">--> <!-- AND M1.sta=#{ sta,jdbcType=VARCHAR}--> <!-- </if>--> </select> </mapper>