| | |
| | | group by
|
| | | h.mac,DATE_FORMAT(time,'%Y-%m-%dT%H:%i')
|
| | | </select>
|
| | |
|
| | | <select id="selectByMacAndTime" resultType="com.moral.entity.History">
|
| | | SELECT *
|
| | | from history
|
| | | WHERE time = #{time} and mac in
|
| | | <foreach collection="macList" index="index" item="mac" open="(" separator="," close=")">
|
| | | #{mac}
|
| | | </foreach>
|
| | | </select>
|
| | |
|
| | | <insert id="insertHistorySpecialTable">
|
| | | insert into
|
| | | history_special(mac, value, time,version)
|
| | | SELECT * from history WHERE time = #{time} and mac in
|
| | | <foreach collection="macList" index="index" item="mac" open="(" separator="," close=")">
|
| | | #{mac}
|
| | | </foreach>
|
| | | </insert>
|
| | |
|
| | | </mapper> |