You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
1.1 KiB
25 lines
1.1 KiB
<?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.ccsens.health.persist.dao.SiteDao">
|
|
|
|
|
|
<select id="queryAll" resultType="com.ccsens.health.bean.vo.ClockVo$SiteList">
|
|
select t.id, t.site_name as siteName, t.site_code as siteCode, t.longitude, t.latitude, t1.qrcode_path as inUrl, t2.qrcode_path as outUrl
|
|
from
|
|
(select * from t_site
|
|
where rec_status = 0
|
|
<if test="parentCode != null and parentCode != ''">
|
|
and parent_code = #{parentCode, jdbcType=VARCHAR}
|
|
</if>
|
|
<if test="siteName != null and siteName != ''">
|
|
and site_name like concat('%',#{siteName, jdbcType=VARCHAR},'%')
|
|
</if>
|
|
) t
|
|
left join
|
|
(select * from t_site_qrcode where out_or_in = 0 ) t1
|
|
on t.id = t1.site_id
|
|
left join
|
|
(select * from t_site_qrcode where out_or_in = 1) t2
|
|
on t.id = t2.site_id
|
|
</select>
|
|
</mapper>
|