package com.dbnt.kcscbackend.commonCode.service;


import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem;
import com.dbnt.kcscbackend.commonCode.repository.TcCodeGrpRepository;
import com.dbnt.kcscbackend.commonCode.repository.TcCodeItemRepository;
import lombok.RequiredArgsConstructor;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class CommonCodeService extends EgovAbstractServiceImpl{

  private final TcCodeGrpRepository codeGrpRepository;
  private final TcCodeItemRepository codeItemRepository;


  public List<TcCodeItem> selectCodeItemList(String grpCd) {
    return codeItemRepository.findByGrpCdAndUseYnOrderByGrpOrder(grpCd, "Y");
  }
}
