package com.zcloud.service.corp.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.corp.CorpStopMapper;
import com.zcloud.service.corp.CorpStopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 说明：十小停用管理
 * 作者：yangming
 * 时间：2023-2-13
 * 官网：www.zcloudchina.com
 */
@Service
@Transactional //开启事物
public class CorpStopServiceImpl implements CorpStopService {

	@Autowired
	private CorpStopMapper corpStopMapper;

	/**新增
	 * @param pd
	 * @throws Exception
	 */
	public void save(PageData pd)throws Exception{
		corpStopMapper.save(pd);
	}

	/**删除
	 * @param pd
	 * @throws Exception
	 */
	public void delete(PageData pd)throws Exception{
		corpStopMapper.delete(pd);
	}

	/**修改
	 * @param pd
	 * @throws Exception
	 */
	public void edit(PageData pd)throws Exception{
		corpStopMapper.edit(pd);
	}

	@Override
	public PageData isHandle(PageData pd) throws Exception {
		return corpStopMapper.isHandle(pd);
	}

	/**列表
	 * @param page
	 * @throws Exception
	 */
	public List<PageData> list(Page page)throws Exception{
		return corpStopMapper.datalistPage(page);
	}

	/**详情
	 * @param pd
	 * @throws Exception
	 */
	public PageData findById(PageData pd)throws Exception{
		return corpStopMapper.findById(pd);
	}

}

