package sgc.portal.base.service;

import sgc.portal.base.Domain;
import sgc.portal.base.persistence.ComBizDateMapper;
import sgc.portal.base.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <pre>
 * 시스템명   : Common
 * 프로그램ID : ComBizDateService
 * 프로그램명  : BizDate 조회 서비스 제공
 * </pre>
 *
 * @author 이범근
 * @version 2020.02.28
 * @see DateUtil
 * @see ComBizDateMapper
 * @since JDK1.8
 */
@Service
public class ComBizDateService {

    @Autowired
    private ComBizDateMapper bizDataMapper;

    /**
     * Gets biz date.
     *
     * @return the biz date
     */
    public String getBizDate() {
        Domain domain = new Domain();
        return getBizDate(domain.getCorpCd());
    }

    /**
     * Gets biz date.
     *
     * @param corpCd the corp cd
     * @return the biz date
     */
    public String getBizDate(String corpCd) {
        return bizDataMapper.getBizDate(corpCd);
    }

}
