| | |
| | | package com.hx.util.corp; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.util.HttpMethodUtil; |
| | | import com.hx.util.StringUtils; |
| | | import com.hx.util.corp.entity.WeiXinInfo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | * @return 返回 |
| | | */ |
| | | public static WeiXinInfo userInfo(String userId, String token) { |
| | | logger.info("userId:"+userId); |
| | | logger.info("token:"+token); |
| | | Map<String,Object> map=new HashMap<>(); |
| | | map.put("access_token",token); |
| | | map.put("userid",userId); |
| | | String datas = HttpMethodUtil.HttpURLUtilJson(URL_GET_USER_INFO, null, map, null, "GET"); |
| | | logger.info("datas:"+datas); |
| | | WeiXinInfo weiXinInfo = JSONObject.parseObject(datas, WeiXinInfo.class); |
| | | return weiXinInfo; |
| | | } |