<?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.neusoft.mapper.BusinessMapper">
    <select id="listBusinessByKeyword" resultType="Business">
        select * from business
        <where>
            <foreach item="keyword" collection="list" separator="and">
                (businessName like concat('%', #{keyword}, '%') or businessAddress like concat('%', #{keyword}, '%') or
                businessExplain like concat('%', #{keyword}, '%'))
            </foreach>
        </where>
    </select>
</mapper>