|
|
@@ -52,6 +52,7 @@ public class WxServiceImpl implements IWxService { |
|
|
|
private static long expiresTime; |
|
|
|
|
|
|
|
public JsonResult checkAuthorize(String code) { |
|
|
|
log.info("进入判断用户是否授权接口, code={}", code); |
|
|
|
User user = CurrentUserUtil.getUserInfo(); |
|
|
|
String openidResult = GetOpenIdUtil.getopenid(code, CommonConfig.appId, CommonConfig.appSecret); |
|
|
|
if (null != JSONObject.parseObject(openidResult).getInteger("errcode") || StringUtils.isNotEmpty(JSONObject.parseObject(openidResult).getString("errmsg"))) { |
|
|
@@ -86,6 +87,7 @@ public class WxServiceImpl implements IWxService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult openId(String code) { |
|
|
|
log.info("进入获取openId接口, code={}", code); |
|
|
|
if (StringUtils.isEmpty(code)) { |
|
|
|
log.info("code为空"); |
|
|
|
return JsonResult.error("code为空"); |