package com.leromro.core.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leromro.core.mapper.DeptRegionManagementMapper;
import com.leromro.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.leromro.core.mapper.DeptRegionManagementMapper;
import com.leromro.core.domain.DeptRegionManagement;
import com.leromro.core.service.IDeptRegionManagementService;

/**
 * 公司管理地区Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-14
 */
@Service
public class DeptRegionManagementServiceImpl extends ServiceImpl<DeptRegionManagementMapper, DeptRegionManagement> implements IDeptRegionManagementService
{
    @Autowired
    private DeptRegionManagementMapper deptRegionManagementMapper;

    /**
     * 查询公司管理地区
     * 
     * @param regionManagementId 公司管理地区主键
     * @return 公司管理地区
     */
    @Override
    public DeptRegionManagement selectDeptRegionManagementByRegionManagementId(Long regionManagementId)
    {
        return deptRegionManagementMapper.selectDeptRegionManagementByRegionManagementId(regionManagementId);
    }

    /**
     * 查询公司管理地区列表
     * 
     * @param deptRegionManagement 公司管理地区
     * @return 公司管理地区
     */
    @Override
    public List<DeptRegionManagement> selectDeptRegionManagementList(DeptRegionManagement deptRegionManagement)
    {
        return deptRegionManagementMapper.selectDeptRegionManagementList(deptRegionManagement);
    }

    /**
     * 新增公司管理地区
     * 
     * @param deptRegionManagement 公司管理地区
     * @return 结果
     */
    @Override
    public Boolean insertDeptRegionManagement(DeptRegionManagement deptRegionManagement)
    {
        return this.save(deptRegionManagement);
    }

    /**
     * 修改公司管理地区
     * 
     * @param deptRegionManagement 公司管理地区
     * @return 结果
     */
    @Override
    public Boolean updateDeptRegionManagement(DeptRegionManagement deptRegionManagement)
    {
        return this.updateById(deptRegionManagement);
    }

    /**
     * 批量删除公司管理地区
     * 
     * @param regionManagementIds 需要删除的公司管理地区主键
     * @return 结果
     */
    @Override
    public int deleteDeptRegionManagementByRegionManagementIds(Long[] regionManagementIds)
    {
        return deptRegionManagementMapper.deleteDeptRegionManagementByRegionManagementIds(regionManagementIds);
    }

    /**
     * 删除公司管理地区信息
     * 
     * @param regionManagementId 公司管理地区主键
     * @return 结果
     */
    @Override
    public int deleteDeptRegionManagementByRegionManagementId(Long regionManagementId)
    {
        return deptRegionManagementMapper.deleteDeptRegionManagementByRegionManagementId(regionManagementId);
    }
}
