Mapper
TestDome info(@Param("code") String code, @Param("id") Long id,@Param("languageIndex") String languageIndex);
主表 select
<select id="info" resultMap="TestDomeResult">
select h.*,
#{languageIndex} as languageIndex //加上这句就行
from test_Db h
</select>
Collection
<collection property="tesstDmoeDetailList"
javaType="ArrayList"
ofType="tesstDmoeDetail"
select="infoDetails"
column="{id=id,languageIndex=languageIndex}"></collection>
然后从表的查询就可以使用了
<select id="infoDetails" resultMap="PurchaseOrderDetailResult">
select
d.id as D_Id,
d.name${languageIndex} as name // 使用 ${languageIndex}
from testDetail_DB d
</select>