package com.ruoyi.oa.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.oa.mapper.CmcResourceFieldMapper;
import com.ruoyi.oa.domain.CmcResourceField;
import com.ruoyi.oa.service.ICmcResourceFieldService;

/**
 * 专业领域Service业务层处理
 * 
 * @author cmc
 * @date 2025-03-21
 */
@Service
public class CmcResourceFieldServiceImpl implements ICmcResourceFieldService
{
    @Autowired
    private CmcResourceFieldMapper cmcResourceFieldMapper;

    /**
     * 查询专业领域
     * 
     * @param fieldId 专业领域主键
     * @return 专业领域
     */
    @Override
    public CmcResourceField selectCmcResourceFieldByFieldId(Integer fieldId)
    {
        return cmcResourceFieldMapper.selectCmcResourceFieldByFieldId(fieldId);
    }

    /**
     * 查询专业领域列表
     * 
     * @param cmcResourceField 专业领域
     * @return 专业领域
     */
    @Override
    public List<CmcResourceField> selectCmcResourceFieldList(CmcResourceField cmcResourceField)
    {
        return cmcResourceFieldMapper.selectCmcResourceFieldList(cmcResourceField);
    }

    /**
     * 新增专业领域
     * 
     * @param cmcResourceField 专业领域
     * @return 结果
     */
    @Override
    public int insertCmcResourceField(CmcResourceField cmcResourceField)
    {
        return cmcResourceFieldMapper.insertCmcResourceField(cmcResourceField);
    }

    /**
     * 修改专业领域
     * 
     * @param cmcResourceField 专业领域
     * @return 结果
     */
    @Override
    public int updateCmcResourceField(CmcResourceField cmcResourceField)
    {
        return cmcResourceFieldMapper.updateCmcResourceField(cmcResourceField);
    }

    /**
     * 批量删除专业领域
     * 
     * @param fieldIds 需要删除的专业领域主键
     * @return 结果
     */
    @Override
    public int deleteCmcResourceFieldByFieldIds(Integer[] fieldIds)
    {
        return cmcResourceFieldMapper.deleteCmcResourceFieldByFieldIds(fieldIds);
    }

    /**
     * 删除专业领域信息
     * 
     * @param fieldId 专业领域主键
     * @return 结果
     */
    @Override
    public int deleteCmcResourceFieldByFieldId(Integer fieldId)
    {
        return cmcResourceFieldMapper.deleteCmcResourceFieldByFieldId(fieldId);
    }
}
