package com.ghy.order.service.impl;

import com.ghy.order.domain.OrderAddSubtract;
import com.ghy.order.mapper.OrderAddSubtractMapper;
import com.ghy.order.service.IOrderAddSubtractService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderAddSubtractServiceImpl implements IOrderAddSubtractService {

    @Resource
    private OrderAddSubtractMapper orderAddSubtractMapper;

    @Override
    public int insert(OrderAddSubtract o) {
        return orderAddSubtractMapper.insert(o);
    }

    @Override
    public int update(OrderAddSubtract o) {
        return orderAddSubtractMapper.update(o);
    }

    @Override
    public List<OrderAddSubtract> select(OrderAddSubtract o) {
        return orderAddSubtractMapper.select(o);
    }

    @Override
    public List<OrderAddSubtract> selectByOrderDetail(Long orderDetailId) {
        return orderAddSubtractMapper.selectByOrderDetail(orderDetailId);
    }

    @Override
    public OrderAddSubtract selectById(Long id) {
        return orderAddSubtractMapper.selectById(id);
    }

    @Override
    public int updatePay(Long id, String paymentId, Integer payStatus) {
        return orderAddSubtractMapper.updatePay(id, paymentId, payStatus);
    }
}
