package com.ruoyi.voluntary.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.voluntary.mapper.BusiAgentsLocationMapper;
import com.ruoyi.voluntary.domain.BusiAgentsLocation;
import com.ruoyi.voluntary.service.IBusiAgentsLocationService;

/**
 * 代理商区域Service业务层处理
 * 
 * @author voluntary
 * @date 2022-11-20
 */
@Service
public class BusiAgentsLocationServiceImpl implements IBusiAgentsLocationService 
{
    @Autowired
    private BusiAgentsLocationMapper busiAgentsLocationMapper;

    /**
     * 查询代理商区域
     * 
     * @param id 代理商区域主键
     * @return 代理商区域
     */
    @Override
    public BusiAgentsLocation selectBusiAgentsLocationById(Long id)
    {
        return busiAgentsLocationMapper.selectBusiAgentsLocationById(id);
    }

    /**
     * 查询代理商区域列表
     * 
     * @param busiAgentsLocation 代理商区域
     * @return 代理商区域
     */
    @Override
    public List<BusiAgentsLocation> selectBusiAgentsLocationList(BusiAgentsLocation busiAgentsLocation)
    {
        return busiAgentsLocationMapper.selectBusiAgentsLocationList(busiAgentsLocation);
    }

    /**
     * 新增代理商区域
     * 
     * @param busiAgentsLocation 代理商区域
     * @return 结果
     */
    @Override
    public int insertBusiAgentsLocation(BusiAgentsLocation busiAgentsLocation)
    {
        busiAgentsLocation.setCreateTime(DateUtils.getNowDate());
        return busiAgentsLocationMapper.insertBusiAgentsLocation(busiAgentsLocation);
    }

    /**
     * 修改代理商区域
     * 
     * @param busiAgentsLocation 代理商区域
     * @return 结果
     */
    @Override
    public int updateBusiAgentsLocation(BusiAgentsLocation busiAgentsLocation)
    {
        return busiAgentsLocationMapper.updateBusiAgentsLocation(busiAgentsLocation);
    }

    /**
     * 批量删除代理商区域
     * 
     * @param ids 需要删除的代理商区域主键
     * @return 结果
     */
    @Override
    public int deleteBusiAgentsLocationByIds(Long[] ids)
    {
        return busiAgentsLocationMapper.deleteBusiAgentsLocationByIds(ids);
    }

    /**
     * 删除代理商区域信息
     * 
     * @param id 代理商区域主键
     * @return 结果
     */
    @Override
    public int deleteBusiAgentsLocationById(Long id)
    {
        return busiAgentsLocationMapper.deleteBusiAgentsLocationById(id);
    }
}
