package com.seer.teach.mp.api;

import com.seer.teach.common.response.OssImageUploadResp;
import com.seer.teach.mp.api.resp.WxMiniProgramSessionDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.SERVER_NAME, contextId = "wechatMiniProgramApi", path = "/seer/mp")
public interface WechatMiniProgramApi {

    @GetMapping("/wechat/sns/jscode2session")
    WxMiniProgramSessionDTO code2Session(@RequestParam("code") String code);

    /**
     * 获取二维码码
     *
     * @param device 设备唯一标识
     * @return OssImageUploadResp 对象，包含上传到 OSS 的二维码图片信息
     * @throws FileUploadException 如果文件上传过程中出现错误，抛出异常
     */
    @GetMapping("/getQrCode")
    OssImageUploadResp getQrCode(@RequestParam("device") String device);
}
