<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.qianwen.smartman.modules.dmpLog.mapper.DmpLogSignalMethodTimeMapper">
|
<insert id="save" parameterType="com.qianwen.smartman.modules.dmpLog.entity.SignalMethodTimeLog">
|
insert into iot_data.dmp_log_method_time_${MachineCode}_${collectMonth}
|
USING iot_data.super_dmp_log_method_time
|
TAGS(${MachineCode},${collectMonth}) (ts,trace_id,type, method_name, method_description, spend_time_seconds)
|
values (#{TimeStamp}, #{TraceId}, #{type}, #{MethodName}, #{MethodDescription}, #{SpendTimeSeconds})
|
</insert>
|
|
<!--创建子表-->
|
<update id="createTable">
|
|
create table if not exists iot_data.dmp_log_method_time_${machineCode}_${collectMonth} using iot_data.super_dmp_log_method_time TAGS
|
(
|
${machineCode},${collectMonth}
|
)
|
</update>
|
</mapper>
|