mybaits的占位符的嵌套
程序员文章站
2022-05-18 21:37:35
...
mybaits的占位符的嵌套
<insert id="saveDataMapCHG" parameterType="map" >
INSERT INTO TB_CUS_FIRM_AFFIX_CHG
<foreach collection="param.keys" item="k" open="(" close=")" separator=",">
${k}
</foreach>
VALUES
<foreach collection="param.keys" item="k" open="(" close=")" separator=",">
<if test="null != param[k]">
#{param[${k}]}
</if>
</foreach>
</insert>