BmYslxMapper.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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.bmgl.mapper.BmYslxMapper">
  4. <select id="selectMaxId" resultType="decimal">
  5. SELECT NVL(MAX(to_number(CODE)), 0)
  6. FROM BM_YSLX
  7. </select>
  8. <select id="selectListMap" resultType="java.util.Map">
  9. select *
  10. from BM_YSLX
  11. where 1 = 1
  12. </select>
  13. <resultMap id="bmYslxMap" type="com.tofly.feesapi.bmgl.entity.BmYslx">
  14. <id property="code" column="CODE"/>
  15. <result property="name" column="NAME"/>
  16. <result property="znj" column="ZNJ"/>
  17. <result property="znjbm" column="ZNJBM"/>
  18. <result property="znjday" column="ZNJDAY"/>
  19. <result property="ssgs" column="SSGS"/>
  20. <result property="bz" column="BZ"/>
  21. <result property="czry" column="CZRY"/>
  22. <result property="czsj" column="CZSJ"/>
  23. </resultMap>
  24. <sql id="querySql">
  25. select * from(SELECT a.*,
  26. b.name as znjname
  27. FROM BM_YSLX a
  28. left join bm_znjsq b on a.znjbm=b.code
  29. )
  30. WHERE 1=1
  31. <!--模糊查询 -->
  32. <if test="filter.searchText!=null">
  33. AND (code like '%${filter.searchText}%'
  34. OR name like '%${filter.searchText}%')
  35. </if>
  36. <!--所属公司-->
  37. <if test="filter.ssgs!=null">
  38. AND ssgs=#{filter.ssgs}
  39. </if>
  40. <if test="filter.isdisabled!=null">
  41. AND isdisabled=#{filter.isdisabled}
  42. </if>
  43. </sql>
  44. <select id="getPage" resultType="com.tofly.feesapi.bmgl.entity.vo.BmYslxSelect">
  45. <include refid="querySql"></include>
  46. </select>
  47. </mapper>