【发布时间】:2015-12-01 06:56:22
【问题描述】:
以前,我用过
<select id="queryUser" parameterType="userInfo">
select * from uc_login_${tableSuffix}
</select>
userInfo:{
private String tableSuffix;
}
我使用 tableSuffix 创建 userInfo,例如
new DateTime().getYear() + "_" + new DateTime().getMonthOfYear();
现在我从 uc_login_nowYear_nowMonth(uc_login_2015_12) 中选择。 现在,我不想自己创建tabkeSuffix,我希望Mybatis帮我在xml中动态创建sql。 我该怎么做?
【问题讨论】: