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.AppletServiceLogMapper;
import com.ruoyi.model.domain.AppletServiceLog;
import com.ruoyi.model.service.IAppletServiceLogService;

/**
 * 服务记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-28
 */
@Service
public class AppletServiceLogServiceImpl implements IAppletServiceLogService 
{
    @Autowired
    private AppletServiceLogMapper appletServiceLogMapper;

    /**
     * 查询服务记录
     * 
     * @param id 服务记录主键
     * @return 服务记录
     */
    @Override
    public AppletServiceLog selectAppletServiceLogById(Long id)
    {
        return appletServiceLogMapper.selectAppletServiceLogById(id);
    }

    /**
     * 查询服务记录列表
     * 
     * @param appletServiceLog 服务记录
     * @return 服务记录
     */
    @Override
    public List<AppletServiceLog> selectAppletServiceLogList(AppletServiceLog appletServiceLog)
    {
        return appletServiceLogMapper.selectAppletServiceLogList(appletServiceLog);
    }

    /**
     * 新增服务记录
     * 
     * @param appletServiceLog 服务记录
     * @return 结果
     */
    @Override
    public int insertAppletServiceLog(AppletServiceLog appletServiceLog)
    {
        appletServiceLog.setCreateTime(DateUtils.getNowDate());
        return appletServiceLogMapper.insertAppletServiceLog(appletServiceLog);
    }

    /**
     * 修改服务记录
     * 
     * @param appletServiceLog 服务记录
     * @return 结果
     */
    @Override
    public int updateAppletServiceLog(AppletServiceLog appletServiceLog)
    {
        appletServiceLog.setUpdateTime(DateUtils.getNowDate());
        return appletServiceLogMapper.updateAppletServiceLog(appletServiceLog);
    }

    /**
     * 批量删除服务记录
     * 
     * @param ids 需要删除的服务记录主键
     * @return 结果
     */
    @Override
    public int deleteAppletServiceLogByIds(Long[] ids)
    {
        return appletServiceLogMapper.deleteAppletServiceLogByIds(ids);
    }

    /**
     * 删除服务记录信息
     * 
     * @param id 服务记录主键
     * @return 结果
     */
    @Override
    public int deleteAppletServiceLogById(Long id)
    {
        return appletServiceLogMapper.deleteAppletServiceLogById(id);
    }
}
