YyBgLogMapper.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.tofly.feesapi.mxcx.mapper.YyBgLogMapper">
  4. <resultMap id="yyBgLogMap" type="com.tofly.feesapi.mxcx.entity.YyBgLog">
  5. <id property="id" column="ID"/>
  6. <result property="bgryid" column="BGRYID"/>
  7. <result property="bgryxm" column="BGRYXM"/>
  8. <result property="bgdate" column="BGDATE"/>
  9. <result property="bglx" column="BGLX"/>
  10. <result property="bglxid" column="BGLXID"/>
  11. <result property="bgqjson" column="BGQJSON"/>
  12. <result property="bghjson" column="BGHJSON"/>
  13. <result property="bgnr" column="BGNR"/>
  14. <result property="gdbh" column="GDBH"/>
  15. </resultMap>
  16. <select id="getPage" resultType="com.tofly.feesapi.mxcx.entity.vo.YyBgLogSelect">
  17. select
  18. id,
  19. bgryid,
  20. bgryxm,
  21. bgdate,
  22. (case
  23. when bglx = '1' then '欠费明细变更'
  24. when bglx = '2' then '费用调整'
  25. else '未知'
  26. end) bglx,
  27. bglxid,
  28. bgqjson,
  29. bghjson,
  30. bgnr,
  31. gdbh
  32. from YY_BG_LOG
  33. <where>
  34. <if test="filter.czry != null and filter.czry != ''">
  35. and BGRYID=#{filter.czry }
  36. </if>
  37. <if test="filter.czsjStart != null and filter.czsjEnd != null">
  38. and BGDATE between #{filter.czsjStart} and #{filter.czsjEnd}
  39. </if>
  40. <if test="filter.searchText != null and filter.searchText != ''">
  41. and (
  42. BGRYXM like '%${filter.searchText}%'
  43. or BGNR like '%${filter.searchText}%'
  44. )
  45. </if>
  46. <if test="filter.bglx != null and filter.bglx != ''">
  47. and BGLX = #{filter.bglx}
  48. </if>
  49. </where>
  50. </select>
  51. </mapper>