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.AppletAmountLogMapper;
import com.ruoyi.model.domain.AppletAmountLog;
import com.ruoyi.model.service.IAppletAmountLogService;

/**
 * 金额明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-28
 */
@Service
public class AppletAmountLogServiceImpl implements IAppletAmountLogService 
{
    @Autowired
    private AppletAmountLogMapper appletAmountLogMapper;

    /**
     * 查询金额明细
     * 
     * @param id 金额明细主键
     * @return 金额明细
     */
    @Override
    public AppletAmountLog selectAppletAmountLogById(Long id)
    {
        return appletAmountLogMapper.selectAppletAmountLogById(id);
    }

    /**
     * 查询金额明细列表
     * 
     * @param appletAmountLog 金额明细
     * @return 金额明细
     */
    @Override
    public List<AppletAmountLog> selectAppletAmountLogList(AppletAmountLog appletAmountLog)
    {
        return appletAmountLogMapper.selectAppletAmountLogList(appletAmountLog);
    }

    /**
     * 新增金额明细
     * 
     * @param appletAmountLog 金额明细
     * @return 结果
     */
    @Override
    public int insertAppletAmountLog(AppletAmountLog appletAmountLog)
    {
        appletAmountLog.setCreateTime(DateUtils.getNowDate());
        return appletAmountLogMapper.insertAppletAmountLog(appletAmountLog);
    }

    /**
     * 修改金额明细
     * 
     * @param appletAmountLog 金额明细
     * @return 结果
     */
    @Override
    public int updateAppletAmountLog(AppletAmountLog appletAmountLog)
    {
        appletAmountLog.setUpdateTime(DateUtils.getNowDate());
        return appletAmountLogMapper.updateAppletAmountLog(appletAmountLog);
    }

    /**
     * 批量删除金额明细
     * 
     * @param ids 需要删除的金额明细主键
     * @return 结果
     */
    @Override
    public int deleteAppletAmountLogByIds(Long[] ids)
    {
        return appletAmountLogMapper.deleteAppletAmountLogByIds(ids);
    }

    /**
     * 删除金额明细信息
     * 
     * @param id 金额明细主键
     * @return 结果
     */
    @Override
    public int deleteAppletAmountLogById(Long id)
    {
        return appletAmountLogMapper.deleteAppletAmountLogById(id);
    }
}
