package org.security.ht.feign.basic;

import org.security.common.constant.CommonConstant;
import org.security.ht.entity.basic.Employee;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author ：wzf
 * @apiNote ：Employee Feign接口类
 * @since ：Created in 2022/9/7 11:09
 */

@FeignClient(
	value = CommonConstant.APPLICATION_SECURITY,
	fallback = EmployeeClientFallback.class
)
public interface IEmployeeClient {

	String API_PREFIX = "/client";
	String EMPLOYEE_INFO = API_PREFIX + "/detail";
	String SYS_EMPLOYEE_DATA = API_PREFIX + "/syn/employee";


	@GetMapping(EMPLOYEE_INFO)
	R<Employee> getEmployeeAndFamiliesAndJobRecords(Long id);

	@PostMapping(SYS_EMPLOYEE_DATA)
	R synData(@RequestBody List<Employee> employees);





}
