package com.cf.imes.module.report.framework.ureport.bean;

import com.cf.imes.module.report.framework.ureport.annotation.CfReportSpringbeanDatasource;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author Gqr
 * @since 2024/9/2 9:38
 */
@CfReportSpringbeanDatasource(value = "MockSpringBeanDatasource", name = "模拟springbean数据源")
public class MockSpringBeanDatasource {
    public List<Map<String, Object>> mockResult(String dsName, String datasetName, Map<String, Object> parameters) {
        List<Map<String, Object>> resultList = new ArrayList<>();

        Map<String, Object> resultMap1 = new HashMap<>();
        resultMap1.put("key", 1);
        resultMap1.put("value", "模拟1");

        Map<String, Object> resultMap2 = new HashMap<>();
        resultMap2.put("key", 2);
        resultMap2.put("value", "模拟2");
        return resultList;
    }
}
