package org.springblade.application.feign;

import org.springblade.application.pojo.entity.ApplicationInfoEntity;
import org.springblade.common.constant.CommonConstant;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(
	//定义Feign指向的service-id
	value = CommonConstant.APPLICATION_APP_NAME
)
public interface ApplicationClient {

	/**
	 * 接口前缀
	 */
	String API_PREFIX = "/api/application";

	/**
	 * 获取列表
	 *
	 * @param params
	 * @return
	 */
	@PostMapping(API_PREFIX + "/page")
	R page(@RequestParam Map<String, Object> params, Query query);

	/**
	 * 获取详情
	 *
	 * @param applicationInfoEntity
	 * @return
	 */
	@PostMapping(API_PREFIX + "/detail")
	R detail(ApplicationInfoEntity applicationInfoEntity);

}
