关于mybatis 级连查询 多查询条件方法
<resultMap id="SysOptionResultMap" type="com.cnnct.util.GlobalTree" ><id column="PID" property="id" jdbcType="DECIMAL" />
<result column="LADDER" property="level" jdbcType="DECIMAL" />
<result column="OPION_CODE" property="code" jdbcType="VARCHAR" />
<result column="OPION_COMMENTS" property="name" jdbcType="VARCHAR" />
<result column="PARENT_ID" property="parentId" jdbcType="DECIMAL" />
<association property="children" column="a=pid,b=ladder" select="selectByParentId"/>
</resultMap>
<select id="selectByParentId" resultMap="SysOptionResultMap">
SELECT * FROMCNNCTIC.SYS_OPTIONWHERE parent_id=#{a,jdbcType=DECIMAL} and ladder=#{b,jdbcType=DECIMAL}+1</select>
页:
[1]