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.ShopGuestRecordMapper;
import com.huijy.management.domain.ShopGuestRecord;
import com.huijy.management.service.IShopGuestRecordService;

/**
 * 酒店客人数据记录Service业务层处理
 *
 * @author luobo
 * @date 2021-10-10
 */
@Service
public class ShopGuestRecordServiceImpl implements IShopGuestRecordService
{
    @Autowired
    private ShopGuestRecordMapper shopGuestRecordMapper;

    /**
     * 查询酒店客人数据记录
     *
     * @param shopGuestRecord 酒店客人数据记录主键
     * @return 酒店客人数据记录
     */
    @Override
    public ShopGuestRecord selectShopGuestRecordByShopGuestRecord(Long shopGuestRecord)
    {
        return shopGuestRecordMapper.selectShopGuestRecordByShopGuestRecord(shopGuestRecord);
    }

    /**
     * 查询酒店客人数据记录列表
     *
     * @param shopGuestRecord 酒店客人数据记录
     * @return 酒店客人数据记录
     */
    @Override
    public List<ShopGuestRecord> selectShopGuestRecordList(ShopGuestRecord shopGuestRecord)
    {
        return shopGuestRecordMapper.selectShopGuestRecordList(shopGuestRecord);
    }

    /**
     * 新增酒店客人数据记录
     *
     * @param shopGuestRecord 酒店客人数据记录
     * @return 结果
     */
    @Override
    public int insertShopGuestRecord(ShopGuestRecord shopGuestRecord)
    {
        shopGuestRecord.setCreateTime(DateUtils.getNowDate());
        return shopGuestRecordMapper.insertShopGuestRecord(shopGuestRecord);
    }

    /**
     * 修改酒店客人数据记录
     *
     * @param shopGuestRecord 酒店客人数据记录
     * @return 结果
     */
    @Override
    public int updateShopGuestRecord(ShopGuestRecord shopGuestRecord)
    {
        return shopGuestRecordMapper.updateShopGuestRecord(shopGuestRecord);
    }

    /**
     * 批量删除酒店客人数据记录
     *
     * @param shopGuestRecords 需要删除的酒店客人数据记录主键
     * @return 结果
     */
    @Override
    public int deleteShopGuestRecordByShopGuestRecords(Long[] shopGuestRecords)
    {
        return shopGuestRecordMapper.deleteShopGuestRecordByShopGuestRecords(shopGuestRecords);
    }

    /**
     * 删除酒店客人数据记录信息
     *
     * @param shopGuestRecord 酒店客人数据记录主键
     * @return 结果
     */
    @Override
    public int deleteShopGuestRecordByShopGuestRecord(Long shopGuestRecord)
    {
        return shopGuestRecordMapper.deleteShopGuestRecordByShopGuestRecord(shopGuestRecord);
    }
}
