<?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.sckw.address.mapper.KwBusinessAddressTypeMapper">

    <select id="selectPageList" resultType="com.sckw.address.entity.vo.res.KwBusinessPageListRes">
        select * from kw_business_address_type
        <where>
            del_flag = 0
            <if test="selectPageParam.type != null">
              and type = #{selectPageParam.type,jdbcType=INTEGER}
            </if>
            <if test="selectPageParam.name != null and selectPageParam.name != ''">
                AND `name` LIKE concat('%' , #{selectPageParam.name} , '%')
            </if>
        </where>
    </select>

    <select id="list" resultType="com.sckw.address.entity.vo.res.KwBusinessAddressTypeListRes">
        select id,name from kw_business_address_type
        <where>
            del_flag = 0
            <if test="name != null and name != ''">
                AND `name` LIKE concat('%' , #{name} , '%')
            </if>
        </where>
    </select>
</mapper>