CREATE STABLE IF NOT EXISTS device_log ( ts TIMESTAMP, id NCHAR(50), message_id NCHAR(50), type NCHAR(50), identifier NCHAR(255), content NCHAR(1024), code INT, report_time TIMESTAMP, tenant_id BIGINT ) TAGS ( product_key NCHAR(50), device_name NCHAR(50) ) INSERT INTO device_log_${productKey}_${deviceName} ( ts, id, message_id, type, identifier, content, code, report_time, tenant_id ) USING device_log TAGS ('${productKey}', '${deviceName}') VALUES ( NOW, #{id}, #{messageId}, #{type}, #{identifier}, #{content}, #{code}, #{reportTime}, #{tenantId} )