package com.zhongshu.card.client.service.feign;

import com.zhongshu.card.client.model.org.*;
import com.github.microservice.net.ResultContent;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(name = "fullcardserver/organizationFeign/manager")
public interface OrganizationFeignService {

    @Operation(summary = "机构简单信息", description = "机构简单信息")
    @RequestMapping(value = "getDetail", method = RequestMethod.GET)
    ResultContent<OrganizationSimpleModel> getDetail(
            @Parameter(name = "oid", description = "oid", required = true)
            @RequestParam(name = "oid") String oid);


    @Operation(summary = "得到项目信息", description = "得到项目信息")
    @RequestMapping(value = "getProjectInfo", method = RequestMethod.GET)
    ResultContent<ProjectOrgModel> getProjectInfo(@Parameter(name = "projectOid", description = "oid", required = false) @RequestParam(name = "projectOid") String projectOid);

    @Operation(summary = "得到学校详情", description = "得到学校详情")
    @RequestMapping(value = "getSchoolDetail", method = RequestMethod.GET)
    ResultContent<OrganizationModel> getSchoolDetail(@Parameter(name = "schoolOid", description = "oid", required = false) @RequestParam(name = "schoolOid") String schoolOid);

    @Operation(summary = "得到商户详情", description = "得到商户详情")
    @RequestMapping(value = "getBusinessMainDetail", method = RequestMethod.GET)
    ResultContent<OrganizationModel> getBusinessMainDetail(@Parameter(name = "businessMainOid", description = "oid", required = false) @RequestParam(name = "businessMainOid") String businessMainOid);


    @Operation(summary = "得到学校所在的项目详情", description = "得到学校所在的项目详情")
    @RequestMapping(value = "getSchoolProjectDetail", method = RequestMethod.GET)
    ResultContent<OrganizationModel> getSchoolProjectDetail(@Parameter(name = "schoolOid", description = "oid", required = false) @RequestParam(name = "schoolOid") String schoolOid);

    @Operation(summary = "得到用户在机构的信息", description = "得到用户在机构的信息")
    @RequestMapping(value = "getOrgUserDetail", method = {RequestMethod.POST})
    public ResultContent<OrganizationUserModel> getOrgUserDetail(@RequestBody OrgUserDetailParam param);

    @Operation(summary = "oid类型判断和关联的 项目oid、学校oid、商户oid", description = "oid类型判断和关联的 项目oid、学校oid、商户oid")
    @RequestMapping(value = "getOidAboutOrgInfo", method = RequestMethod.GET)
    ResultContent<OidAboutInfo> getOidAboutOrgInfo(
            @Parameter(name = "oid", description = "oid", required = false)
            @RequestParam(name = "oid") String oid);


}
