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.AppletIconMapper;
import com.ruoyi.model.domain.AppletIcon;
import com.ruoyi.model.service.IAppletIconService;

/**
 * 跳转图标菜单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-30
 */
@Service
public class AppletIconServiceImpl extends ServiceImpl<AppletIconMapper, AppletIcon> implements IAppletIconService {
    @Autowired
    private AppletIconMapper appletIconMapper;

    /**
     * 查询跳转图标菜单
     * 
     * @param id 跳转图标菜单主键
     * @return 跳转图标菜单
     */
    @Override
    public AppletIcon selectAppletIconById(Long id)
    {
        return appletIconMapper.selectAppletIconById(id);
    }

    /**
     * 查询跳转图标菜单列表
     * 
     * @param appletIcon 跳转图标菜单
     * @return 跳转图标菜单
     */
    @Override
    public List<AppletIcon> selectAppletIconList(AppletIcon appletIcon)
    {
        return appletIconMapper.selectAppletIconList(appletIcon);
    }

    /**
     * 新增跳转图标菜单
     * 
     * @param appletIcon 跳转图标菜单
     * @return 结果
     */
    @Override
    public int insertAppletIcon(AppletIcon appletIcon)
    {
        appletIcon.setCreateTime(DateUtils.getNowDate());
        return appletIconMapper.insertAppletIcon(appletIcon);
    }

    /**
     * 修改跳转图标菜单
     * 
     * @param appletIcon 跳转图标菜单
     * @return 结果
     */
    @Override
    public int updateAppletIcon(AppletIcon appletIcon)
    {
        appletIcon.setUpdateTime(DateUtils.getNowDate());
        return appletIconMapper.updateAppletIcon(appletIcon);
    }

    /**
     * 批量删除跳转图标菜单
     * 
     * @param ids 需要删除的跳转图标菜单主键
     * @return 结果
     */
    @Override
    public int deleteAppletIconByIds(Long[] ids)
    {
        return appletIconMapper.deleteAppletIconByIds(ids);
    }

    /**
     * 删除跳转图标菜单信息
     * 
     * @param id 跳转图标菜单主键
     * @return 结果
     */
    @Override
    public int deleteAppletIconById(Long id)
    {
        return appletIconMapper.deleteAppletIconById(id);
    }
}
