1 public void deleteByHbtlidAndDept(String class_id,String depart_id) {
2         Session session =  this.getHibernateTemplate().getSessionFactory().openSession();
3         Transaction tran = session.beginTransaction(); 
4         String sql = " delete DC_EQP_DPT_DEF m  where m.class_id = '"+class_id+"' and m.depart_id = '"+depart_id+"' ";
5         session.createSQLQuery(sql).executeUpdate();
6         tran.commit(); 
7     }
1 public NaviInfo saveNaviInfo(NaviInfo naviInfo) {
2         Session session =  hibernateTemplate.getSessionFactory().openSession();
3         Transaction tran = session.beginTransaction(); 
4         NaviInfo backEntity =(NaviInfo)session.merge(naviInfo);
5         tran.commit(); 
6         return backEntity;
7     }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2021-11-14
  • 2021-11-12
  • 2021-08-07
  • 2022-12-23
  • 2021-08-28
猜你喜欢
  • 2021-07-29
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
  • 2021-07-04
相关资源
相似解决方案