| | |
| | | <foreach collection="macs" item="mac" index="index" open="(" close=")" separator=","> |
| | | #{mac} |
| | | </foreach> |
| | | AND `time` <![CDATA[>=]]> #{start} |
| | | AND `time` <![CDATA[<]]> #{end} |
| | | AND DATE_FORMAT(`time`,'%Y-%m-%d %H') <![CDATA[>=]]> #{start} |
| | | AND DATE_FORMAT(`time`,'%Y-%m-%d %H') <![CDATA[<]]> #{end} |
| | | ORDER BY `time` |
| | | </select> |
| | | <select id="deviceList" resultType="java.util.Map"> |
| | |
| | | i.is_delete = 0 |
| | | ) t3 |
| | | </select> |
| | | <select id="deviceMacs" resultType="java.lang.String"> |
| | | select mac from device where organization_id = #{organizationId} order by id desc |
| | | |
| | | </select> |
| | | |
| | | <select id="getDevices" resultType="com.moral.api.pojo.vo.device.AppDeviceVo"> |
| | | SELECT d.id,d.`name`,d.mac,d.special_type FROM device as d |
| | | where 1=1 |
| | | <if test="organizationId !=null"> |
| | | AND organization_id = #{organizationId} |
| | | </if> |
| | | and mac LIKE "%"#{mac}"%" or `name` like "%"#{mac}"%" AND is_delete = 0 |
| | | union |
| | | SELECT sd.id,sd.`name`,sd.mac,sd.special_type FROM special_device as sd |
| | | WHERE 1=1 |
| | | <if test="organizationId !=null"> |
| | | AND organization_id = #{organizationId} |
| | | </if> |
| | | and mac LIKE "%"#{mac}"%" AND is_delete = 0 |
| | | </select> |
| | | </mapper> |