<insert id="insSample" parameterType="cn.com.git.cbs.datamodel.TBL_Sample" >
<bind name="tableName" value="'SAMPLE'+_parameter.getSamplechar().hashCode()%4"/>
insert into ${tableName} (SAMPLECHAR, SAMPLEVARCHAR, SAMPLEVARCHAR2, SAMPLEINT,
需求是数据过多的话,按照hash值 %4的余插入不同的表,提前建好了表0、1、2、3
关键就是
<bind name="tableName" value="'SAMPLE'+_parameter.getSamplechar().hashCode()%4"/>
和 <pre name="code" class="html"> ${tableName}