关于mybatis传多个参

1、使用对象传参

①使用param

   

   

②使用常规paramType

   

   

   

2、使用List传参

   

   

3、Map封装多参数:

public List<XXXBean> getXXXBeanList(HashMap map);

<select id="getXXXBeanList" parameterType="hashmap" resultType="XXBean">

select 字段... from table_name where id=#{xxId} code = #{xxCode}

</select>

posted @ 2020-10-19 01:02  黑质白章  阅读(68)  评论(0编辑  收藏  举报