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

import com.goldenwater.slgc.entity.slgc.DocCate;
import com.goldenwater.slgc.mapper.slgc.DocCateMapper;
import com.goldenwater.slgc.service.slgc.IDocCateService;
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 DocCateServiceImpl implements IDocCateService {
    @Autowired
    private DocCateMapper docCateMapper;

    /**
     * 查询文档分类列表
     */
    @Override
    public List<DocCate> selectList(DocCate docCate) {
        return docCateMapper.selectList(docCate);
    }

    /**
     * 根据主键查询文档分类
     */
    @Override
    public DocCate selectById(String id) {
        return docCateMapper.selectById(id);
    }

    /**
     * 新增文档分类
     */
    @Override
    public int insert(DocCate docCate) {
        return docCateMapper.insert(docCate);
    }

    /**
     * 修改文档分类
     */
    @Override
    public int update(DocCate docCate) {
        return docCateMapper.update(docCate);
    }

    /**
     * 删除文档分类
     */
    @Override
    public int deleteById(String id) {
        return docCateMapper.deleteById(id);
    }

    /**
     * 批量删除文档分类
     */
    @Override
    public int deleteByIds(String[] ids) {
        return docCateMapper.deleteByIds(ids);
    }

    /**
     * 根据父ID查询文档分类列表
     */
    @Override
    public List<DocCate> selectByParentId(String parentId) {
        return docCateMapper.selectByParentId(parentId);
    }
}
