package com.sckw.contract.repository;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sckw.contract.dao.KwcContractTradeOrderMapper;
import com.sckw.contract.model.entity.KwcContractTradeOrder;
import org.springframework.stereotype.Repository;

/**
 * @author :chenXiaoFei
 * @version :1.0
 * @description : 贸易订单接口
 * @create :2025-11-05 16:35:00
 */
@Repository
public class KwcContractTradeOrderRepository extends ServiceImpl<KwcContractTradeOrderMapper, KwcContractTradeOrder> {
    public KwcContractTradeOrder queryByContractId(Long tradeOrderId) {
        return getOne(Wrappers.<KwcContractTradeOrder>lambdaQuery()
                .eq(KwcContractTradeOrder::getDelFlag, 0)
                .eq(KwcContractTradeOrder::getContractId, tradeOrderId));
    }
}
