package com.sckw.transport.repository;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sckw.transport.dao.KwtLogisticsOrderAddressMapper;
import com.sckw.transport.model.KwtLogisticsOrderAddress;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author :chenXiaoFei
 * @version :1.0
 * @description : 订单地址相关接口
 * @create :2025-11-11 13:33:00
 */
@Repository
public class KwtLogisticsOrderAddressRepository extends ServiceImpl<KwtLogisticsOrderAddressMapper, KwtLogisticsOrderAddress> {
    public List<KwtLogisticsOrderAddress> queryByLogOrderIds(List<Long> logOrderIdList) {

        return list(Wrappers.<KwtLogisticsOrderAddress>lambdaQuery()
                .eq(KwtLogisticsOrderAddress::getDelFlag,0)
                .in(KwtLogisticsOrderAddress::getLOrderId,logOrderIdList));
    }

    public List<KwtLogisticsOrderAddress> queryByLogOrderId(Long logOrderId) {
        return list(Wrappers.<KwtLogisticsOrderAddress>lambdaQuery()
                .eq(KwtLogisticsOrderAddress::getDelFlag,0)
                .eq(KwtLogisticsOrderAddress::getLOrderId,logOrderId));
    }
}
