| | |
| | | "ip," + |
| | | "port," + |
| | | "hostAddress," + |
| | | "expires," + |
| | | "registerTime," + |
| | | "keepaliveTime," + |
| | | "online" + |
| | | ") VALUES (" + |
| | | "#{deviceId}," + |
| | |
| | | "#{ip}," + |
| | | "#{port}," + |
| | | "#{hostAddress}," + |
| | | "#{expires}," + |
| | | "#{registerTime}," + |
| | | "#{keepaliveTime}," + |
| | | "#{online}" + |
| | | ")") |
| | | int add(Device device); |
| | |
| | | "<if test=\"port != null\">, port=${port}</if>" + |
| | | "<if test=\"hostAddress != null\">, hostAddress='${hostAddress}'</if>" + |
| | | "<if test=\"online != null\">, online=${online}</if>" + |
| | | "<if test=\"registerTime != null\">, registerTime='${registerTime}'</if>" + |
| | | "<if test=\"keepaliveTime != null\">, keepaliveTime='${keepaliveTime}'</if>" + |
| | | "<if test=\"expires != null\">, expires=${expires}</if>" + |
| | | "WHERE deviceId='${deviceId}'"+ |
| | | " </script>"}) |
| | | int update(Device device); |
| | |
| | | |
| | | @Delete("DELETE FROM device WHERE deviceId=#{deviceId}") |
| | | int del(String deviceId); |
| | | |
| | | @Update("UPDATE device SET online=0") |
| | | int outlineForAll(); |
| | | } |