package com.zcloud.service.commitment.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.commitment.CorpPromiseDetailsMapper;
import com.zcloud.service.commitment.CorpPromiseDetailsService;
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 CorpPromiseDetailsServiceImpl implements CorpPromiseDetailsService {

    @Resource
    private CorpPromiseDetailsMapper corpPromiseDetailsMapper;

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

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

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

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

}
