package com.miaxis.feign.service;


import com.alibaba.fastjson.JSONObject;
import com.miaxis.common.config.FeignConfig;
import com.miaxis.feign.dto.WxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 *
 * 微信接口
 */
@FeignClient(name="wxService",
        url = "https://api.weixin.qq.com",configuration = FeignConfig.class)
@Component
public interface IWxService {
    /**
     *  获取openid
     * @param appid
     * @param secret
     * @param jsCode
     * @param grantType
     * @return
     */
    @GetMapping(value = "/sns/jscode2session")
    String getWxInfo(
            @RequestParam("appid") String appid,
            @RequestParam("secret") String secret,
            @RequestParam("js_code") String jsCode,
            @RequestParam("grant_type") String grantType);

}
