INSERT INTO xhpc_img(url, terminal_id) VALUES (#{imgUrl}, #{terminalId}) UPDATE xhpc_img SET del_flag = 2 WHERE terminal_id = #{terminalId}