⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dealserviceimpl.java

📁 q企业web应用 q企业web应用 q企业web应用
💻 JAVA
字号:
package com.meybosoft.microerp.business.impl;

import java.util.Collection;
import com.easyjf.util.Assert;
import com.easyjf.web.tools.DbPageList;
import com.easyjf.web.tools.IPageList;
import com.meybosoft.microerp.business.DealService;
import com.meybosoft.microerp.business.LogicException;
import com.meybosoft.microerp.domain.Deal;

public class DealServiceImpl extends AbstractDAOServiceSupport implements
		DealService {
	public boolean addDeal(Deal deal) {
		Assert.notNull(deal);
		if(deal.getCustomer()==null)throw new LogicException("客户不能为空!");		
		return this.dao.save(deal);
	}

	public boolean delDeal(Deal deal) {
		Assert.notNull(deal);
		return this.dao.del(deal);
	}

	public Deal getDeal(Long id) {
		Assert.notNull(id);
		return (Deal)this.dao.get(Deal.class, id);
	}

	public IPageList queryDeal(String scope, Collection paras, int currentPage, int pageSize) {
		DbPageList pageList=new DbPageList(Deal.class,scope,paras,dao);
		pageList.doList(currentPage, pageSize);	
		return pageList;
	}

	public boolean updateDeal(Deal deal) {
		Assert.notNull(deal);
		Assert.notNull(deal.getId());
		return this.dao.update(deal);
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -