在写这篇文章的时候我遇见了一个问题,我要动态的加载sql语句的表名,所以我采用了mybatis的非预编译方法。
案例如下:
<select id="gettrackbyid" parameterType="java.util.HashMap" statementType="STATEMENT" resultMap="selectstrack"> select client_id, c_longitude, c_latitude, bd_longitude, bd_latitude, locationinfo, point_type, clientdate from ${fenbiaoname} where client_id=${clientid} and clientdate like ${date} </select>