📄 ordersbizimpl.java
字号:
package com.t53.crm4.customer.biz.impl;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import com.t53.crm4.common.PaginationBean;
import com.t53.crm4.common.entity.Orders;
import com.t53.crm4.common.entity.OrdersLine;
import com.t53.crm4.customer.biz.IOrdersBiz;
import com.t53.crm4.customer.dao.ICustomerDao;
import com.t53.crm4.customer.dao.IOrdersDao;
public class OrdersBizImpl implements IOrdersBiz {
private IOrdersDao orderDao;
private ICustomerDao custDao;
public void setCustDao(ICustomerDao custDao) {
this.custDao = custDao;
}
@SuppressWarnings("unchecked")
public List find(String value) {
if (null != value && !"".equals(value)) {
return orderDao.find("from Orders o where o.odrId=?", Long
.valueOf(value));
}
return null;
}
public void del(Long id) {
orderDao.bulkUpdate("delete from CstActivity c where c.atvId=?", id);
}
public void modify(Orders orders) {
orderDao.saveOrUpdate(orders);
}
public void setOrderDao(IOrdersDao orderDao) {
this.orderDao = orderDao;
}
public List findByPagination(Orders t, PaginationBean bean) {
int maxNumber = orderDao.countByPagination(t);
List<Orders> order = null;
// 调用分页类的计算方法
bean.countPageCount(maxNumber);
if (maxNumber > 0) {
order = orderDao.findByPagination(t, (bean.getPageCount() - 1)
* bean.getPerCount(), bean.getPerCount());
}
return order;
}
public List findCustomer(String custNo) {
String hql = "from CstCustomer c where c.custNo=?";
return orderDao.find(hql, custNo);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -