2月 252020
 

mapper xml文件中:

<resultMap id="XxxResultMap" type="com.xxx.xxxx">
    <id column="id" property="id" jdbcType="INTEGER" />
    ...
</resultMap>

<select id="selectXXXX" resultMap="XxxResultMap">
    SELECT id, title, type, release_id , ...
    FROM test
    WHERE release_id = ${id} and type = ${type}
</select>  

mapper接口中:

xxx selectXXXX(@Param(value = "id") String id,@Param(value = "type") String type);

参考资料


 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)