package com.junmp.jyzb.service.impl;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.entity.*;
import com.junmp.jyzb.mapper.OrderDetailMapper;
import com.junmp.jyzb.service.OrderDetailService;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrderDetailServiceImpl extends ServiceImpl<OrderDetailMapper, OrderDetail> implements OrderDetailService {

    public List<OrderDetail>  QueryList(String orderId) {
        LambdaQueryWrapper<OrderDetail> wrapper = new LambdaQueryWrapper<>();
        //根据主单据查询
        wrapper.eq(ObjectUtil.isNotEmpty(orderId), OrderDetail::getOrderId, orderId);

        return this.list(wrapper);
    }
}
