<?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.tofly.feesapi.bmgl.mapper.BmCbplMapper">

    <resultMap id="bmCbplMap" type="com.tofly.feesapi.bmgl.entity.BmCbpl">
    <id property="code" column="CODE"/>
    <result property="name" column="NAME"/>
    <result property="cbyf" column="CBYF"/>
    <result property="cbrq" column="CBRQ"/>
    <result property="bz" column="BZ"/>
    <result property="isdisabled" column="ISDISABLED"/>
    <result property="czry" column="CZRY"/>
    </resultMap>

    <select id="getMaxid" resultType="java.lang.String">
        select max(code) + 1
        from bm_cbpl
    </select>

    <select id="getPage" resultType="com.tofly.feesapi.bmgl.entity.BmCbpl">
      select * from bm_cbpl a
          where 1=1
        <if test="filter.searchText!=null">
            AND (a.code like '%${filter.searchText}%'  or a.name like '%${filter.searchText}%' or a.cbyf like '%${filter.searchText}%' or a.bz like '%${filter.searchText}%'  )
        </if>
    </select>


</mapper>
