Freemaker:操作集合


<#if (id?index_of('Base') >= 0)>
    <choose>
        <when test="rootOrgID !=null and rootOrgID != ''">
            rootOrgID = ${"#{"+'rootOrgID'+"}"}
        </when>
        <otherwise>
            branchOrgID = ${"#{"+'rootOrgID'+"}"}
        </otherwise>
    </choose>
 <#else>
    <choose>
        <when test="schoolID !=null and schoolID != ''">
            schoolID = ${"#{"+'schoolID'+"}"}
        </when>
        <otherwise>
            branchSchoolID = ${"#{"+'branchSchoolID'+"}"}
         </otherwise>
     </choose>                
 </#if>

原文地址:https://www.cnblogs.com/huiy/p/9320693.html