public int deleteById(Integer ad_id) {
log.debug("deleting WedAdmin instance");
try {
String hql = "delete from WedAdmin where ad_id = :id"; //hql语句
int deleteNum = getSession().createQuery(hql).setInteger("id", ad_id).executeUpdate();
return deleteNum;
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}