package com.leromro.core.service.impl;

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

/**
 * 订单资金冻结Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-11
 */
@Service
public class OrderFrozenFundsServiceImpl extends ServiceImpl<OrderFrozenFundsMapper, OrderFrozenFunds> implements IOrderFrozenFundsService
{
    @Autowired
    private OrderFrozenFundsMapper orderFrozenFundsMapper;

    /**
     * 查询订单资金冻结
     * 
     * @param orderFrozenFundsId 订单资金冻结主键
     * @return 订单资金冻结
     */
    @Override
    public OrderFrozenFunds selectOrderFrozenFundsByOrderFrozenFundsId(Long orderFrozenFundsId)
    {
        return orderFrozenFundsMapper.selectOrderFrozenFundsByOrderFrozenFundsId(orderFrozenFundsId);
    }

    /**
     * 查询订单资金冻结列表
     * 
     * @param orderFrozenFunds 订单资金冻结
     * @return 订单资金冻结
     */
    @Override
    public List<OrderFrozenFunds> selectOrderFrozenFundsList(OrderFrozenFunds orderFrozenFunds)
    {
        return orderFrozenFundsMapper.selectOrderFrozenFundsList(orderFrozenFunds);
    }

    /**
     * 新增订单资金冻结
     * 
     * @param orderFrozenFunds 订单资金冻结
     * @return 结果
     */
    @Override
    public Boolean insertOrderFrozenFunds(OrderFrozenFunds orderFrozenFunds)
    {
        return this.save(orderFrozenFunds);
    }

    /**
     * 修改订单资金冻结
     * 
     * @param orderFrozenFunds 订单资金冻结
     * @return 结果
     */
    @Override
    public Boolean updateOrderFrozenFunds(OrderFrozenFunds orderFrozenFunds)
    {
        return this.updateById(orderFrozenFunds);
    }

    /**
     * 批量删除订单资金冻结
     * 
     * @param orderFrozenFundsIds 需要删除的订单资金冻结主键
     * @return 结果
     */
    @Override
    public int deleteOrderFrozenFundsByOrderFrozenFundsIds(Long[] orderFrozenFundsIds)
    {
        return orderFrozenFundsMapper.deleteOrderFrozenFundsByOrderFrozenFundsIds(orderFrozenFundsIds);
    }

    /**
     * 删除订单资金冻结信息
     * 
     * @param orderFrozenFundsId 订单资金冻结主键
     * @return 结果
     */
    @Override
    public int deleteOrderFrozenFundsByOrderFrozenFundsId(Long orderFrozenFundsId)
    {
        return orderFrozenFundsMapper.deleteOrderFrozenFundsByOrderFrozenFundsId(orderFrozenFundsId);
    }
}
