| | |
| | | WHERE mac = #{mac} |
| | | AND `time` <![CDATA[>=]]> #{time1} |
| | | AND `time` <![CDATA[<=]]> #{time2} |
| | | AND organization_id = #{orgId} |
| | | <if test="orgId !=null and orgId != 0"> |
| | | AND organization_id = #{orgId} |
| | | </if> |
| | | <if test="orgIds != null and orgIds.size !=0"> |
| | | and organization_id in |
| | | <foreach collection="orgIds" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | order by time |
| | | </select> |
| | | |
| | |
| | | AND `time` <![CDATA[<=]]> #{time2} |
| | | </select> |
| | | |
| | | <select id="getDust" resultType="java.lang.Double"> |
| | | select JSON_EXTRACT(value,'$.dustld') |
| | | <select id="getDust" resultType="java.lang.String"> |
| | | select value ->>'$.dustld' |
| | | from `history_second_cruiser` |
| | | WHERE mac = #{mac} |
| | | AND `time` <![CDATA[>=]]> #{start} |
| | |
| | | `time` |
| | | FROM `history_second_cruiser` |
| | | WHERE mac = #{mac} |
| | | AND `time` <![CDATA[>=]]> #{time1} |
| | | AND `time` <![CDATA[<=]]> #{time2} |
| | | AND `time` <![CDATA[>=]]> #{startTime} |
| | | AND `time` <![CDATA[<=]]> #{endTime} |
| | | </select> |
| | | </mapper> |