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

    <!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="io.renren.modules.app.entity.RyEntity" id="ryMap">
                    <result property="rybm" column="rybm"/>
                    <result property="rymc" column="rymc"/>
                    <result property="mm" column="mm"/>
                    <result property="qx" column="qx"/>
                    <result property="sfty" column="sfty"/>
                    <result property="gzdbm" column="gzdbm"/>
                    <result property="newlogin" column="newlogin"/>
                    <result property="logintimes" column="logintimes"/>
                    <result property="sys" column="sys"/>
            </resultMap>

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

        select * from ry where 1=1

                    <if test=" rybm!=null and rybm!='' ">
                and rybm like CONCAT(#{rybm},"%")
            </if>
                    <if test=" rymc!=null and rymc!='' ">
                and rymc like CONCAT(#{rymc},"%")
            </if>
                    <if test=" mm!=null and mm!='' ">
                and mm like CONCAT(#{mm},"%")
            </if>
                    <if test=" qx!=null and qx!='' ">
                and qx like CONCAT(#{qx},"%")
            </if>
                    <if test=" sfty!=null and sfty!='' ">
                and sfty like CONCAT(#{sfty},"%")
            </if>
                    <if test=" gzdbm!=null and gzdbm!='' ">
                and gzdbm like CONCAT(#{gzdbm},"%")
            </if>
                    <if test=" newlogin!=null and newlogin!='' ">
                and newlogin like CONCAT(#{newlogin},"%")
            </if>
                    <if test=" logintimes!=null and logintimes!='' ">
                and logintimes like CONCAT(#{logintimes},"%")
            </if>
                    <if test=" sys!=null and sys!='' ">
                and sys like CONCAT(#{sys},"%")
            </if>
        
    </select>


</mapper>