package com.dgtly.sync.service.impl;

import java.util.List;

import com.dgtly.sync.mapper.MetaDiySalesorgtreeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dgtly.sync.mapper.MetaDiySalesorgtreeMapper;
import com.dgtly.sync.domain.MetaDiySalesorgtree;
import com.dgtly.sync.service.IMetaDiySalesorgtreeService;
import com.dgtly.common.core.text.Convert;

/**
 * 立邦销售人员销售架构Service业务层处理
 * 
 * @author qxp
 * @date 2020-07-28
 */
@Service
public class MetaDiySalesorgtreeServiceImpl implements IMetaDiySalesorgtreeService 
{
    @Autowired
    private MetaDiySalesorgtreeMapper metaDiySalesorgtreeMapper;

    /**
     * 查询立邦销售人员销售架构
     * 
     * @param versioncode 立邦销售人员销售架构ID
     * @return 立邦销售人员销售架构
     */
    @Override
    public MetaDiySalesorgtree selectMetaDiySalesorgtreeById(String versioncode)
    {
        return metaDiySalesorgtreeMapper.selectMetaDiySalesorgtreeById(versioncode);
    }

    /**
     * 查询立邦销售人员销售架构列表
     * 
     * @param metaDiySalesorgtree 立邦销售人员销售架构
     * @return 立邦销售人员销售架构
     */
    @Override
    public List<MetaDiySalesorgtree> selectMetaDiySalesorgtreeList(MetaDiySalesorgtree metaDiySalesorgtree)
    {
        return metaDiySalesorgtreeMapper.selectMetaDiySalesorgtreeList(metaDiySalesorgtree);
    }

    /**
     * 新增立邦销售人员销售架构
     * 
     * @param metaDiySalesorgtree 立邦销售人员销售架构
     * @return 结果
     */
    @Override
    public int insertMetaDiySalesorgtree(MetaDiySalesorgtree metaDiySalesorgtree)
    {
        return metaDiySalesorgtreeMapper.insertMetaDiySalesorgtree(metaDiySalesorgtree);
    }

    /**
     * 修改立邦销售人员销售架构
     * 
     * @param metaDiySalesorgtree 立邦销售人员销售架构
     * @return 结果
     */
    @Override
    public int updateMetaDiySalesorgtree(MetaDiySalesorgtree metaDiySalesorgtree)
    {
        return metaDiySalesorgtreeMapper.updateMetaDiySalesorgtree(metaDiySalesorgtree);
    }

    /**
     * 删除立邦销售人员销售架构对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMetaDiySalesorgtreeByIds(String ids)
    {
        return metaDiySalesorgtreeMapper.deleteMetaDiySalesorgtreeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除立邦销售人员销售架构信息
     * 
     * @param versioncode 立邦销售人员销售架构ID
     * @return 结果
     */
    @Override
    public int deleteMetaDiySalesorgtreeById(String versioncode)
    {
        return metaDiySalesorgtreeMapper.deleteMetaDiySalesorgtreeById(versioncode);
    }
}
