package com.jeelowcode.service.system.api;

import com.jeelowcode.service.system.dto.ErrorCodeAutoGenerateReqDTO;
import com.jeelowcode.service.system.dto.ErrorCodeRespDTO;
import com.jeelowcode.service.system.service.IErrorCodeService;
import org.springframework.stereotype.Service;

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

/**
 * 错误码 Api 实现类
 *
 * @author 芋道源码
 */
@Service
public class ApiErrorCodeApiImpl implements IApiErrorCodeApi {

    @Resource
    private IErrorCodeService errorCodeService;

    @Override
    public void autoGenerateErrorCodeList(List<ErrorCodeAutoGenerateReqDTO> autoGenerateDTOs) {
        errorCodeService.autoGenerateErrorCodes(autoGenerateDTOs);
    }

    @Override
    public List<ErrorCodeRespDTO> getErrorCodeList(String applicationName, LocalDateTime minUpdateTime) {
        return errorCodeService.getErrorCodeList(applicationName, minUpdateTime);
    }

}
