YhBjflFbMapper.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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.bjgl.mapper.YhBjflFbMapper">
  4. <resultMap id="yhBjflFbMap" type="com.tofly.feesapi.bjgl.entity.YhBjflFb">
  5. <id property="id" column="ID"/>
  6. <result property="zbId" column="ZB_ID"/>
  7. <result property="zbYhbh" column="ZB_YHBH"/>
  8. <result property="zbCbkh" column="ZB_CBKH"/>
  9. <result property="yhbh" column="YHBH"/>
  10. <result property="cbkh" column="CBKH"/>
  11. <result property="typeId" column="TYPE_ID"/>
  12. </resultMap>
  13. <select id="getMaxid" resultType="java.lang.String">
  14. select max(id) + 1
  15. from yh_bjfl_fb
  16. </select>
  17. <select id="getPage" resultType="com.tofly.feesapi.bjgl.entity.vo.YhBjflFbSelect">
  18. select a.id,
  19. a.zb_id zbId,
  20. a.zb_yhbh zbYhbh,
  21. a.zb_cbkh zbCbkh,
  22. a.yhbh,
  23. a.cbkh,
  24. a.type_id typeId,
  25. fb.yhxm as yhxm,
  26. fb.yhdz as yhdz,
  27. fb.lxdh as lxdh,
  28. zb.yhxm as zbYhxm,
  29. zb.yhdz as zbYhdz,
  30. zb.lxdh as zbLxdh
  31. from yh_bjfl_fb a
  32. left join yh_khjbxx fb on a.yhbh = fb.yhbh
  33. left join yh_khjbxx zb on a.zb_yhbh = zb.yhbh
  34. <where>
  35. <if test="filter.searchText != null and filter.searchText != ''">
  36. and (
  37. fb.yhbh like '%${filter.searchText}%'
  38. or fb.yhxm like '%${filter.searchText}%'
  39. or fb.yhdz like '%${filter.searchText}%'
  40. or fb.lxdh like '%${filter.searchText}%'
  41. or zb.yhbh like '%${filter.searchText}%'
  42. or zb.yhxm like '%${filter.searchText}%'
  43. or zb.yhdz like '%${filter.searchText}%'
  44. or zb.lxdh like '%${filter.searchText}%'
  45. )
  46. </if>
  47. <if test="filter.yhbh != null and filter.yhbh != ''">
  48. and fb.yhbh = #{filter.yhbh}
  49. </if>
  50. <if test="filter.typeId != null and filter.typeId != ''">
  51. and a.type_id = #{filter.typeId}
  52. </if>
  53. <if test="filter.zbId != null and filter.zbId != ''">
  54. and a.zb_id = #{filter.zbId}
  55. </if>
  56. </where>
  57. </select>
  58. </mapper>