package com.zcloud.service.commitment.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.commitment.CorpPromisePeopleMapper;
import com.zcloud.service.commitment.CorpPromisePeopleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * 说明：承诺书表
 * 作者：yangming
 * 时间：2022-12-29
 */

@Service
@Transactional //开启事物
public class CorpPromisePeopleServiceImpl implements CorpPromisePeopleService {

    @Resource
    private CorpPromisePeopleMapper corpPromisePeopleMapper;

    @Override
    public void save(PageData pd) throws Exception {
        corpPromisePeopleMapper.save(pd);
    }

    @Override
    public List<PageData> list(Page page) throws Exception {
        return corpPromisePeopleMapper.datalistPage(page);
    }

    @Override
    public void editdelete(PageData pd) throws Exception {
        corpPromisePeopleMapper.editdelete(pd);
    }

    @Override
    public PageData findById(PageData pd) throws Exception {
        return corpPromisePeopleMapper.findById(pd);
    }

    @Override
    public void edit(PageData pd) throws Exception {
        corpPromisePeopleMapper.edit(pd);
    }

    @Override
    public List<PageData> findByPromiseId(PageData pd) throws Exception {
       return corpPromisePeopleMapper.findByPromiseId(pd);
    }

    @Override
    public void deletePromiseId(PageData pd) throws Exception {
        corpPromisePeopleMapper.deletePromiseId(pd);
    }

    @Override
    public List<PageData> findByCoverPromiseId(PageData pd) throws Exception {
        return corpPromisePeopleMapper.findByCoverPromiseId(pd);
    }

    @Override
    public List<PageData> findByUserId(PageData pd) throws Exception {
        return corpPromisePeopleMapper.findByUserId(pd);
    }

    @Override
    public void editSign(PageData pd) throws Exception {
        corpPromisePeopleMapper.editSign(pd);
    }

    @Override
    public List<PageData> promiselist(Page page) throws Exception {
       return corpPromisePeopleMapper.promiselistPage(page);
    }

    @Override
    public List<PageData> receivePromiselist(Page page) throws Exception {
        return corpPromisePeopleMapper.receivePromiselistPage(page);
    }

    @Override
    public List<PageData> corppromiselist(Page page) throws Exception {
        return corpPromisePeopleMapper.corppromiselistPage(page);
    }

    @Override
    public List<PageData> corppromiseDetaillist(Page page) throws Exception {
        return corpPromisePeopleMapper.corppromiseDetaillistPage(page);
    }

    @Override
    public List<PageData> peopleDetaillist(Page page) throws Exception {
        return corpPromisePeopleMapper.peopleDetaillistPage(page);
    }

    @Override
    public void editIsRead(PageData pd) throws Exception {
        corpPromisePeopleMapper.editIsRead(pd);
    }
}
