package com.zcloud.service.system.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.corp.CorpScoreMapper;
import com.zcloud.service.system.CorpScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 说明：监管端绩效考核
 * 作者：luoxiaobao
 * 时间：2022-05-27
 * 官网：www.zcloudchina.com
 */
@Service
@Transactional //开启事物
public class CorpScoreServiceImpl implements CorpScoreService {

	@Autowired
	private CorpScoreMapper corpScoreMapper;

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

	/**批量新增
	 * @param list
	 * @throws Exception
	 */
	public void saveBatch(List<PageData> list)throws Exception{
		corpScoreMapper.saveBatch(list);
	}

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

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

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

	/**列表(全部)
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> listAll(PageData pd)throws Exception{
		return corpScoreMapper.listAll(pd);
	}

	/**通过id获取数据
	 * @param pd
	 * @throws Exception
	 */
	public PageData findById(PageData pd)throws Exception{
		return corpScoreMapper.findById(pd);
	}

	/**
	 * 批量删除
	 *
	 * @param pd@throws Exception
	 */
	public void deleteAll(PageData pd)throws Exception{
		corpScoreMapper.deleteAll(pd);
	}

}

