12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?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.NoticeDao">
-
- <sql id="NoticeColumns">
- tzbm,apcc,htbh,lsxz,pz,ccmc,sgmc,tzzt,tzztmc,title,tzsj,ccdw,sgdw,wtzt,khzt,ccdws,sgdws,ckztmc
- </sql>
-
- <sql id="NoticeJoins">
-
- </sql>
-
- <select id="selectPageList" resultType="com.unis.transaction.common.vo.givebackbail.NoticeVO"
- parameterType="com.unis.transaction.common.vo.givebackbail.NoticeVO">
- select
- <include refid="NoticeColumns" />
- from
- ty_jytz tz <include refid="NoticeJoins" />
- <where>
- <if test="title != null and title != ''">
- and tz.title like '%' || #{title} || '%'
- </if>
- <if test="htbh != null and htbh != ''">
- and tz.htbh like '%' || #{htbh} || '%'
- </if>
- <if test="tzzt != null">
- and tz.tzzt = #{tzzt}
- </if>
- <if test="ztList!=null">
- and tz.tzzt in
- <foreach collection="ztList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- order by tz.tzsj desc
- </select>
- <select id="selectPageLists" resultType="com.unis.transaction.common.vo.givebackbail.NoticeVO">
- select * from (
- select
- <include refid="NoticeColumns"/>
- from
- ty_jytz
- <where>
- <if test=" title!= null and title != ''">
- and title like '%' || #{title} || '%'
- </if>
- <if test="htbh != null and htbh != ''">
- and htbh like '%' || #{htbh} || '%'
- </if>
- <if test="tzzt != null and tzzt != ''">
- and tzzt =#{tzzt}
- </if>
- <if test="ccdw != null and ccdw != ''">
- and ccdws =#{ccdw}
- </if>
- <if test="ztList!=null">
- and tzzt in
- <foreach collection="ztList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- union
- select
- <include refid="NoticeColumns"/>
- from
- ty_jytz
- <where>
- <if test=" title!= null and title != ''">
- and title like '%' || #{title} || '%'
- </if>
- <if test="htbh != null and htbh != ''">
- and htbh like '%' || #{htbh} || '%'
- </if>
- <if test="tzzt != null and tzzt != ''">
- and tzzt =#{tzzt}
- </if>
- <if test="ccdw != null and ccdw != ''">
- and sgdws=#{ccdw}
- </if>
- <if test="ztList!=null">
- and tzzt in
- <foreach collection="ztList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- ) notice
- order by tzsj desc
- </select>
-
-
- </mapper>
|