/p>
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
select count(*)
from information_schema.TABLES
where LCASE(table_name)=#{tableName}
DROP TABLE IF EXISTS ${tableName}
CREATE TABLE ${tableName} (
id bigint(20) NOT NULL AUTO_INCREMENT,
entityId bigint(20) NOT NULL,
dx double NOT NULL,
dy double NOT NULL,
dz double NOT NULL,
ntype varchar(32) NOT NULL,
gnssTime bigint(20) NOT NULL,
speed float DEFAULT NULL,
direction float DEFAULT NULL,
attributes varchar(255) DEFAULT NULL,
PRIMARY KEY (id))
insert into ${tableName}
(entityId,dx,dy,dz,ntype,gnssTime,speed,direction,attributes)
values
(#{trackpoint.entityid},
#{trackpoint.dx},
#{trackpoint.dy},
#{trackpoint.dz},
#{trackpoint.ntype},
#{trackpoint.gnsstime},
#{trackpoint.speed},
#{trackpoint.direction},
#{trackpoint.attributes})