6 changed files with 71 additions and 2 deletions
@ -0,0 +1,23 @@ |
|||||
|
<?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="org.dromara.sample.wayline.mapper.IWaylineFileMapper"> |
||||
|
|
||||
|
|
||||
|
<select id="getPage" |
||||
|
resultType="org.dromara.sample.wayline.model.entity.WaylineFileEntity"> |
||||
|
SELECT |
||||
|
wf.* ,GROUP_CONCAT(md.device_name SEPARATOR ',') AS deviceName |
||||
|
FROM |
||||
|
wayline_file wf |
||||
|
LEFT JOIN wayline_device wd ON wd.wayline_id = wf.wayline_id |
||||
|
LEFT JOIN manage_device md ON md.device_sn = wd.device_sn |
||||
|
where 1=1 |
||||
|
<if test="param.deviceSn != null and param.deviceSn != ''"> |
||||
|
AND wd.device_sn = #{param.deviceSn} |
||||
|
</if> |
||||
|
GROUP BY wf.wayline_id |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue