Skip to content

in写法

xml
List<String> meetingTypeIds = new ArrayList<>();
if(meetingTypeIds.size() > 0){
    record.setMeetingTypeIds(meetingTypeIds);
}

<if test="meetingTypeIds != null">
   and MEETING_TYPE in
  <foreach collection="meetingTypeIds" index="index" item="id" separator="," close=")" open="(">
          #{id}
  </foreach>
</if>

特殊符号写法

js
&lt;	<	小于号
&gt;	>	大于号
&lt;=	<=	小于等于号
&gt;=	>=	大于等于号
&amp;	&
&apos;	'	单引
&quot;	"	双引

if else判断写法

xml
<choose>
	<when test="stype != null">
		and yh.zzjgid=(select jg.sjid from st_zzjg_xx jg where jg.zzjgid=#{orgId})
	</when>
	<otherwise>
		and yh.zzjgid=#{orgId}
	</otherwise>
</choose>

学习使我快乐吗?