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.KwtWaybillOrderWeighbridgeMapper;
import com.sckw.transport.model.KwtWaybillOrderWeighbridge;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 地磅记录
 * @CreateTime: 2025-10-12
 * @Description:
 * @Version: 1.0
 */

@Repository
public class KwtWaybillOrderWeighbridgeRepository extends ServiceImpl<KwtWaybillOrderWeighbridgeMapper, KwtWaybillOrderWeighbridge> {

    public List<KwtWaybillOrderWeighbridge> queryWaybillOrderWeighbridgeByWOrderId(Long wOrderId, Integer type) {
        return list(
                Wrappers.<KwtWaybillOrderWeighbridge>lambdaQuery()
                        .eq(KwtWaybillOrderWeighbridge::getWOrderId, wOrderId)
                        .eq(KwtWaybillOrderWeighbridge::getType, type)
                        .orderByDesc(KwtWaybillOrderWeighbridge::getId));
    }



}