Dao中的封装方法如下:
public int update(final String hql, final Object[] params){
   return super.getHibernateTemplate().bulkUpdate(hql, params);
}

 

Action 中的调用方法如下:
String hql = "update BlogSetting b set b.title=?, b.describale=? where b.id=?";
int n = blogSettingService.update(hql, new Object[]{s.getTitle(), s.getDescribale(), s.getId()});

 

相关文章:

  • 2021-10-10
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-14
  • 2022-12-23
  • 2021-10-16
  • 2022-01-02
  • 2022-12-23
  • 2021-08-14
相关资源
相似解决方案