/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workapprovalcopy.service;

import com.jeeplus.common.persistence.Page;
import com.jeeplus.common.service.CrudService;
import com.jeeplus.modules.workapprovalcopy.dao.ApprovalCopyDao;
import com.jeeplus.modules.workapprovalcopy.entity.ApprovalCopy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 抄送信息Service
 * @author yangfan
 * @version 2017-07-21
 */
@Service
@Transactional(readOnly = true)
public class ApprovalCopyService extends CrudService<ApprovalCopyDao, ApprovalCopy> {
	@Autowired
	private ApprovalCopyDao approvalCopyDao;

	public ApprovalCopy get(String id) {
		return super.get(id);
	}

	public ApprovalCopy getByApprovalId(String approvalId){return approvalCopyDao.getByApprovalId(approvalId);}
	
	public List<ApprovalCopy> findList(ApprovalCopy approvalCopy) {
		return super.findList(approvalCopy);
	}

    public Page<ApprovalCopy> find(Page<ApprovalCopy> page, ApprovalCopy approvalCopy) {
        approvalCopy.setPage(page);
        page.setList(dao.findList(approvalCopy));
        return page;
    }

	public Page<ApprovalCopy> findPage(Page<ApprovalCopy> page, ApprovalCopy approvalCopy) {
		return super.findPage(page, approvalCopy);
	}
	
	@Transactional(readOnly = false)
	public void save(ApprovalCopy approvalCopy) {
		super.save(approvalCopy);
	}
	
	@Transactional(readOnly = false)
	public void delete(ApprovalCopy approvalCopy) {
		super.delete(approvalCopy);
	}
	@Transactional(readOnly = false)
	public void deletes(ApprovalCopy approvalCopy) {
		dao.deletes(approvalCopy);
	}

	
	
	
}