public int updateAirIdByID(String passengerName, String airId,String NL_OrderId) {
String hql = "update nl_passengerinformation pi set pi.NL_AIRID=:airId where pi.NL_NAME_ENFIRST=:name_ENFirst and pi.NL_NAME_ENSECOND=:name_ENSecond and pi.NL_ORDERID=:NL_OrderId";
Query query = this.getSession().createSQLQuery(hql).addEntity("pi", PassengerInformation.class);
String names[]=passengerName.split("/");//拆分英文名
if(names.length<2){
return 0;//
}
query.setParameter("airId", airId);
query.setParameter("name_ENFirst", names[0]);
query.setParameter("name_ENSecond", names[1]);
query.setParameter("NL_OrderId", NL_OrderId);
return query.executeUpdate();
}