package com.bonus.canteen.core.supply.purchase.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bonus.canteen.core.supply.purchase.domain.bo.DrpOrderGoodsDetail;
import com.bonus.canteen.core.supply.purchase.domain.vo.DrpOrderGoodsDetailVO;
import com.bonus.canteen.core.supply.purchase.mapper.DrpOrderGoodsDetailMapper;
import com.bonus.canteen.core.supply.purchase.service.DrpOrderGoodsDetailService;
import org.springframework.stereotype.Service;

import java.lang.invoke.SerializedLambda;
import java.util.List;

@Service
public class DrpOrderGoodsDetailServiceImpl extends ServiceImpl<DrpOrderGoodsDetailMapper, DrpOrderGoodsDetail> implements DrpOrderGoodsDetailService {
   public void deleteByOrderGoodsId(String orderGoodsId) {
      this.baseMapper.delete(Wrappers.lambdaQuery(DrpOrderGoodsDetail.class).eq(DrpOrderGoodsDetail::getOrderGoodsId, orderGoodsId));
   }

   public List<DrpOrderGoodsDetailVO> getDrpOrderGoodsDetailVOListByOrderGoodsId(String orderGoodsId) {
      return this.baseMapper.getDrpOrderGoodsDetailVOListByOrderGoodsId(orderGoodsId);
   }
}
