<?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.GzdxxDao">

    <!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="io.renren.modules.app.entity.GzdxxEntity" id="gzdxxMap">
                    <result property="id" column="id"/>
                    <result property="gzdbm" column="gzdbm"/>
                    <result property="gzdmc" column="gzdmc"/>
                    <result property="lxr" column="lxr"/>
                    <result property="lxdh" column="lxdh"/>
                    <result property="dz" column="dz"/>
                    <result property="kfyh" column="kfyh"/>
                    <result property="yhzh" column="yhzh"/>
                    <result property="ztbm" column="ztbm"/>
            </resultMap>

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

        select * from gzdxx where 1=1

                    <if test=" id!=null and id!='' ">
                and id like CONCAT(#{id},"%")
            </if>
                    <if test=" gzdbm!=null and gzdbm!='' ">
                and gzdbm like CONCAT(#{gzdbm},"%")
            </if>
                    <if test=" gzdmc!=null and gzdmc!='' ">
                and gzdmc like CONCAT(#{gzdmc},"%")
            </if>
                    <if test=" lxr!=null and lxr!='' ">
                and lxr like CONCAT(#{lxr},"%")
            </if>
                    <if test=" lxdh!=null and lxdh!='' ">
                and lxdh like CONCAT(#{lxdh},"%")
            </if>
                    <if test=" dz!=null and dz!='' ">
                and dz like CONCAT(#{dz},"%")
            </if>
                    <if test=" kfyh!=null and kfyh!='' ">
                and kfyh like CONCAT(#{kfyh},"%")
            </if>
                    <if test=" yhzh!=null and yhzh!='' ">
                and yhzh like CONCAT(#{yhzh},"%")
            </if>
                    <if test=" ztbm!=null and ztbm!='' ">
                and ztbm like CONCAT(#{ztbm},"%")
            </if>
        
    </select>


</mapper>