mybatis Mapper的入参当有多个时,一定不要忘记显式声明参数名。比如:
public interface EntityMapper extends BaseMapper<Entity> {
public List<Entity> getEntityByNameAndPhone(@Param("name") String name, @Param("phone") String phone); // 一定要把@Param加上,并且声明名字,否则sql中只能通过arg1,arg2这样去取
}