package com.zcloud.service.bus.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.OutsidersDetailsMapper;
import com.zcloud.service.bus.OutsidersDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 说明：外来人员管理
 * 作者：yangming
 * 时间：2022-04-09
 * 官网：www.zcloudchina.com
 */
@Service
@Transactional //开启事物
public class OutsidersDetailsServiceImpl implements OutsidersDetailsService {

	@Autowired
	private OutsidersDetailsMapper outsidersDetailsMapper;

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

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

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

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

	@Override
	public List<PageData> getOutsidersById(PageData pd) {
		return outsidersDetailsMapper.getOutsidersById(pd);
	}


}

