package com.emoon.common.httpclient;

import com.emoon.common.core.domain.R;
import com.emoon.common.httpclient.domain.AdminLoginRequest;
import com.emoon.common.httpclient.domain.AdminLoginResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;
import java.util.Map;

/**
 * @author destiny
 * @description:
 * @date 2025/10/26 11:00
 */
@FeignClient(name = "admin", url = "${feign.admin-url:http://localhost:8080}")
public interface AdminClient {

    @PostMapping(value = "/auth/login", consumes = MediaType.APPLICATION_JSON_VALUE)
    R<AdminLoginResp> login(@RequestBody AdminLoginRequest adminLoginRequest);

    @GetMapping("/system/knowledgeInfo/list")
    List<Map<String, Object>> knowledgeList(@RequestHeader(value = "token") String token,
                                            @RequestBody Map<String, Object> params);

    @GetMapping("/hospitalActivity/list")
    List<Map<String, Object>> hospitalActivityList(@RequestBody Map<String, Object> params);

    @PostMapping("/medicalRec/list")
    R<List<Map<String, Object>>> findMedicalRecord(@RequestBody Map<String, Object> params);
}
