Commit 8a4ad818 by zhangchen

发票提交

parent c157fc53
......@@ -4,7 +4,9 @@ import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.criterion.Restrictions;
import org.springframework.util.CollectionUtils;
import com.ctrip.fun.common.vo.basic.InvoiceOrderInfoBean;
import com.ctrip.fun.golf.dao.GenericHibernateDao;
import com.ctrip.fun.golf.domain.basic.InvoiceOrderInfo;
......@@ -25,6 +27,22 @@ public class InvoiceOrderInfoDao extends GenericHibernateDao<InvoiceOrderInfo, I
List<InvoiceOrderInfo> result = criteria.list();
return result;
}
/**
* 根据订单号或者支付凭证号验证是否存在
* @param orderNo
* @return
*/
public InvoiceOrderInfo findByOrderNoOrNum(String orderNo){
Criteria criteria = this.getCriteria(InvoiceOrderInfo.class);
criteria.add(Restrictions.eq("orderNo", orderNo));
List<InvoiceOrderInfo> result = criteria.list();
if (!CollectionUtils.isEmpty(result)) {
return result.get(0);
} else {
return null;
}
//return result;
}
public int deleteByRequestId(Integer rquestId){
Query query = this.getSession().createQuery("delete InvoiceOrderInfo where requestId=:requestId");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment