insert into order(
createTime, orderId, gdsId, userId, gdsOrderId, hotelId,
hotelName, roomTypeId, roomTypeName, statusCode, statusName,
ratePlanId, connectorMobile, email, guestName, arriveDate,
leaveDate, arriveTimeEarly, arriveTimeLate, roomCount,
totalPrice, vouchSet, specialInfo, productType, extend
)
values(#{createTime}, #{orderId}, #{gdsId}, #{userId}, #{gdsOrderNo}, #{gdsHotelId},
#{gdsHotelName}, #{gdsRoomTypeId}, #{gdsRoomTypeName}, #{gdsStateCode}, #{gdsStateName},
#{gdsRatePlanId}, #{gdsConnectorMobile}, #{email}, #{gdsGuestNames}, #{gdsArriveDate},
#{gdsLeaveDate}, #{gdsArriveTimeEarly}, #{gdsArriveTimeLate}, #{gdsRoomCount},
#{gdsTotalPrice}, #{gdsVouchSet}, #{specialInfo}, #{productType}, #{extend}
)
一直报错You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order(
createTime, orderId, gdsId, userId, gdsOrderId, hotelId,
hotelName,' at line 1
最后发现order是关键字
解决方法,在表明加入``-Tab键上面的符号
insert into `order`
由于用的是mybatis-spring,所以修改后需要重启服务器。