package com.seer.teach.pay.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seer.teach.pay.entity.RefundOrderEntity;
import com.seer.teach.pay.mapper.RefundOrderMapper;
import com.seer.teach.pay.service.IRefundOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 退款订单服务实现类
 * </p>
 *
 * @author 
 * @since 2025-09-29
 */
@Slf4j
@Service
public class RefundOrderServiceImpl extends ServiceImpl<RefundOrderMapper, RefundOrderEntity> implements IRefundOrderService {

    @Override
    public RefundOrderEntity getRefundOrderByRefundSn(String refundSn) {
        log.info("根据退款单号查询退款订单，退款单号：{}", refundSn);
        return this.getOne(new LambdaQueryWrapper<RefundOrderEntity>()
                .eq(RefundOrderEntity::getRefundSn, refundSn));
    }
}