localhost-back/src/main/java/io/company/localhost/service/commoncodService.java
2025-02-20 11:16:48 +09:00

64 lines
1.7 KiB
Java

/************************************************************
*
* @packageName : io.company.localhost.commoncodService
* @fileName : commoncodService.java
* @author : 공현지
* @date : 25.01.07
* @description :
*
* ===========================================================
* DATE AUTHOR NOTE
* -----------------------------------------------------------
* 24.12.06 공현지 최초 생성
*
*************************************************************/
package io.company.localhost.service;
import java.util.List;
import org.springframework.stereotype.Service;
import io.company.localhost.common.dto.MapDto;
import io.company.localhost.common.exception.NotFoundHandler;
import io.company.localhost.mapper.commoncodMapper;
import lombok.RequiredArgsConstructor;
@Service
@RequiredArgsConstructor
public class commoncodService {
private final commoncodMapper commoncodmapper;
public List<MapDto> selectWordCategory() {
return commoncodmapper.selectWordCategory();
}
public Long insertCategory(MapDto map) {
Long count = commoncodmapper.selectcheckCategoryExists(map);
if(count > 0) {
return -1L;
}
return commoncodmapper.insertCategory(map);
}
public List<MapDto> selectColorList(String type) {
return commoncodmapper.selectColorList(type);
}
public List<MapDto> selectMbtiList() {
return commoncodmapper.selectMbtiList();
}
public List<MapDto> selectYearCategories() {
return commoncodmapper.selectYearCategories();
}
public List<MapDto> selectPwhintList() {
return commoncodmapper.selectPwhintList();
}
public List<MapDto> selectCategoryList() {
return commoncodmapper.selectCategories();
}
}