package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.mapper.UserMarginMapper;
import com.ruoyi.system.domain.UserMargin;
import com.ruoyi.system.service.IUserMarginService;

/**
 * usermarginService业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-03
 */
@Service
public class UserMarginServiceImpl extends ServiceImpl<BaseMapper<UserMargin>,UserMargin> implements IUserMarginService
{
    @Autowired
    private UserMarginMapper userMarginMapper;

    /**
     * 查询usermargin
     * 
     * @param id usermargin主键
     * @return usermargin
     */
    @Override
    public UserMargin selectUserMarginById(Long id)
    {
        return userMarginMapper.selectUserMarginById(id);
    }

    /**
     * 查询usermargin列表
     * 
     * @param userMargin usermargin
     * @return usermargin
     */
    @Override
    public List<UserMargin> selectUserMarginList(UserMargin userMargin)
    {
        return userMarginMapper.selectUserMarginList(userMargin);
    }

    /**
     * 新增usermargin
     * 
     * @param userMargin usermargin
     * @return 结果
     */
    @Override
    public int insertUserMargin(UserMargin userMargin)
    {
        return userMarginMapper.insertUserMargin(userMargin);
    }

    /**
     * 修改usermargin
     * 
     * @param userMargin usermargin
     * @return 结果
     */
    @Override
    public int updateUserMargin(UserMargin userMargin)
    {
        return userMarginMapper.updateUserMargin(userMargin);
    }

    /**
     * 批量删除usermargin
     * 
     * @param ids 需要删除的usermargin主键
     * @return 结果
     */
    @Override
    public int deleteUserMarginByIds(Long[] ids)
    {
        return userMarginMapper.deleteUserMarginByIds(ids);
    }

    /**
     * 删除usermargin信息
     * 
     * @param id usermargin主键
     * @return 结果
     */
    @Override
    public int deleteUserMarginById(Long id)
    {
        return userMarginMapper.deleteUserMarginById(id);
    }
}
