package com.goldenwater.slgc.service.impl.pms;

import com.goldenwater.slgc.entity.pms.PmsDocument;
import com.goldenwater.slgc.mapper.pms.PmsDocumentMapper;
import com.goldenwater.slgc.service.pms.IPmsDocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

@Service
@Transactional
public class PmsDocumentServiceImpl implements IPmsDocumentService {
    @Autowired
    private PmsDocumentMapper pmsDocumentMapper;

    /**
     * 查询文档列表
     */
    @Override
    public List<PmsDocument> selectList(PmsDocument document) {
        return pmsDocumentMapper.selectList(document);
    }

    /**
     * 根据主键查询文档
     */
    @Override
    public PmsDocument selectById(Long id) {
        return pmsDocumentMapper.selectById(id);
    }

    /**
     * 新增文档
     */
    @Override
    public int insert(PmsDocument document) {
        return pmsDocumentMapper.insert(document);
    }

    /**
     * 修改文档
     */
    @Override
    public int update(PmsDocument document) {
        return pmsDocumentMapper.update(document);
    }

    /**
     * 删除文档
     */
    @Override
    public int deleteById(Long id) {
        return pmsDocumentMapper.deleteById(id);
    }

    /**
     * 批量删除文档
     */
    @Override
    public int deleteByIds(Long[] ids) {
        return pmsDocumentMapper.deleteByIds(ids);
    }
}
