package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TbMemberMapper;
import com.ruoyi.business.domain.TbMember;
import com.ruoyi.business.service.ITbMemberService;
import com.ruoyi.common.core.text.Convert;

/**
 * 套餐Service业务层处理
 * 
 * @author xiatao
 * @date 2022-01-18
 */
@Service
public class TbMemberServiceImpl implements ITbMemberService 
{
    @Autowired
    private TbMemberMapper tbMemberMapper;

    /**
     * 查询套餐
     * 
     * @param memId 套餐主键
     * @return 套餐
     */
    @Override
    public TbMember selectTbMemberByMemId(Long memId)
    {
        return tbMemberMapper.selectTbMemberByMemId(memId);
    }

    /**
     * 查询套餐列表
     * 
     * @param tbMember 套餐
     * @return 套餐
     */
    @Override
    public List<TbMember> selectTbMemberList(TbMember tbMember)
    {
        return tbMemberMapper.selectTbMemberList(tbMember);
    }

    /**
     * 新增套餐
     * 
     * @param tbMember 套餐
     * @return 结果
     */
    @Override
    public int insertTbMember(TbMember tbMember)
    {
        return tbMemberMapper.insertTbMember(tbMember);
    }

    /**
     * 修改套餐
     * 
     * @param tbMember 套餐
     * @return 结果
     */
    @Override
    public int updateTbMember(TbMember tbMember)
    {
        return tbMemberMapper.updateTbMember(tbMember);
    }

    /**
     * 批量删除套餐
     * 
     * @param memIds 需要删除的套餐主键
     * @return 结果
     */
    @Override
    public int deleteTbMemberByMemIds(String memIds)
    {
        return tbMemberMapper.deleteTbMemberByMemIds(Convert.toStrArray(memIds));
    }

    /**
     * 删除套餐信息
     * 
     * @param memId 套餐主键
     * @return 结果
     */
    @Override
    public int deleteTbMemberByMemId(Long memId)
    {
        return tbMemberMapper.deleteTbMemberByMemId(memId);
    }
}
