package org.security.trans.basic.fegin;

import lombok.AllArgsConstructor;
import org.security.ht.entity.basic.Department;
import org.security.ht.feign.basic.IDepartmentClient;
import org.security.trans.basic.service.IDepartmentService;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ：wzf
 * @apiNote ：Department Feign实现类
 * @since ：Created in 2022/9/19 11:36
 */
@NonDS
@RestController
@AllArgsConstructor
public class DepartmentClient implements IDepartmentClient {

	private final IDepartmentService departmentService;

	@Override
	@PostMapping(SYN_SAVE_DATA)
	public R saveData(List<Department> departmentList) {
		return R.status(departmentService.saveDepartmentData(departmentList));
	}
}
