123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615 |
- <?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.unis.transaction.server.dao.GiveBackBailLetterDao'>
-
- <!--退保证金委托函 单表[TY_JYTKWTH]表
- 和实体基础映射-->
- <resultMap id='ResultMapBase' type='com.unis.transaction.server.entity.givebackbail.GiveBackBailLetterDO'>
- <id column='WTHBM' jdbcType='VARCHAR' property='wthbm' /><!--委托函编码#<主键><非空>-->
- <result column='TZBT' jdbcType='VARCHAR' property='tzbt' /><!--通知标题-->
- <result column='WTHBH' jdbcType='VARCHAR' property='wthbh' /><!--委托函编号-->
- <result column='WTLX' jdbcType='INTEGER' property='wtlx' /><!--0销售#<默认值:0>1采购-->
- <result column='WTLXMC' jdbcType='VARCHAR' property='wtlxmc' /><!--类型名称-->
- <result column='JSDW' jdbcType='VARCHAR' property='jsdw' /><!--接收单位-->
- <result column='JSZW' jdbcType='VARCHAR' property='jszw' /><!--接收正文-->
- <result column='APCC' jdbcType='VARCHAR' property='apcc' /><!--场次-->
- <result column='BZR' jdbcType='VARCHAR' property='bzr' /><!--编制人-->
- <result column='BZSJ' jdbcType='DATE' property='bzsj' /><!--编制时间-->
- <result column='ZT' jdbcType='VARCHAR' property='zt' /><!--状态值-->
- <result column='ZTMC' jdbcType='VARCHAR' property='ztmc' /><!--状态名称-->
- <result column='STATUS' jdbcType='INTEGER' property='status' /><!--状态#<默认值:1>1:正常,0:已作废(用做是否删除)-->
- <result column='CREATOR' jdbcType='VARCHAR' property='creator' /><!--创建人-->
- <result column='CREATOR_CODE' jdbcType='VARCHAR' property='creatorCode' /><!--创建人编码-->
- <result column='CREATE_DATE' jdbcType='TIMESTAMP' property='createDate' /><!--创建时间#<默认值:current>-->
- <result column='REFRESHER' jdbcType='VARCHAR' property='refresher' /><!--更新人-->
- <result column='REFRESHER_CODE' jdbcType='VARCHAR' property='refresherCode' /><!--更新人编码-->
- <result column='REFRESH_TIME' jdbcType='TIMESTAMP' property='refreshTime' /><!--更新时间#<默认值:current>-->
- <result column='REMARK' jdbcType='CLOB' property='remark' /><!--备注-->
- </resultMap>
-
- <!--[TY_JYTKWTH]表基础列-->
- <sql id='Column_Base_List'>
- WTHBM, TZBT, WTHBH,HTBM,HTBH,CCBM, WTLX, WTLXMC, JSDW, JSZW, APCC, BZR, BZSJ, ZT, ZTMC, STATUS,
- CREATOR, CREATOR_CODE, CREATE_DATE, REFRESHER, REFRESHER_CODE, REFRESH_TIME, REMARK
- </sql>
-
- <!--[TY_JYTKWTH]带别名的表基础列,别名为大写表名-->
- <sql id='Column_Alias_List'>
- A.WTHBM, A.TZBT, A.WTHBH,A.HTBM,A.HTBH,A.CCBM, A.WTLX, A.WTLXMC, A.JSDW, A.JSZW, A.APCC, A.BZR, A.BZSJ,
- A.ZT, A.ZTMC, A.STATUS, A.CREATOR, A.CREATOR_CODE, A.CREATE_DATE, A.REFRESHER, A.REFRESHER_CODE,
- A.REFRESH_TIME, A.REMARK
- </sql>
-
- <!--[TY_JYTKWTH]表 order by 条件-->
- <sql id='Order_By_Clause'>
- ORDER BY WTHBM DESC
- </sql>
-
- <!--[TY_JYTKWTH]表 order by 条件-->
- <sql id='Order_By_Alias_Clause'>
- ORDER BY A.WTHBM DESC
- </sql>
-
- <!--插入全部字段,特别注意:插入全部字段时,数据库默认值会不起效-->
- <insert id='insertEntity'>
- insert into TY_JYTKWTH (WTHBM, TZBT, WTHBH,
- WTLX, WTLXMC, JSDW,HTBM,HTBH,CCBM,
- JSZW, APCC, BZR, BZSJ,
- ZT, ZTMC, STATUS, CREATOR,
- CREATOR_CODE, CREATE_DATE, REFRESHER,
- REFRESHER_CODE, REFRESH_TIME, REMARK
- )
- values (#{wthbm,jdbcType=VARCHAR}, #{tzbt,jdbcType=VARCHAR}, #{wthbh,jdbcType=VARCHAR},
- #{wtlx,jdbcType=INTEGER}, #{wtlxmc,jdbcType=VARCHAR}, #{jsdw,jdbcType=VARCHAR}, #{htbm,jdbcType=VARCHAR},
- #{htbh,jdbcType=VARCHAR}, #{ccbm,jdbcType=VARCHAR},
- #{jszw,jdbcType=VARCHAR}, #{apcc,jdbcType=VARCHAR}, #{bzr,jdbcType=VARCHAR}, #{bzsj,jdbcType=DATE},
- #{zt,jdbcType=VARCHAR}, #{ztmc,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR},
- #{creatorCode,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{refresher,jdbcType=VARCHAR},
- #{refresherCode,jdbcType=VARCHAR}, #{refreshTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=CLOB}
- )
- </insert>
-
- <!--选择性插入字段,只插入值不为null的属性对应的字段-->
- <insert id='insertEntitySelective'>
- insert into TY_JYTKWTH
- <trim prefix='(' suffix=')' suffixOverrides=','>
- <if test='wthbm != null and wthbm != ""'>
- WTHBM,
- </if>
- <if test='tzbt != null and tzbt != ""'>
- TZBT,
- </if>
- <if test='wthbh != null and wthbh != ""'>
- WTHBH,
- </if>
- <if test='wtlx != null'>
- WTLX,
- </if>
- <if test='wtlxmc != null and wtlxmc != ""'>
- WTLXMC,
- </if>
- <if test='jsdw != null and jsdw != ""'>
- JSDW,
- </if>
- <if test='jsdwbm != null and jsdwbm != ""'>
- JSDWBM,
- </if>
- <if test='jszw != null and jszw != ""'>
- JSZW,
- </if>
- <if test='apcc != null and apcc != ""'>
- APCC,
- </if>
- <if test='bzr != null and bzr != ""'>
- BZR,
- </if>
- <if test='bzsj != null'>
- BZSJ,
- </if>
- <if test='zt != null and zt != ""'>
- ZT,
- </if>
- <if test='ztmc != null and ztmc != ""'>
- ZTMC,
- </if>
- <if test='status != null'>
- STATUS,
- </if>
- <if test='creator != null and creator != ""'>
- CREATOR,
- </if>
- <if test='creatorCode != null and creatorCode != ""'>
- CREATOR_CODE,
- </if>
- <if test='createDate != null'>
- CREATE_DATE,
- </if>
- <if test='refresher != null and refresher != ""'>
- REFRESHER,
- </if>
- <if test='refresherCode != null and refresherCode != ""'>
- REFRESHER_CODE,
- </if>
- <if test='refreshTime != null'>
- REFRESH_TIME,
- </if>
- <if test='remark != null and remark != ""'>
- REMARK,
- </if>
- <if test='htbm != null and htbm != ""'>
- htbm,
- </if>
- <if test='htbh != null and htbh != ""'>
- htbh,
- </if>
- <if test='ccbm != null and ccbm != ""'>
- ccbm,
- </if>
- <if test='wtfbm != null and wtfbm != ""'>
- wtfbm
- </if>
- </trim>
- <trim prefix='values (' suffix=')' suffixOverrides=','>
- <if test='wthbm != null and wthbm != ""'>
- #{wthbm,jdbcType=VARCHAR},
- </if>
- <if test='tzbt != null and tzbt != ""'>
- #{tzbt,jdbcType=VARCHAR},
- </if>
- <if test='wthbh != null and wthbh != ""'>
- #{wthbh,jdbcType=VARCHAR},
- </if>
- <if test='wtlx != null'>
- #{wtlx,jdbcType=INTEGER},
- </if>
- <if test='wtlxmc != null and wtlxmc != ""'>
- #{wtlxmc,jdbcType=VARCHAR},
- </if>
- <if test='jsdw != null and jsdw != ""'>
- #{jsdw,jdbcType=VARCHAR},
- </if>
- <if test='jsdwbm != null and jsdwbm != ""'>
- #{jsdwbm,jdbcType=VARCHAR},
- </if>
- <if test='jszw != null and jszw != ""'>
- #{jszw,jdbcType=VARCHAR},
- </if>
- <if test='apcc != null and apcc != ""'>
- #{apcc,jdbcType=VARCHAR},
- </if>
- <if test='bzr != null and bzr != ""'>
- #{bzr,jdbcType=VARCHAR},
- </if>
- <if test='bzsj != null'>
- #{bzsj,jdbcType=DATE},
- </if>
- <if test='zt != null and zt != ""'>
- #{zt,jdbcType=VARCHAR},
- </if>
- <if test='ztmc != null and ztmc != ""'>
- #{ztmc,jdbcType=VARCHAR},
- </if>
- <if test='status != null'>
- #{status,jdbcType=INTEGER},
- </if>
- <if test='creator != null and creator != ""'>
- #{creator,jdbcType=VARCHAR},
- </if>
- <if test='creatorCode != null and creatorCode != ""'>
- #{creatorCode,jdbcType=VARCHAR},
- </if>
- <if test='createDate != null'>
- #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test='refresher != null and refresher != ""'>
- #{refresher,jdbcType=VARCHAR},
- </if>
- <if test='refresherCode != null and refresherCode != ""'>
- #{refresherCode,jdbcType=VARCHAR},
- </if>
- <if test='refreshTime != null'>
- #{refreshTime,jdbcType=TIMESTAMP},
- </if>
- <if test='remark != null and remark != ""'>
- #{remark,jdbcType=CLOB},
- </if>
- <if test='htbm != null and htbm != ""'>
- #{htbm,jdbcType=VARCHAR},
- </if>
- <if test='htbh != null and htbh != ""'>
- #{htbh,jdbcType=VARCHAR},
- </if>
- <if test='ccbm != null and ccbm != ""'>
- #{ccbm,jdbcType=VARCHAR},
- </if>
- <if test='wtfbm != null and wtfbm != ""'>
- #{wtfbm,jdbcType=VARCHAR}
- </if>
- </trim>
- </insert>
-
- <!--更新状态-->
- <update id='updateStatusByEntity'>
- update TY_JYTKWTH
- <set>
- <if test='refresher != null and refresher != ""'>
- REFRESHER = #{refresher,jdbcType=VARCHAR},
- </if>
- <if test='refresherCode != null and refresherCode != ""'>
- REFRESHER_CODE = #{refresherCode,jdbcType=VARCHAR},
- </if>
- <if test='refreshTime != null'>
- REFRESH_TIME = #{refreshTime,jdbcType=TIMESTAMP},
- </if>
- <if test='zt != null and zt != ""'>
- ZT = #{zt,jdbcType=VARCHAR},
- </if>
- <if test='ztmc != null and ztmc != ""'>
- ZTMC = #{ztmc,jdbcType=VARCHAR},
- </if>
- <if test='wthbh != null and wthbh != ""'>
- WTHBH = #{wthbh,jdbcType=VARCHAR},
- </if>
- <if test='wtfbm != null and wtfbm != ""'>
- WTFBM = #{wtfbm,jdbcType=VARCHAR},
- </if>
- <if test='wtlxmc != null and wtlxmc != ""'>
- WTLXMC = #{wtlxmc,jdbcType=VARCHAR},
- </if>
- <if test='status != null'>
- STATUS = #{status,jdbcType=INTEGER},
- </if>
- <if test='htbm != null and htbm != ""'>
- htbm = #{htbm,jdbcType=VARCHAR},
- </if>
- <if test='htbh != null and htbh != ""'>
- htbh = #{htbh,jdbcType=VARCHAR},
- </if>
- <if test='ccbm != null and ccbm != ""'>
- ccbm = #{ccbm,jdbcType=VARCHAR}
- </if>
- </set>
- <where>
- <!--此处为必填条件,如不满足则不执行,以免更新全部-->
- <choose>
- <when test='wthbm !=null and wthbm != ""'>
- WTHBM = #{wthbm,jdbcType=VARCHAR}
- </when>
- <otherwise>
- AND 1=0
- </otherwise>
- </choose>
- </where>
- </update>
-
- <!--根据某些属性更新全部字段-->
- <update id='updateByEntity'>
- update TY_JYTKWTH
- set TZBT = #{tzbt,jdbcType=VARCHAR},
- WTHBH = #{wthbh,jdbcType=VARCHAR},
- WTFBM = #{wtfbm,jdbcType=VARCHAR},
- WTLX = #{wtlx,jdbcType=INTEGER},
- WTLXMC = #{wtlxmc,jdbcType=VARCHAR},
- JSDW = #{jsdw,jdbcType=VARCHAR},
- JSZW = #{jszw,jdbcType=VARCHAR},
- APCC = #{apcc,jdbcType=VARCHAR},
- BZR = #{bzr,jdbcType=VARCHAR},
- BZSJ = #{bzsj,jdbcType=DATE},
- WTFBM = #{wtfbm,jdbcType=VARCHAR},
- ZT = #{zt,jdbcType=VARCHAR},
- ZTMC = #{ztmc,jdbcType=VARCHAR},
- STATUS = #{status,jdbcType=INTEGER},
- REFRESHER = #{refresher,jdbcType=VARCHAR},
- REFRESHER_CODE = #{refresherCode,jdbcType=VARCHAR},
- REFRESH_TIME = #{refreshTime,jdbcType=TIMESTAMP},
- htbm = #{htbm,jdbcType=VARCHAR},
- htbh = #{htbh,jdbcType=VARCHAR},
- ccbm = #{ccbm,jdbcType=VARCHAR},
- REMARK = #{remark,jdbcType=CLOB}
- <where>
- <!--此处为必填条件,如不满足则不执行,以免更新全部-->
- <choose>
- <when test='wthbm !=null and wthbm != ""'>
- WTHBM = #{wthbm,jdbcType=VARCHAR}
- </when>
- <otherwise>
- AND 1=0
- </otherwise>
- </choose>
- <!--此处可添加状态条件等-->
- <if test='status!=null'>
- AND STATUS = #{status,jdbcType=INTEGER}
- </if>
- </where>
- </update>
-
- <!--根据实体不为null的属性,选择性更新字段-->
- <update id='updateByEntitySelective'>
- update TY_JYTKWTH
- <set>
- <if test='tzbt != null and tzbt != ""'>
- TZBT = #{tzbt,jdbcType=VARCHAR},
- </if>
- <if test='wthbh != null and wthbh != ""'>
- WTHBH = #{wthbh,jdbcType=VARCHAR},
- </if>
- <if test='wtfbm != null and wtfbm != ""'>
- WTFBM = #{wtfbm,jdbcType=VARCHAR},
- </if>
- <if test='wtlx != null'>
- WTLX = #{wtlx,jdbcType=INTEGER},
- </if>
- <if test='wtlxmc != null and wtlxmc != ""'>
- WTLXMC = #{wtlxmc,jdbcType=VARCHAR},
- </if>
- <if test='jsdw != null and jsdw != ""'>
- JSDW = #{jsdw,jdbcType=VARCHAR},
- </if>
- <if test='jsdwbm != null and jsdwbm != ""'>
- JSDWBM = #{jsdwbm,jdbcType=VARCHAR},
- </if>
- <if test='jszw != null and jszw != ""'>
- JSZW = #{jszw,jdbcType=VARCHAR},
- </if>
- <if test='apcc != null and apcc != ""'>
- APCC = #{apcc,jdbcType=VARCHAR},
- </if>
- <if test='bzr != null and bzr != ""'>
- BZR = #{bzr,jdbcType=VARCHAR},
- </if>
- <if test='bzsj != null'>
- BZSJ = #{bzsj,jdbcType=DATE},
- </if>
- <if test='zt != null and zt != ""'>
- ZT = #{zt,jdbcType=VARCHAR},
- </if>
- <if test='ztmc != null and ztmc != ""'>
- ZTMC = #{ztmc,jdbcType=VARCHAR},
- </if>
- <if test='status != null'>
- STATUS = #{status,jdbcType=INTEGER},
- </if>
- <if test='refresher != null and refresher != ""'>
- REFRESHER = #{refresher,jdbcType=VARCHAR},
- </if>
- <if test='refresherCode != null and refresherCode != ""'>
- REFRESHER_CODE = #{refresherCode,jdbcType=VARCHAR},
- </if>
- <if test='refreshTime != null'>
- REFRESH_TIME = #{refreshTime,jdbcType=TIMESTAMP},
- </if>
- <if test='remark != null and remark != ""'>
- REMARK = #{remark,jdbcType=CLOB},
- </if>
- <if test='htbm != null and htbm != ""'>
- htbm = #{htbm,jdbcType=VARCHAR},
- </if>
- <if test='htbh != null and htbh != ""'>
- htbh = #{htbh,jdbcType=VARCHAR},
- </if>
- <if test='ccbm != null and ccbm != ""'>
- ccbm = #{ccbm,jdbcType=VARCHAR}
- </if>
- </set>
- <where>
- <!--此处为必填条件,如不满足则不执行,以免更新全部-->
- <choose>
- <when test='wthbm !=null and wthbm != ""'>
- WTHBM = #{wthbm,jdbcType=VARCHAR}
- </when>
- <otherwise>
- AND 1=0
- </otherwise>
- </choose>
- <!--此处可添加状态条件等-->
- <if test='status!=null'>
- AND STATUS = #{status,jdbcType=INTEGER}
- </if>
- </where>
- </update>
-
- <!--[真删除]根据实体的某些属性进行单条或者批量删除
- 此处不支持id集合的形式,如有其他情况自行添加-->
- <delete id='deleteByEntity'>
- DELETE FROM TY_JYTKWTH
- <where>
- <!--此处为必填条件,如不满足则不执行,以免更新全部-->
- <choose>
- <when test='wthbm !=null and wthbm != ""'>
- WTHBM = #{wthbm,jdbcType=VARCHAR}
- </when>
- <when test='apcc !=null and apcc != ""'>
- APCC = #{apcc,jdbcType=VARCHAR}
- </when>
- <otherwise>
- AND 1=0
- </otherwise>
- </choose>
- <!--此处可添加状态条件等-->
- <if test='status!=null'>
- AND STATUS = #{status,jdbcType=INTEGER}
- </if>
- </where>
- </delete>
-
- <!--[假删除]根据实体的某些属性进行单条或者批量删除
- 此处不支持id集合的形式,如有其他情况自行添加-->
- <update id='deleteShamByEntity'>
- update TY_JYTKWTH
- set
- STATUS = #{status,jdbcType=INTEGER}
- <where>
- <!--此处为必填条件,如不满足则不执行,以免更新全部-->
- <choose>
- <when test='wthbm !=null and wthbm != ""'>
- WTHBM = #{wthbm,jdbcType=VARCHAR}
- </when>
- <when test='apcc !=null and apcc != ""'>
- APCC = #{apcc,jdbcType=VARCHAR}
- </when>
- <otherwise>
- AND 1=0
- </otherwise>
- </choose>
- </where>
- </update>
-
- <!--根据实体的某些属性查询数量-->
- <select id='selectCountByEntity' resultType='java.lang.Integer'>
- SELECT
- COUNT(*)
- FROM TY_JYTKWTH
- <where>
- <!--if条件要注意,以免误删除或者更新全部-->
- <if test='wthbm !=null and wthbm != ""'>
- AND WTHBM = #{wthbm,jdbcType=VARCHAR}
- </if>
- <if test='tzbt !=null and tzbt != ""'>
- AND TZBT = #{tzbt,jdbcType=VARCHAR}
- </if>
- <if test='wthbh !=null and wthbh != ""'>
- AND WTHBH = #{wthbh,jdbcType=VARCHAR}
- </if>
- <if test='wtlx !=null'>
- AND WTLX = #{wtlx,jdbcType=INTEGER}
- </if>
- <if test='wtlxmc !=null and wtlxmc != ""'>
- AND WTLXMC = #{wtlxmc,jdbcType=VARCHAR}
- </if>
- <!--此处可添加状态条件等-->
- <if test='status!=null'>
- AND STATUS = #{status,jdbcType=INTEGER}
- </if>
- </where>
- </select>
-
- <!--根据实体的唯一标示查询,如id,联合主键,业务唯一标示等,多种方式均可,但要保证数据唯一
- 此处只使用系统id,如有其他情况自行添加-->
- <select id='selectById' resultType='com.unis.transaction.common.vo.givebackbail.GiveBackBailLetterVO'>
- SELECT
- *
- FROM TY_JYTKWTH
- <where>
- <!--此处为必填条件,如不满足则不执行,以免查询全部-->
- <choose>
- <when test='wthbm !=null and wthbm != ""'>
- WTHBM = #{wthbm,jdbcType=VARCHAR}
- </when>
- <when test='apcc !=null and apcc != ""'>
- APCC = #{apcc,jdbcType=VARCHAR}
- </when>
- <otherwise>
- AND 1=0
- </otherwise>
- </choose>
- <!--此处可添加状态条件等-->
- <if test='status!=null'>
- AND STATUS = #{status,jdbcType=INTEGER}
- </if>
- </where>
- </select>
-
- <!--根据实体的某些属性查询分页数据
- 此处选取其中1-2个字段,需要根据实际情况修改-->
- <select id='selectPageByEntity' resultType='com.unis.transaction.common.vo.givebackbail.GiveBackBailLetterVO'>
- SELECT
- <include refid='Column_Base_List' />
- FROM TY_JYTKWTH
- <where>
- <!--自定义配置的检索条件-->
- <if test='wthbh !=null and wthbh != ""'>
- AND WTHBH like CONCAT('%',CONCAT(#{wthbh,jdbcType=VARCHAR},'%'))
- </if>
- <if test='htbm !=null and htbm != ""'>
- AND htbm like '%' || #{htbm} || '%'
- </if>
- <if test='htbh !=null and htbh != ""'>
- AND htbh like '%' || #{htbh} || '%'
- </if>
- <if test='wtlx !=null'>
- AND WTLX = #{wtlx,jdbcType=INTEGER}
- </if>
- <if test='jsdw !=null and jsdw != ""'>
- AND JSDW = #{jsdw,jdbcType=VARCHAR}
- </if>
- <if test='zt !=null and zt != ""'>
- AND ZT = #{zt,jdbcType=VARCHAR}
- </if>
- <if test='creator !=null and creator != ""'>
- AND CREATOR = #{creator,jdbcType=VARCHAR}
- </if>
- <!--if条件要注意,以免误删除或者更新全部-->
- <if test='wthbm !=null and wthbm != ""'>
- AND WTHBM = #{wthbm,jdbcType=VARCHAR}
- </if>
- <if test='tzbt !=null and tzbt != ""'>
- AND TZBT = #{tzbt,jdbcType=VARCHAR}
- </if>
- <if test='wtlxmc !=null and wtlxmc != ""'>
- AND WTLXMC = #{wtlxmc,jdbcType=VARCHAR}
- </if>
- <!--此处可添加状态条件等-->
- <if test='status!=null'>
- AND STATUS = #{status,jdbcType=INTEGER}
- </if>
- </where>
- </select>
-
- <!--根据实体的某些属性查询多条数据
- 此处选取其中1-2个字段,需要根据实际情况修改-->
- <select id='selectByEntity' resultType='com.unis.transaction.common.vo.givebackbail.GiveBackBailLetterVO'>
- SELECT
- <include refid='Column_Base_List' />
- FROM TY_JYTKWTH
- <where>
- <!--自定义配置的检索条件-->
- <if test='wthbh !=null and wthbh != ""'>
- AND WTHBH = #{wthbh,jdbcType=VARCHAR}
- </if>
- <if test='wtlx !=null'>
- AND WTLX = #{wtlx,jdbcType=INTEGER}
- </if>
- <if test='jsdw !=null and jsdw != ""'>
- AND JSDW = #{jsdw,jdbcType=VARCHAR}
- </if>
- <if test='zt !=null and zt != ""'>
- AND ZT = #{zt,jdbcType=VARCHAR}
- </if>
- <if test='creator !=null and creator != ""'>
- AND CREATOR = #{creator,jdbcType=VARCHAR}
- </if>
- <!--if条件要注意,以免误删除或者更新全部-->
- <if test='wthbm !=null and wthbm != ""'>
- AND WTHBM = #{wthbm,jdbcType=VARCHAR}
- </if>
- <if test='tzbt !=null and tzbt != ""'>
- AND TZBT = #{tzbt,jdbcType=VARCHAR}
- </if>
- <if test='wtlxmc !=null and wtlxmc != ""'>
- AND WTLXMC = #{wtlxmc,jdbcType=VARCHAR}
- </if>
- <!--此处可添加状态条件等-->
- <if test='status!=null'>
- AND STATUS = #{status,jdbcType=INTEGER}
- </if>
- </where>
- <include refid='Order_By_Clause' />
- </select>
- <select id="selectHt" resultType="com.unis.transaction.common.vo.givebackbail.GiveBackBailLetterVO" parameterType="com.unis.transaction.common.vo.givebackbail.GiveBackBailLetterVO">
- select htbm from ty_jytkwth
- <where>
- htbm is not null
- <if test='zt != null and zt != ""'>
- AND zt <> #{zt}
- </if>
- <if test='wtfbm !=null and wtfbm != ""'>
- AND wtfbm = #{wtfbm}
- </if>
- </where>
- </select>
- <select id="selectYfsHt" resultType="com.unis.transaction.common.vo.givebackbail.GiveBackBailLetterVO">
- select * from ty_jytkwth where zt = #{zt} and wtfbm=#{wtfbm} and htbm is not null
- </select>
-
- </mapper>
|