yangys
2024-04-04 2cf2921440e7473ae50796c2cb688f609b3a7995
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?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>