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

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bonus.canteen.core.supply.domain.DrpOrderGoodsDetail;
import com.bonus.canteen.core.supply.mapper.DrpOrderGoodsDetailMapperV2;
import com.bonus.canteen.core.supply.service.DrpOrderGoodsDetailServiceV2;
import com.bonus.canteen.core.supply.vo.DrpOrderGoodsDetailVO;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DrpOrderGoodsDetailServiceImplV2 extends ServiceImpl<DrpOrderGoodsDetailMapperV2, DrpOrderGoodsDetail> implements DrpOrderGoodsDetailServiceV2 {
   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);
   }

}
