package org.security.ht.feign.basic;

import org.security.common.constant.CommonConstant;
import org.security.ht.entity.basic.Department;
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.RequestBody;

import java.util.List;

/**
 * @author ：wzf
 * @apiNote ：Department Feign接口类
 * @since ：Created in 2022/9/19 11:26
 */
@FeignClient(
	value = CommonConstant.APPLICATION_SECURITY,
	fallback = DepartmentClientFallback.class
)
public interface IDepartmentClient {

	String API_PREFIX = "/client";
	String SYN_SAVE_DATA = API_PREFIX + "/syn/save/department";

	/**
	 *消息总线信息同步，更新机构信息
	 */
	@PostMapping(SYN_SAVE_DATA)
	R saveData(@RequestBody List<Department> departmentList);
}
