package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AppVersionMapper;
import com.ruoyi.system.domain.AppVersion;
import com.ruoyi.system.service.IAppVersionService;

/**
 * versionService业务层处理
 * 
 * @author haotian
 * @date 2025-03-20
 */
@Service
public class AppVersionServiceImpl implements IAppVersionService 
{
    @Autowired
    private AppVersionMapper appVersionMapper;

    /**
     * 查询version
     * 
     * @param id version主键
     * @return version
     */
    @Override
    public AppVersion selectAppVersionById(Long id)
    {
        return appVersionMapper.selectAppVersionById(id);
    }

    /**
     * 查询version列表
     * 
     * @param appVersion version
     * @return version
     */
    @Override
    public List<AppVersion> selectAppVersionList(AppVersion appVersion)
    {
        return appVersionMapper.selectAppVersionList(appVersion);
    }

    /**
     * 新增version
     * 
     * @param appVersion version
     * @return 结果
     */
    @Override
    public int insertAppVersion(AppVersion appVersion)
    {
        return appVersionMapper.insertAppVersion(appVersion);
    }

    /**
     * 修改version
     * 
     * @param appVersion version
     * @return 结果
     */
    @Override
    public int updateAppVersion(AppVersion appVersion)
    {
        return appVersionMapper.updateAppVersion(appVersion);
    }

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

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

    /**
     * 获取最新版本
     * */
    @Override
    public AppVersion getLatestVersion(){
        return appVersionMapper.getLatestVersion();
    }
}
