package com.ruoyi.model.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AddValueServiceMapper;
import com.ruoyi.model.domain.AddValueService;
import com.ruoyi.model.service.IAddValueServiceService;

/**
 * 增值服务Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-06
 */
@Service
public class AddValueServiceServiceImpl implements IAddValueServiceService 
{
    @Autowired
    private AddValueServiceMapper addValueServiceMapper;

    /**
     * 查询增值服务
     * 
     * @param addValueServiceId 增值服务主键
     * @return 增值服务
     */
    @Override
    public AddValueService selectAddValueServiceByAddValueServiceId(Long addValueServiceId)
    {
        return addValueServiceMapper.selectAddValueServiceByAddValueServiceId(addValueServiceId);
    }

    /**
     * 查询增值服务列表
     * 
     * @param addValueService 增值服务
     * @return 增值服务
     */
    @Override
    public List<AddValueService> selectAddValueServiceList(AddValueService addValueService)
    {
        return addValueServiceMapper.selectAddValueServiceList(addValueService);
    }

    /**
     * 新增增值服务
     * 
     * @param addValueService 增值服务
     * @return 结果
     */
    @Override
    public int insertAddValueService(AddValueService addValueService)
    {
        addValueService.setCreateTime(DateUtils.getNowDate());
        return addValueServiceMapper.insertAddValueService(addValueService);
    }

    /**
     * 修改增值服务
     * 
     * @param addValueService 增值服务
     * @return 结果
     */
    @Override
    public int updateAddValueService(AddValueService addValueService)
    {
        addValueService.setUpdateTime(DateUtils.getNowDate());
        return addValueServiceMapper.updateAddValueService(addValueService);
    }

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

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

    /**
     * 查询增值服务列表
     *
     * @return 增值服务集合
     */
    @Override
    public List<AddValueService> getAddValueServiceList() {
        return addValueServiceMapper.getAddValueServiceList();
    }
}
