Mybatis 多个参数的传入
Mybatis 在传入多个参数的时候,可以选择传map对象,也可以选择定义接口
?
1,传map对象:
public int updateByExampleSelective(Section record, SectionCriteria example) {SqlSession session=sessionFactory.openSession();SectionMapper sectionMapper=session.getMapper(SectionMapper.class);int result=sectionMapper.updateByExampleSelective(record, example);session.commit();session.close();return result;}
?以上两种方式都能解决传入多个对象问题。
?
?
?