<?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.whyc.mapper.LockBlMapper">
|
|
<select id="getLockBl" resultType="com.whyc.pojo.db_area.LockBl">
|
select tb_lock_bl.*,
|
tb_lock_inf.lock_name,
|
tb_area_inf.area_name,
|
tb_area_inf.area_path
|
from db_area.tb_lock_inf,db_area.tb_lock_bl,db_area.tb_area_inf
|
<where>
|
tb_lock_inf.area_id=tb_area_inf.id
|
and tb_lock_inf.lock_id=tb_lock_bl.lock_id
|
<if test="lockName!=null">
|
and tb_lock_inf.lock_name LIKE CONCAT('%',#{lockName},'%')
|
</if>
|
<if test="type!=null">
|
and tb_lock_bl.type=#{type}
|
</if>
|
<if test="areaList!=null">
|
and area_id in
|
<foreach collection="areaList" item="id" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</if>
|
</where>
|
order by tb_lock_bl.start_time desc
|
</select>
|
</mapper>
|