package com.yuchen.saas.park.service.service.property;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuchen.saas.park.api.entity.property.PropertyRefundInfo;
import com.yuchen.saas.park.service.mapper.property.PropertyRefundInfoMapper;
import org.nest.springwrap.core.tool.utils.Func;
import org.springframework.stereotype.Service;

@Service
public class PropertyRefundInfoService extends ServiceImpl<PropertyRefundInfoMapper, PropertyRefundInfo> {

    public PropertyRefundInfo getInfoByRetraceId(Long retraceId) {
        if (Func.isEmpty(retraceId)) {
            return null;
        }
        LambdaQueryWrapper<PropertyRefundInfo> qw = new LambdaQueryWrapper<>();
        qw.eq(PropertyRefundInfo::getRetraceId,retraceId);
        return this.getOne(qw);
    }

}
