ComplainMapper.xml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.unis.transaction.server.dao.ComplainDao">
  4. <sql id="complainColumns">
  5. csbm,apcc,htbh,lsxz,pz,csdwmc,ccmc,sgmc,cszt,csztmc,bcsdw,sgdw,ccdw,bcszt
  6. </sql>
  7. <sql id="complainJoins">
  8. </sql>
  9. <select id="selectPageList" resultType="com.unis.transaction.common.vo.givebackbail.ComplainVO"
  10. parameterType="com.unis.transaction.common.vo.givebackbail.ComplainVO">
  11. select
  12. <include refid="complainColumns" />
  13. from
  14. ty_jycs cs <include refid="complainJoins" />
  15. <where>
  16. <if test="csdwmc != null and csdwmc != ''">
  17. and cs.csdwmc like '%' || #{csdwmc} || '%'
  18. </if>
  19. <if test="htbh != null and htbh != ''">
  20. and cs.htbh like '%' || #{htbh} || '%'
  21. </if>
  22. <if test="csdw != null and csdw != ''">
  23. and cs.csdw = #{csdw}
  24. </if>
  25. <if test="bcsdw != null and bcsdw != ''">
  26. and cs.bcsdw = #{bcsdw}
  27. </if>
  28. <if test="sjlx != null">
  29. and cs.sjlx = #{sjlx}
  30. </if>
  31. <if test="cszt != null">
  32. and cs.cszt = #{cszt}
  33. </if>
  34. <if test="csdw != null and csdw != ''">
  35. and cs.csdw = #{csdw}
  36. </if>
  37. <if test="ztList!=null">
  38. and cs.cszt in
  39. <foreach collection="ztList" index="index" item="item" open="(" separator="," close=")">
  40. #{item}
  41. </foreach>
  42. </if>
  43. </where>
  44. order by cs.cssj desc
  45. </select>
  46. </mapper>