package com.yc.ship.module.product.service.priceroommodeltype;

import com.yc.ship.module.product.dal.dataobject.priceroommodeltype.PriceRoomModelTypeDO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;


import com.yc.ship.module.product.dal.mysql.priceroommodeltype.PriceRoomModelTypeMapper;

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


/**
 * 价格模板中房型入住模式 Service 实现类
 *
 * @author 管理员
 */
@Service
@Validated
public class PriceRoomModelTypeServiceImpl implements PriceRoomModelTypeService {

    @Resource
    private PriceRoomModelTypeMapper priceRoomModelTypeMapper;


    @Override
    public List<PriceRoomModelTypeDO> getByObjectIdAndRoomModelId(Long id, Long roomModelId) {
        return priceRoomModelTypeMapper.selectByObjectIdAndRoomModelId(id, roomModelId);
    }

    @Override
    public List<PriceRoomModelTypeDO> getByIds(List<Long> roomModelTypeIds) {
        if(roomModelTypeIds.isEmpty()) {
            return Collections.emptyList();
        }
        return priceRoomModelTypeMapper.selectByIds(roomModelTypeIds);
    }
}