public
void
updateByPersonOid(List
<
String
>
personOidList)
throws
DataAccessException
...
{
StringBuffer hql = new StringBuffer();
// hql.append("update Info w set w.Birthday=:Birthday where w.personOid=:personOid");
hql.append("update Info w set w.FeeUsage=:FeeUsage where w.personOid in (:personOidList)");
Query query = getSession().createQuery(hql.toString());
query.setString("FeeUsage", ENJOY);
//数据库中的personOid为number
query.setParameterList("personOidList", personOidList,new StringType());
query.executeUpdate();
}
StringBuffer hql = new StringBuffer();
// hql.append("update Info w set w.Birthday=:Birthday where w.personOid=:personOid");
hql.append("update Info w set w.FeeUsage=:FeeUsage where w.personOid in (:personOidList)");
Query query = getSession().createQuery(hql.toString());
query.setString("FeeUsage", ENJOY);
//数据库中的personOid为number
query.setParameterList("personOidList", personOidList,new StringType());
query.executeUpdate();
}