package com.YuyeTech.TPlat.game.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @author:slambb
 * @date:2020/4/21
 */

@Controller
@RequestMapping("/wxlogin")
@Slf4j
public class wxController {
    @ResponseBody
    @RequestMapping(value = "/test", method = RequestMethod.GET, produces = {"application/json;charset=utf-8"})
   public String getWxUserInfo(HttpServletRequest request,@RequestParam(required = true) String echostr) {
        try {
            //只需要把微信请求的 echostr, 返回给微信就可以了
            log.info("测试来过===================" + echostr);
            return echostr;
        } catch (Exception e) {
            log.info("测试微信公众号的接口配置信息发生异常：", e);
            return "系统异常！";
        }
    }
}
