package com.ruoyi.model.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AppletIncreaseMapper;
import com.ruoyi.model.domain.AppletIncrease;
import com.ruoyi.model.service.IAppletIncreaseService;

/**
 * 增值服务Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-28
 */
@Service
public class AppletIncreaseServiceImpl extends ServiceImpl<AppletIncreaseMapper, AppletIncrease> implements IAppletIncreaseService
{
    @Autowired
    private AppletIncreaseMapper appletIncreaseMapper;

    /**
     * 查询增值服务
     * 
     * @param id 增值服务主键
     * @return 增值服务
     */
    @Override
    public AppletIncrease selectAppletIncreaseById(Long id)
    {
        return appletIncreaseMapper.selectAppletIncreaseById(id);
    }

    /**
     * 查询增值服务列表
     * 
     * @param appletIncrease 增值服务
     * @return 增值服务
     */
    @Override
    public List<AppletIncrease> selectAppletIncreaseList(AppletIncrease appletIncrease)
    {
        return appletIncreaseMapper.selectAppletIncreaseList(appletIncrease);
    }

    /**
     * 新增增值服务
     * 
     * @param appletIncrease 增值服务
     * @return 结果
     */
    @Override
    public int insertAppletIncrease(AppletIncrease appletIncrease)
    {
        appletIncrease.setCreateTime(DateUtils.getNowDate());
        return appletIncreaseMapper.insertAppletIncrease(appletIncrease);
    }

    /**
     * 修改增值服务
     * 
     * @param appletIncrease 增值服务
     * @return 结果
     */
    @Override
    public int updateAppletIncrease(AppletIncrease appletIncrease)
    {
        appletIncrease.setUpdateTime(DateUtils.getNowDate());
        return appletIncreaseMapper.updateAppletIncrease(appletIncrease);
    }

    /**
     * 批量删除增值服务
     * 
     * @param ids 需要删除的增值服务主键
     * @return 结果
     */
    @Override
    public int deleteAppletIncreaseByIds(Long[] ids)
    {
        return appletIncreaseMapper.deleteAppletIncreaseByIds(ids);
    }

    /**
     * 删除增值服务信息
     * 
     * @param id 增值服务主键
     * @return 结果
     */
    @Override
    public int deleteAppletIncreaseById(Long id)
    {
        return appletIncreaseMapper.deleteAppletIncreaseById(id);
    }
}
