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.AppInviteMapper;
import com.ruoyi.model.domain.AppInvite;
import com.ruoyi.model.service.IAppInviteService;

/**
 * 邀请海报配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-05
 */
@Service
public class AppInviteServiceImpl implements IAppInviteService 
{
    @Autowired
    private AppInviteMapper appInviteMapper;

    /**
     * 查询邀请海报配置
     * 
     * @param id 邀请海报配置主键
     * @return 邀请海报配置
     */
    @Override
    public AppInvite selectAppInviteById(Long id)
    {
        return appInviteMapper.selectAppInviteById(id);
    }

    /**
     * 查询邀请海报配置列表
     * 
     * @param appInvite 邀请海报配置
     * @return 邀请海报配置
     */
    @Override
    public List<AppInvite> selectAppInviteList(AppInvite appInvite)
    {
        return appInviteMapper.selectAppInviteList(appInvite);
    }

    /**
     * 新增邀请海报配置
     * 
     * @param appInvite 邀请海报配置
     * @return 结果
     */
    @Override
    public int insertAppInvite(AppInvite appInvite)
    {
        appInvite.setCreateTime(DateUtils.getNowDate());
        return appInviteMapper.insertAppInvite(appInvite);
    }

    /**
     * 修改邀请海报配置
     * 
     * @param appInvite 邀请海报配置
     * @return 结果
     */
    @Override
    public int updateAppInvite(AppInvite appInvite)
    {
        appInvite.setUpdateTime(DateUtils.getNowDate());
        return appInviteMapper.updateAppInvite(appInvite);
    }

    /**
     * 批量删除邀请海报配置
     * 
     * @param ids 需要删除的邀请海报配置主键
     * @return 结果
     */
    @Override
    public int deleteAppInviteByIds(Long[] ids)
    {
        return appInviteMapper.deleteAppInviteByIds(ids);
    }

    /**
     * 删除邀请海报配置信息
     * 
     * @param id 邀请海报配置主键
     * @return 结果
     */
    @Override
    public int deleteAppInviteById(Long id)
    {
        return appInviteMapper.deleteAppInviteById(id);
    }
}
