package com.zhyc.module.app.service.impl;

import java.util.List;
import com.zhyc.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhyc.module.app.mapper.AppVersionMapper;
import com.zhyc.module.app.domain.AppVersion;
import com.zhyc.module.app.service.IAppVersionService;

/**
 * 应用版本信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-12-09
 */
@Service
public class AppVersionServiceImpl implements IAppVersionService 
{
    @Autowired
    private AppVersionMapper appVersionMapper;

    /**
     * 查询应用版本信息
     * 
     * @param id 应用版本信息主键
     * @return 应用版本信息
     */
    @Override
    public AppVersion selectAppVersionById(Long id)
    {
        return appVersionMapper.selectAppVersionById(id);
    }

    /**
     * 查询应用版本信息列表
     * 
     * @param appVersion 应用版本信息
     * @return 应用版本信息
     */
    @Override
    public List<AppVersion> selectAppVersionList(AppVersion appVersion)
    {
        return appVersionMapper.selectAppVersionList(appVersion);
    }

    /**
     * 新增应用版本信息
     * 
     * @param appVersion 应用版本信息
     * @return 结果
     */
    @Override
    public int insertAppVersion(AppVersion appVersion)
    {
        appVersion.setCreateTime(DateUtils.getNowDate());
        return appVersionMapper.insertAppVersion(appVersion);
    }

    /**
     * 修改应用版本信息
     * 
     * @param appVersion 应用版本信息
     * @return 结果
     */
    @Override
    public int updateAppVersion(AppVersion appVersion)
    {
        appVersion.setUpdateTime(DateUtils.getNowDate());
        return appVersionMapper.updateAppVersion(appVersion);
    }

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

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