package com.css.txw.sso.api.yhxx;

import com.css.txw.sso.constants.SsoApiConstants;
import com.css.txw.sso.pojo.yhxx.SwitchCompanyResDTO;
import com.css.ggzc.framework.common.pojo.CommonResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = SsoApiConstants.NAME,contextId = "switch")
@Tag(name = "切换会话信息接口")
public interface SwitchSessionApi {

    String PREFIX = SsoApiConstants.PREFIX + "/switchSession";


    @PostMapping(PREFIX+"/company")
    @Operation(summary = "切换机构")
    CommonResult<SwitchCompanyResDTO> switchCompany(@RequestParam("token")String token, @RequestParam("jguuid")String jguuid);

    @PostMapping(PREFIX+"/addCompany")
    @Operation(summary = "新增机构")
    CommonResult<String> addCompany(@RequestBody SwitchCompanyResDTO resDTO);

}
