Mybatis Generator 生成的mapper只有insert方法
检查一下是不是表没有设置主键!!!
表没有设置primary key 的话生成的TestMapper 里就会只有 insert 、insertSelective 这两个方法。
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。public interface TestMapper { int deleteByPrimaryKey(Long id);//表没有设置主键就会生不出这个方法 int insert(a record); int insertSelective(a record); a selectByPrimaryKey(Long id);//表没有设置主键就会生不出这个方法 int updateByPrimaryKeySelective(a record);//表没有设置主键就会生不出这个方法 int updateByPrimaryKey(a record);//表没有设置主键就会生不出这个方法 }

更多精彩