package com.zcloud.service.commitment.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.commitment.PromiseMapper;
import com.zcloud.service.commitment.PromiseService;
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 PromiseServiceImpl implements PromiseService {

    @Resource
    private PromiseMapper promiseMapper;

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

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

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

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

    @Override
    public void edit(PageData pd) throws Exception {
        promiseMapper.edit(pd);
    }
    /**删除,物理删除
     * @param pd
     * @throws Exception
     */
    @Override
    public void delete(PageData pd)throws Exception{
        promiseMapper.delete(pd);
    }
}
