<?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="io.renren.modules.app.dao.HKmlbDao">

    <!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="io.renren.modules.app.entity.HKmlbEntity" id="hKmlbMap">
                    <result property="kmlbbm" column="kmlbbm"/>
                    <result property="kmlbmc" column="kmlbmc"/>
                    <result property="pydm" column="pydm"/>
                    <result property="ztbm" column="ztbm"/>
            </resultMap>

    <select id="queryByPage" parameterType="io.renren.modules.app.entity.HKmlbEntity"
            resultType="io.renren.modules.app.entity.HKmlbEntity">

        select * from h_kmlb where 1=1

                    <if test=" kmlbbm!=null and kmlbbm!='' ">
                and kmlbbm like CONCAT(#{kmlbbm},"%")
            </if>
                    <if test=" kmlbmc!=null and kmlbmc!='' ">
                and kmlbmc like CONCAT(#{kmlbmc},"%")
            </if>
                    <if test=" pydm!=null and pydm!='' ">
                and pydm like CONCAT(#{pydm},"%")
            </if>
                    <if test=" ztbm!=null and ztbm!='' ">
                and ztbm like CONCAT(#{ztbm},"%")
            </if>
        
    </select>


</mapper>