package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GoodsOrderMapper;
import com.ruoyi.system.domain.GoodsOrder;
import com.ruoyi.system.service.IGoodsOrderService;

/**
 * 商品订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class GoodsOrderServiceImpl implements IGoodsOrderService 
{
    @Autowired
    private GoodsOrderMapper goodsOrderMapper;

    /**
     * 查询商品订单
     * 
     * @param id 商品订单主键
     * @return 商品订单
     */
    @Override
    public GoodsOrder selectGoodsOrderById(Long id)
    {
        return goodsOrderMapper.selectGoodsOrderById(id);
    }

    /**
     * 查询商品订单列表
     * 
     * @param goodsOrder 商品订单
     * @return 商品订单
     */
    @Override
    public List<GoodsOrder> selectGoodsOrderList(GoodsOrder goodsOrder)
    {
        return goodsOrderMapper.selectGoodsOrderList(goodsOrder);
    }

    /**
     * 新增商品订单
     * 
     * @param goodsOrder 商品订单
     * @return 结果
     */
    @Override
    public int insertGoodsOrder(GoodsOrder goodsOrder)
    {
        return goodsOrderMapper.insertGoodsOrder(goodsOrder);
    }

    /**
     * 修改商品订单
     * 
     * @param goodsOrder 商品订单
     * @return 结果
     */
    @Override
    public int updateGoodsOrder(GoodsOrder goodsOrder)
    {
        return goodsOrderMapper.updateGoodsOrder(goodsOrder);
    }

    /**
     * 批量删除商品订单
     * 
     * @param ids 需要删除的商品订单主键
     * @return 结果
     */
    @Override
    public int deleteGoodsOrderByIds(Long[] ids)
    {
        return goodsOrderMapper.deleteGoodsOrderByIds(ids);
    }

    /**
     * 删除商品订单信息
     * 
     * @param id 商品订单主键
     * @return 结果
     */
    @Override
    public int deleteGoodsOrderById(Long id)
    {
        return goodsOrderMapper.deleteGoodsOrderById(id);
    }
}
