从Ibatis迁移到MyBatis

时间:2019-05-02 16:01:58

标签: java xml mybatis ibatis

我正在将ibatis迁移到mybatis,并且我有以下代码:

    <dynamic prepend="AND SDLG.COD_N_TIPO_LIMITE_GEOGRAFICO IN">
        <isEqual property="incluirLimitesGeograficos" compareValue="true">
            <isNotEmpty property="listaLimitesGeograficos"> 
                    <iterate property="listaLimitesGeograficos" open="(" close=")" conjunction="," >                
                        <isNotNull property="listaLimitesGeograficos[].codTipoLimiteGeo">

                            #listaLimitesGeograficos[].codTipoLimiteGeo:DECIMAL#    

                        </isNotNull>
                    </iterate>
            </isNotEmpty>
        </isEqual>

我这样做,我想知道它是否正确:

        AND SDLG.COD_N_TIPO_LIMITE_GEOGRAFICO IN
        <if test="incluirLimitesGeograficos">
            <!--
    Sorry, I can`t migrate  listaLimitesGeograficos
    See console output for further details 
-->
            <if test="listaLimitesGeograficos != null and listaLimitesGeograficos.size() > 0"> 
                    <foreach collection="listaLimitesGeograficos" item="item" open="(" close=")" separator="," >                
                        <if test="item.codTipoLimiteGeo != null">

                            #{item.codTipoLimiteGeo, jdbcType=DECIMAL}

                        </if>
                    </foreach>
            </if>
        </if>

谢谢。

1 个答案:

答案 0 :(得分:0)

好的,已经知道了。   

传递给

如果我错了,请纠正我,因为这很重要,谢谢。