package com.leromro.core.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leromro.core.mapper.PlatformFinanceMapper;
import com.leromro.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.leromro.core.mapper.PlatformFinanceMapper;
import com.leromro.core.domain.PlatformFinance;
import com.leromro.core.service.IPlatformFinanceService;

/**
 * 平台资金流水Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-11
 */
@Service
public class PlatformFinanceServiceImpl extends ServiceImpl<PlatformFinanceMapper, PlatformFinance> implements IPlatformFinanceService
{
    @Autowired
    private PlatformFinanceMapper platformFinanceMapper;

    /**
     * 查询平台资金流水
     * 
     * @param platformFinanceId 平台资金流水主键
     * @return 平台资金流水
     */
    @Override
    public PlatformFinance selectPlatformFinanceByPlatformFinanceId(Long platformFinanceId)
    {
        return platformFinanceMapper.selectPlatformFinanceByPlatformFinanceId(platformFinanceId);
    }

    /**
     * 查询平台资金流水列表
     * 
     * @param platformFinance 平台资金流水
     * @return 平台资金流水
     */
    @Override
    public List<PlatformFinance> selectPlatformFinanceList(PlatformFinance platformFinance)
    {
        return platformFinanceMapper.selectPlatformFinanceList(platformFinance);
    }

    /**
     * 新增平台资金流水
     * 
     * @param platformFinance 平台资金流水
     * @return 结果
     */
    @Override
    public Boolean insertPlatformFinance(PlatformFinance platformFinance)
    {
        return this.save(platformFinance);
    }

    /**
     * 修改平台资金流水
     * 
     * @param platformFinance 平台资金流水
     * @return 结果
     */
    @Override
    public Boolean updatePlatformFinance(PlatformFinance platformFinance)
    {
        return this.updateById(platformFinance);
    }

    /**
     * 批量删除平台资金流水
     * 
     * @param platformFinanceIds 需要删除的平台资金流水主键
     * @return 结果
     */
    @Override
    public int deletePlatformFinanceByPlatformFinanceIds(Long[] platformFinanceIds)
    {
        return platformFinanceMapper.deletePlatformFinanceByPlatformFinanceIds(platformFinanceIds);
    }

    /**
     * 删除平台资金流水信息
     * 
     * @param platformFinanceId 平台资金流水主键
     * @return 结果
     */
    @Override
    public int deletePlatformFinanceByPlatformFinanceId(Long platformFinanceId)
    {
        return platformFinanceMapper.deletePlatformFinanceByPlatformFinanceId(platformFinanceId);
    }
}
