<?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.unis.basic.info.modular.pricemonitor.mapper.PriceMonitorMapper">
    <select id="selectPriceMonitor" resultType="com.unis.basic.info.modular.pricemonitor.vo.PriceMonitorVO">
        select t1.name name, t1.address, t2.name cityAddress,t1.geo_point
        from biz_price_monitor t1
        left join sys_org t2 on t1.sys_org_id = t2.id

        <where>
            <if test="name!=null and name!=''">
                and t1.name like concat("%",#{name},"%")
            </if>
            <if test="cityAddress !=null and cityAddress!=''">
                and t2.name=#{cityAddress}
            </if>
        </where>

        order by t1.create_time desc

    </select>

</mapper>