package com.openhis.web.paymentmanage.util;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

@Configuration
@ConfigurationProperties(prefix = "threepaymapping")
@Data
public class ReverseMappingProperties {

    private Map<String, Map<String, String>> reverseMappings = new HashMap<>();

    /**
     * 获取特定业务类型的映射配置
     */
    public Map<String, String> getMappingConfig(String businessType) {
        return reverseMappings.getOrDefault(businessType, new HashMap<>());
    }

    /**
     * 获取所有映射配置
     */
    public Map<String, Map<String, String>> getAllMappings() {
        return reverseMappings;
    }
}