/** * 根据orderid删除发送失败后存储到表or_order_sms和or_orderextinfo中的记录 * * @param orderid */ public void delOrderSMS(long orderid) { String sql1 = "delete from or_order_sms m where m.orderid=" + orderid; String sql2 = "delete from or_orderextinfo f where f.orderid=" + orderid + " and f.type='03' "; log.info("清空or_order_sms对应的数据,orderid=" + orderid); super.getSession().createSQLQuery(sql1).executeUpdate(); log.info("清空or_orderextinfo对应的数据,orderid=" + orderid); super.getSession().createSQLQuery(sql2).executeUpdate(); }
public List queryAuditItemByAuditIds(final Long[] auditIds) { List params = new ArrayList(); StringBuffer hql = new StringBuffer().append("from AuditItem a where 1=1 "); super.compositeHSql(hql, auditIds, "a.audit.ID", params); hql.append(" order by a.roomIndex, a.fellowDate"); String hSql = hql.toString(); return super.getHibernateTemplate().find(hSql, params.toArray()); }
/** 插入表extinfo随机码 */ public void addCheckcodeToExtInfoBySql(String checkcode, long orderid) { String sql = "insert into or_orderextinfo(id,orderid,type,context) values(seq_order_extinfo.nextval," + orderid + ",'03','" + checkcode + "') "; super.getSession().createSQLQuery(sql).executeUpdate(); }
/** * 批量save/update orSMSRecv * * @param orSMSRecv */ public void batchUpdate(List<OrSMSRecv> lst) { super.getHibernateTemplate().saveOrUpdateAll(lst); }
/** * 更新 OrSMSRecv * * @param orSMSRecv */ public void update(OrSMSRecv orSMSRecv) { super.getHibernateTemplate().update(orSMSRecv); };
public void updateObject(Object obj) { super.saveOrUpdate(obj); }
public void insertObject(Object obj) { super.save(obj); }
/** * 批量删除 * * @param hotelId */ public void batchRemove(Long[] hotelId) { super.remove("delete OrPaperContact c where c.ID in(?)", hotelId); }