package com.yueqian.xingyun.sc.impl.stock.transfer;

import com.lframework.starter.web.core.impl.BaseMpServiceImpl;
import com.yueqian.xingyun.sc.entity.ScTransferOrderDetail;
import com.yueqian.xingyun.sc.mappers.ScTransferOrderDetailMapper;
import com.yueqian.xingyun.sc.service.stock.transfer.ScTransferOrderDetailService;
import java.math.BigDecimal;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ScTransferOrderDetailServiceImpl
    extends BaseMpServiceImpl<ScTransferOrderDetailMapper, ScTransferOrderDetail>
    implements ScTransferOrderDetailService {

  @Transactional(rollbackFor = Exception.class)
  @Override
  public int receive(String orderId, String productId, BigDecimal receiveNum, BigDecimal receiveAmount) {
    return getBaseMapper().receive(orderId, productId, receiveNum, receiveAmount);
  }

  @Override
  public int countUnReceive(String orderId) {
    return getBaseMapper().countUnReceive(orderId);
  }
}
