package com.yijia.market.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yijia.market.mapper.MarkertPlanMapper;
import com.yijia.market.domain.MarkertPlan;
import com.yijia.market.service.IMarkertPlanService;

/**
 * 营销方案Service业务层处理
 * 
 * @author yijia
 * @date 2020-12-22
 */
@Service
public class MarkertPlanServiceImpl implements IMarkertPlanService 
{
    @Autowired
    private MarkertPlanMapper markertPlanMapper;

    /**
     * 查询营销方案
     * 
     * @param id 营销方案ID
     * @return 营销方案
     */
    @Override
    public MarkertPlan selectMarkertPlanById(Long id)
    {
        return markertPlanMapper.selectMarkertPlanById(id);
    }

    /**
     * 查询营销方案列表
     * 
     * @param markertPlan 营销方案
     * @return 营销方案
     */
    @Override
    public List<MarkertPlan> selectMarkertPlanList(MarkertPlan markertPlan)
    {
        return markertPlanMapper.selectMarkertPlanList(markertPlan);
    }

    /**
     * 新增营销方案
     * 
     * @param markertPlan 营销方案
     * @return 结果
     */
    @Override
    public int insertMarkertPlan(MarkertPlan markertPlan)
    {
        return markertPlanMapper.insertMarkertPlan(markertPlan);
    }

    /**
     * 修改营销方案
     * 
     * @param markertPlan 营销方案
     * @return 结果
     */
    @Override
    public int updateMarkertPlan(MarkertPlan markertPlan)
    {
        return markertPlanMapper.updateMarkertPlan(markertPlan);
    }

    /**
     * 批量删除营销方案
     * 
     * @param ids 需要删除的营销方案ID
     * @return 结果
     */
    @Override
    public int deleteMarkertPlanByIds(Long[] ids)
    {
        return markertPlanMapper.deleteMarkertPlanByIds(ids);
    }

    /**
     * 删除营销方案信息
     * 
     * @param id 营销方案ID
     * @return 结果
     */
    @Override
    public int deleteMarkertPlanById(Long id)
    {
        return markertPlanMapper.deleteMarkertPlanById(id);
    }
}
