package incheon.product.common.theme.service.impl;

import incheon.product.common.theme.mapper.CommonThemeMapper;
import incheon.product.common.theme.service.CommonThemeService;
import incheon.product.common.theme.vo.ThemeCategoryVO;
import incheon.product.common.theme.vo.ThemeLayerVO;
import incheon.product.common.theme.vo.ThemeVO;
import lombok.extern.slf4j.Slf4j;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 공통 주제도 서비스 구현체.
 */
@Slf4j
@Service("commonThemeService")
public class CommonThemeServiceImpl extends EgovAbstractServiceImpl implements CommonThemeService {

    @Resource(name = "commonThemeMapper")
    private CommonThemeMapper commonThemeMapper;

    @Override
    public List<ThemeCategoryVO> getCategories() {
        return commonThemeMapper.selectCategories();
    }

    @Override
    public List<ThemeVO> getThemes() {
        return commonThemeMapper.selectThemes();
    }

    @Override
    public ThemeVO getTheme(String themeId) {
        return commonThemeMapper.selectThemeById(themeId);
    }

    @Override
    public List<ThemeLayerVO> getLayersByThemeId(String themeId) {
        return commonThemeMapper.selectLayersByThemeId(themeId);
    }
}
