package com.yeejoin.amos.boot.module.tdc.api.feign;

import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.restful.utils.ResponseModel;

import java.util.List;

/**
 * @author DELL
 */
@FeignClient(value = "AMOS-IDX", path = "idx")
public interface IdxFeignService {
    
    /**
     * 查询表详情和表字段
     * @param tableId
     * @return
     */
    @RequestMapping(value = "/table/{tableId}", method = RequestMethod.GET)
    ResponseModel<JSONObject> queryByTableId(@PathVariable String tableId);

    /**
     * 查询主题下所有表名和字段
     * @param projectId 主题id
     * @return
     */
    @RequestMapping(value = "/v1/subject-tree", method = RequestMethod.GET)
    ResponseModel<List<JSONObject>> subjectTree(@RequestParam("projectId") String projectId);

    @RequestMapping(value = "/report/getTasks/v1", method = RequestMethod.GET)
    ResponseModel<JSONObject> getInfo(@RequestParam("pageNumber") int pageNumber,@RequestParam("pageSize") int pageSize);

    @RequestMapping(value = "/dimensionTable/treeView", method = RequestMethod.GET)
    ResponseModel<JSONObject> getDimensionTable(@RequestParam("id") String id);

}
