文档定义
<sqlMap namespace="">
<typeAlias alias="" type=""/>
<resultMap class="bgnOrgInf" id="bgnOrgInf">
<result property="orgsbjcod" column="ORGSBJCOD" javaType="java.lang.String" jdbcType="char" />
</resultMap>
<select id=“” parameterClass resultClass resultMap >
select * from Xx
<dynamic prepend="where">
<isNotEmpty prepend="and" property="orgsbjcod">
ORGSBJCOD = #orgsbjcod:char#
</isNotEmpty>
<isNotEqual prepend="and" property="orgsbjcod" compareValue="0">
DSPSQN = #dspsqn:int#
</isNotEqual>
<isNotEmpty prepend="and" property="rmk">
RMK like '%' || #rmk:char# || ' %'
</isNotEmpty>
</select>
#orgsbjcod:char# 特定的类型会自动转换
$orgsbjcod$纯粹字符串 例如 NEXLVL in('$orgsnam$') 手动添加‘’号
<![CDATA[ ]]>xml特定字符的原意展示。
权限占位符处理:LIKE '___$clstyp$____'
集合元素迭代
批量执行 List<String> list
<update id="PlantixStudioGenerated_updateAltbatquuData" parameterClass="java.util.ArrayList">
<iterate open="" close="" conjunction="">
$[]$
</iterate>
</update>
对象的属性 基本元素迭代
<select parameterClass="xxx">
<iterate property="indexList" open="(" close=")" conjunction=",">
#indexList[]# <!--对应bean中 private List<String> indexList;//头名称 -->
</iterate>
</select>
vs
Map<String, Object> params = new HashMap<String,Object>();
params.put("refeList", idList);//集合是对象,获取对象中的属性值进行处理
params.put("dte", date);
对象的 属性的 属性元素迭代
<iterate property="refeList" open="(" close=")" conjunction=",">
'$refeList[].funclf$$refeList[].sbjcod$$refeList[].datcod$$refeList[].datdte$$refeList[].apyorg$$refeList[].orgset$$refeList[].ccy$'
</iterate>