<select id="xmlGetGuaranteeCount" databaseId="sqlserver" resultType="Integer" flushCache="true"> <![CDATA[ SELECT count(appisparea.ID) FROM T_APP_ISP_AREA AS appisparea WHERE 1=1 ]]> <if test="ispDataId != null and ispDataId != '' " > <![CDATA[ AND FK_ISP_DATAID = #{ispDataId} ]]> </if> <if test="beiAnDiQuCode != null and beiAnDiQuCode=='000000' " > <![CDATA[ AND BEIANDIQU_CODE NOT LIKE 'x%' ]]> </if> <if test="beiAnDiQuCode != null and beiAnDiQuCode.toLowerCase().startsWith('x') " > <![CDATA[ AND BEIANDIQU_CODE = #{beiAnDiQuCode} ]]> </if> </select>
标签:缓存,映射,flushCache,MyBatis,true,select From: https://www.cnblogs.com/privateLogs/p/18124005