package com.goomood.phm.service.impl;

import java.util.List;
import com.goomood.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.goomood.phm.mapper.BasicAreaMapper;
import com.goomood.phm.domain.BasicArea;
import com.goomood.phm.service.IBasicAreaService;

/**
 * 战区管理Service业务层处理
 * 
 * @author goomood
 * @date 2024-11-16
 */
@Service
public class BasicAreaServiceImpl implements IBasicAreaService 
{
    @Autowired
    private BasicAreaMapper basicAreaMapper;

    /**
     * 查询战区管理
     * 
     * @param id 战区管理主键
     * @return 战区管理
     */
    @Override
    public BasicArea selectBasicAreaById(Long id)
    {
        return basicAreaMapper.selectBasicAreaById(id);
    }

    /**
     * 查询战区管理列表
     * 
     * @param basicArea 战区管理
     * @return 战区管理
     */
    @Override
    public List<BasicArea> selectBasicAreaList(BasicArea basicArea)
    {
        return basicAreaMapper.selectBasicAreaList(basicArea);
    }

    /**
     * 新增战区管理
     * 
     * @param basicArea 战区管理
     * @return 结果
     */
    @Override
    public int insertBasicArea(BasicArea basicArea)
    {
        basicArea.setCreateTime(DateUtils.getNowDate());
        return basicAreaMapper.insertBasicArea(basicArea);
    }

    /**
     * 修改战区管理
     * 
     * @param basicArea 战区管理
     * @return 结果
     */
    @Override
    public int updateBasicArea(BasicArea basicArea)
    {
        basicArea.setUpdateTime(DateUtils.getNowDate());
        return basicAreaMapper.updateBasicArea(basicArea);
    }

    /**
     * 批量删除战区管理
     * 
     * @param ids 需要删除的战区管理主键
     * @return 结果
     */
    @Override
    public int deleteBasicAreaByIds(Long[] ids)
    {
        return basicAreaMapper.deleteBasicAreaByIds(ids);
    }

    /**
     * 删除战区管理信息
     * 
     * @param id 战区管理主键
     * @return 结果
     */
    @Override
    public int deleteBasicAreaById(Long id)
    {
        return basicAreaMapper.deleteBasicAreaById(id);
    }
}
