|  |  | 
 |  |  |                 "ip," + | 
 |  |  |                 "port," + | 
 |  |  |                 "hostAddress," + | 
 |  |  |                 "expires," + | 
 |  |  |                 "registerTime," + | 
 |  |  |                 "keepaliveTime," + | 
 |  |  |                 "createTime," + | 
 |  |  |                 "updateTime," + | 
 |  |  |                 "charset," + | 
 |  |  |                 "subscribeCycleForCatalog," + | 
 |  |  |                 "online" + | 
 |  |  |             ") VALUES (" + | 
 |  |  |                 "#{deviceId}," + | 
 |  |  | 
 |  |  |                 "#{ip}," + | 
 |  |  |                 "#{port}," + | 
 |  |  |                 "#{hostAddress}," + | 
 |  |  |                 "#{expires}," + | 
 |  |  |                 "#{registerTime}," + | 
 |  |  |                 "#{keepaliveTime}," + | 
 |  |  |                 "#{createTime}," + | 
 |  |  |                 "#{updateTime}," + | 
 |  |  |                 "#{charset}," + | 
 |  |  |                 "#{subscribeCycleForCatalog}," + | 
 |  |  |                 "#{online}" + | 
 |  |  |             ")") | 
 |  |  |     int add(Device device); | 
 |  |  |  | 
 |  |  |     @Update(value = {" <script>" + | 
 |  |  |                 "UPDATE device " + | 
 |  |  |                 "SET deviceId='${deviceId}'" + | 
 |  |  |                 "SET updateTime='${updateTime}'" + | 
 |  |  |                 "<if test=\"name != null\">, name='${name}'</if>" + | 
 |  |  |                 "<if test=\"manufacturer != null\">, manufacturer='${manufacturer}'</if>" + | 
 |  |  |                 "<if test=\"model != null\">, model='${model}'</if>" + | 
 |  |  | 
 |  |  |                 "<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>" + | 
 |  |  |                 "<if test=\"charset != null\">, charset='${charset}'</if>" + | 
 |  |  |                 "<if test=\"subscribeCycleForCatalog != null\">, subscribeCycleForCatalog=${subscribeCycleForCatalog}</if>" + | 
 |  |  |                 "WHERE deviceId='${deviceId}'"+ | 
 |  |  |             " </script>"}) | 
 |  |  |     int update(Device device); |