package com.zcloud.service.commitment.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.commitment.PromiseDetailsMapper;
import com.zcloud.service.commitment.PromiseDetailsService;
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 PromiseDetailsServiceImpl implements PromiseDetailsService {

    @Resource
    private PromiseDetailsMapper promiseDetailsMapper;

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

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

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

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