mybatis:map参数

154 阅读1分钟
姿势1

<update id="updateByMap" parameterType="Map">
update test  
set createdate = #{createdate},
creator = #{creator}
where id in 
<foreach collection="ids" item="ids" separator="," open="(" close=")">
#{ids}
</foreach>
</update>

姿势2

List<Entity> find(@Param("params") Map<String, Object> map);