package com.keao.edu.user.api.client;


import com.fasterxml.jackson.databind.ObjectMapper;
import com.keao.edu.common.config.FeignConfiguration;
import com.keao.edu.user.api.client.fallback.EduUserFeignServiceFallback;
import com.keao.edu.user.api.entity.ExamRoom;
import com.keao.edu.user.api.entity.ExamRoomStudentRelation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "eduUserFeignService", name = "user-server", configuration = { FeignConfiguration.class }, fallback = EduUserFeignServiceFallback.class)
public interface EduUserFeignService {

	/**
	 * 获取考场信息
	 * @param id
	 * @return
	 */
	@GetMapping(value = "examRoom/get")
	ExamRoom getExamRoom(@RequestParam("id") Integer id);

	/**
	 * 学生报名
	 * @param organId
	 * @param phone
	 * @return
	 */
	@PostMapping(value = "student/apply")
	Object studentApply(@RequestParam("organId") Integer organId, @RequestParam("phone") String phone);

	/**
	 * 获取考场与学生关联
	 * @param basicId
	 * @param roomId
	 * @param studentId
	 * @return
	 */
	@GetMapping(value = "roomStudentRelation/get")
	ExamRoomStudentRelation getExamRoomStudentRelation(@RequestParam("basicId") Integer basicId, @RequestParam("roomId") String roomId, @RequestParam("studentId") Integer studentId);
}
