package com.persagy.server.client

import com.alibaba.fastjson.JSONArray
import com.alibaba.fastjson.JSONObject
import com.persagy.dmp.basic.config.DigitalFeignConfig
import com.persagy.legend.constant.DmpUrlConstant
import com.persagy.legend.models.request.InstanceUrlParam
import com.persagy.legend.models.response.DmpResult
import org.springframework.cloud.openfeign.FeignClient
import org.springframework.cloud.openfeign.SpringQueryMap
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody

/**
 * @description:数据中台dmp-rwd 物理世界、数据字典、IOT 接口feign
 * @author:lgy
 * @data:2021/8/11 14:56
 */
@FeignClient(name = "dmp-rwd", configuration = [DigitalFeignConfig::class], url = "\${persagy.bdtp.rwd.service:}")
interface DmpDicClient {
    /**
     * @description: 查询对象列表
     * @param: objectUrlParam 对象请求url通用参数
     * @param: criteria post请求参数
     * @return: com.persagy.dmp.common.DmpResult
     */
    @PostMapping(DmpUrlConstant.DEF_CLASS)
    fun queryDictObjectType(@SpringQueryMap objectUrlParam: InstanceUrlParam?, @RequestBody criteria: JSONObject?): DmpResult<JSONArray?>?

 }