动态SQL的配置

<sqlMap namespace="Customer">

  <typeAlias alias ="CustomerObject" type="com.hoyasv.crm.report.entity.customer.Customer"/>

  <statement id="getCustomers"  resultClass="CustomerObject" parameterClass="java.util.Map" remapResults="true">
>
       <![CDATA[$query_sql$]]>
  </statement>

  <statement id="getCustomersCount" resultClass="java.lang.Integer" parameterClass="java.util.Map" remapResults="true">
       <![CDATA[$countquery_sql$]]>
  </statement>

</sqlMap>

动态的SQL如何列不固定,不能用ResultMap 只能用ResultClass

你可能感兴趣的:(sql)