package com.fs.his.service.impl;

import java.util.Collections;
import java.util.List;

import com.fs.his.vo.FsStoreOrderItemListDVO;
import com.fs.his.vo.FsStoreOrderItemListUVO;
import com.fs.his.vo.FsStoreOrderItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.his.mapper.FsStoreOrderItemMapper;
import com.fs.his.domain.FsStoreOrderItem;
import com.fs.his.service.IFsStoreOrderItemService;

/**
 * 订单详情Service业务层处理
 *
 * @author fs
 * @date 2023-08-11
 */
@Service
public class FsStoreOrderItemServiceImpl implements IFsStoreOrderItemService
{
    @Autowired
    private FsStoreOrderItemMapper fsStoreOrderItemMapper;

    /**
     * 查询订单详情
     *
     * @param itemId 订单详情主键
     * @return 订单详情
     */
    @Override
    public FsStoreOrderItem selectFsStoreOrderItemByItemId(String itemId)
    {
        return fsStoreOrderItemMapper.selectFsStoreOrderItemByItemId(itemId);
    }

    /**
     * 查询订单详情列表
     *
     * @param fsStoreOrderItem 订单详情
     * @return 订单详情
     */
    @Override
    public List<FsStoreOrderItem> selectFsStoreOrderItemList(FsStoreOrderItem fsStoreOrderItem)
    {
        return fsStoreOrderItemMapper.selectFsStoreOrderItemList(fsStoreOrderItem);
    }

    /**
     * 新增订单详情
     *
     * @param fsStoreOrderItem 订单详情
     * @return 结果
     */
    @Override
    public int insertFsStoreOrderItem(FsStoreOrderItem fsStoreOrderItem)
    {
        return fsStoreOrderItemMapper.insertFsStoreOrderItem(fsStoreOrderItem);
    }

    /**
     * 修改订单详情
     *
     * @param fsStoreOrderItem 订单详情
     * @return 结果
     */
    @Override
    public int updateFsStoreOrderItem(FsStoreOrderItem fsStoreOrderItem)
    {
        return fsStoreOrderItemMapper.updateFsStoreOrderItem(fsStoreOrderItem);
    }

    /**
     * 批量删除订单详情
     *
     * @param itemIds 需要删除的订单详情主键
     * @return 结果
     */
    @Override
    public int deleteFsStoreOrderItemByItemIds(String[] itemIds)
    {
        return fsStoreOrderItemMapper.deleteFsStoreOrderItemByItemIds(itemIds);
    }

    /**
     * 删除订单详情信息
     *
     * @param itemId 订单详情主键
     * @return 结果
     */
    @Override
    public int deleteFsStoreOrderItemByItemId(String itemId)
    {
        return fsStoreOrderItemMapper.deleteFsStoreOrderItemByItemId(itemId);
    }

    @Override
    public List<FsStoreOrderItemListUVO> selectFsStoreOrderItemListUVOByOrderId(Long orderId) {
        return fsStoreOrderItemMapper.selectFsStoreOrderItemListUVOByOrderId(orderId);
    }

    @Override
    public List<FsStoreOrderItemListDVO> selectFsStoreOrderItemListDVOByOrderId(Long orderId) {
        return fsStoreOrderItemMapper.selectFsStoreOrderItemListDVOByOrderId(orderId);
    }

    @Override
    public List<FsStoreOrderItem>selectFsStoreOrderItemListByOrderId(Long orderId) {
        return fsStoreOrderItemMapper.selectFsStoreOrderItemListByOrderId(orderId);
    }
}
