MyBatis动态创建表报错解决

转载
dao

  int insert(@Param("tableName")String tableName,@Param("trackpoint")Trackpoint trackpoint);

mapper

 <insert id="insert" parameterType="xx.xxx.xx.po.Trackpoint">
        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})
    </insert>

如果后面是对象,一定要trackpoint.xxx

posted @ 2019-05-28 17:29  smileLS66  阅读(138)  评论(0编辑  收藏  举报