/**
 * @filename:PaymentCollectionOperateServiceImpl 2024-10-22
 * @project KJT v1.1.0 Copyright(c) 2024 wanglang Co. Ltd. All right reserved.
 */
package com.trade.service.finance.paymentcollection.service.impl;

import com.trade.service.finance.paymentcollection.domain.PaymentCollectionOperate;
import com.trade.service.finance.paymentcollection.mapper.PaymentCollectionOperateMapper;
import com.trade.service.finance.paymentcollection.service.PaymentCollectionOperateService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description:出入账操作表服务实现
 * @version: v1.1.0
 * @author: wanglang
 */
@Service
public class PaymentCollectionOperateServiceImpl extends ServiceImpl<PaymentCollectionOperateMapper, PaymentCollectionOperate> implements PaymentCollectionOperateService {

    @Override
    public PaymentCollectionOperate getBusinessInfo(Long businessId, Integer businessType) {
        return this.lambdaQuery().eq(PaymentCollectionOperate::getBusinessId, businessId)
                .eq(PaymentCollectionOperate::getBusinessType, businessType).orderByDesc(PaymentCollectionOperate::getId).last("limit 1").one();
    }
}
