package com.yiqi.order.service.impl;

import java.util.List;
import com.yiqi.common.utils.DateUtils;
import com.yiqi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiqi.order.mapper.OrderGoodsSkuMapper;
import com.yiqi.order.domain.OrderGoodsSku;
import com.yiqi.order.service.IOrderGoodsSkuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 商品订单物料明细Service业务层处理
 *
 * @author ruoyi
 * @date 2023-12-06
 */
@Service
public class OrderGoodsSkuServiceImpl extends ServiceImpl<OrderGoodsSkuMapper,OrderGoodsSku> implements IOrderGoodsSkuService {

    //<editor-folder desc="基础韩素">
    /**
     * 查询商品订单物料明细
     *
     * @param id 商品订单物料明细主键
     * @return 商品订单物料明细
     */
    @Override
    public OrderGoodsSku selectOrderGoodsSkuById(Long id) {
        return baseMapper.selectOrderGoodsSkuById(id);
    }

    /**
     * 查询商品订单物料明细列表
     *
     * @param orderGoodsSku 商品订单物料明细
     * @return 商品订单物料明细
     */
    @Override
    public List<OrderGoodsSku> selectOrderGoodsSkuList(OrderGoodsSku orderGoodsSku) {
        return baseMapper.selectOrderGoodsSkuList(orderGoodsSku);
    }

    /**
     * 新增商品订单物料明细
     *
     * @param orderGoodsSku 商品订单物料明细
     * @return 结果
     */
    @Override
    public int insertOrderGoodsSku(OrderGoodsSku orderGoodsSku) {
        orderGoodsSku.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertOrderGoodsSku(orderGoodsSku);
    }

    /**
     * 修改商品订单物料明细
     *
     * @param orderGoodsSku 商品订单物料明细
     * @return 结果
     */
    @Override
    public int updateOrderGoodsSku(OrderGoodsSku orderGoodsSku) {
        orderGoodsSku.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateOrderGoodsSku(orderGoodsSku);
    }

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

    /**
     * 删除商品订单物料明细信息
     *
     * @param id 商品订单物料明细主键
     * @return 结果
     */
    @Override
    public int deleteOrderGoodsSkuById(Long id) {
        return baseMapper.deleteOrderGoodsSkuById(id);
    }


    //</editor-folder>

}
