package com.huijy.management.service.impl;

import java.util.List;

import com.huijy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.huijy.management.mapper.ShopRoomOrderMapper;
import com.huijy.management.domain.ShopRoomOrder;
import com.huijy.management.service.IShopRoomOrderService;

/**
 * 酒店房间预订Service业务层处理
 *
 * @author lishuwen
 * @date 2021-11-10
 */
@Service
public class ShopRoomOrderServiceImpl implements IShopRoomOrderService {
    @Autowired
    private ShopRoomOrderMapper shopRoomOrderMapper;

    /**
     * 查询酒店房间预订
     *
     * @param id 酒店房间预订主键
     * @return 酒店房间预订
     */
    @Override
    public ShopRoomOrder selectShopRoomOrderById(Long id) {
        return shopRoomOrderMapper.selectShopRoomOrderById(id);
    }

    /**
     * 查询酒店房间预订列表
     *
     * @param shopRoomOrder 酒店房间预订
     * @return 酒店房间预订
     */
    @Override
    public List<ShopRoomOrder> selectShopRoomOrderList(ShopRoomOrder shopRoomOrder) {
        return shopRoomOrderMapper.selectShopRoomOrderList(shopRoomOrder);
    }

    /**
     * 新增酒店房间预订
     *
     * @param shopRoomOrder 酒店房间预订
     * @return 结果
     */
    @Override
    public int insertShopRoomOrder(ShopRoomOrder shopRoomOrder) {
        shopRoomOrder.setCreateTime(DateUtils.getNowDate());
        return shopRoomOrderMapper.insertShopRoomOrder(shopRoomOrder);
    }

    /**
     * 修改酒店房间预订
     *
     * @param shopRoomOrder 酒店房间预订
     * @return 结果
     */
    @Override
    public int updateShopRoomOrder(ShopRoomOrder shopRoomOrder) {
        return shopRoomOrderMapper.updateShopRoomOrder(shopRoomOrder);
    }

    /**
     * 批量删除酒店房间预订
     *
     * @param ids 需要删除的酒店房间预订主键
     * @return 结果
     */
    @Override
    public int deleteShopRoomOrderByIds(Long[] ids) {
        return shopRoomOrderMapper.deleteShopRoomOrderByIds(ids);
    }

    /**
     * 删除酒店房间预订信息
     *
     * @param id 酒店房间预订主键
     * @return 结果
     */
    @Override
    public int deleteShopRoomOrderById(Long id) {
        return shopRoomOrderMapper.deleteShopRoomOrderById(id);
    }

    @Override
    public List<ShopRoomOrder> selectShopRoomOrder(ShopRoomOrder shopRoomOrder) {
        return shopRoomOrderMapper.selectShopRoomOrder(shopRoomOrder);
    }

}
