<select id="query" parameterType="cn.enn.electric.entity.UserCusVO" resultMap="BaseResultMap">
select u.id broker_id ,u.name brokerName,u.mobile brokerPhone,
c.name cusName,c.province province,c.city city,c.area area,c.unit unit,c.id cid
from user_broker u,
(select *
from user_customer
<where>
<if test="customerSearch!=null and customerSearch!=''">
name like concat('%',#{customerSearch},'%')
</if>
<if test="provinceCustomer!=null and provinceCustomer!=''">
and province = #{provinceCustomer}
</if>
<if test="cityCustomer!=null and cityCustomer.size()>0">
and city in
<foreach item="item1" index="index" collec
Mybatis的like、foreach遍历、时间范围
最新推荐文章于 2024-03-22 09:57:15 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)