public int insertFlight(FlightEntity flightEntity){
int result=flightMapper.insertFlight(flightEntity);
return result;
}
修改为
public SqlSession sqlSession;
public int insertFlight(FlightEntity flightEntity){
int result=flightMapper.insertFlight(flightEntity);
sqlSession.commit();//需要提交事务
return result;
}