package com.schisandra.auth.application.config;

import com.schisandra.auth.application.factory.SmsTypeHandlerFactory;
import com.schisandra.auth.application.handler.sms.SchisandraSmsTypeHandler;
import org.dromara.sms4j.provider.config.BaseConfig;
import org.springframework.stereotype.Component;

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

/**
 * @Classname SmsConfig
 * @BelongsProject: schisandra-cloud-storage
 * @BelongsPackage: com.schisandra.auth.common.config
 * @Author: schisandra
 * @CreateTime: 2024-05-08  18:46
 * @Description: TODO
 * @Version: 1.0
 */
@Component
public class SmsReadConfig implements org.dromara.sms4j.core.datainterface.SmsReadConfig {


    @Resource
    private SmsTypeHandlerFactory smsTypeHandlerFactory;

    @Override
    public BaseConfig getSupplierConfig(String configId) {
        SchisandraSmsTypeHandler handler = smsTypeHandlerFactory.getHandler(configId);
        return handler.addConfig(configId);

    }

    @Override
    public List<BaseConfig> getSupplierConfigList() {
        return null;

    }

}
