fix:授权码接口默认设置token
This commit is contained in:
parent
5ff781e133
commit
3bddc46c9a
|
@ -107,7 +107,16 @@ public class WeComServiceImpl implements IWeComService {
|
||||||
String access_token = jsonObject.getString("access_token");
|
String access_token = jsonObject.getString("access_token");
|
||||||
String code = jsonObject.getString("code");
|
String code = jsonObject.getString("code");
|
||||||
if (StrUtil.isEmpty(access_token)){
|
if (StrUtil.isEmpty(access_token)){
|
||||||
return error("access_token不能为空");
|
//如果token为空,手动获取一次
|
||||||
|
String corpid = jsonObject.getString("corpid");
|
||||||
|
String corpsecret = jsonObject.getString("corpsecret");
|
||||||
|
if (StrUtil.isEmpty(corpid)){
|
||||||
|
this.error("corpid不能为空");
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(corpsecret)){
|
||||||
|
this.error("corpsecret不能为空");
|
||||||
|
}
|
||||||
|
access_token = WeComAccessToken.getAccessToken(corpid, corpsecret);
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(code)){
|
if (StrUtil.isEmpty(code)){
|
||||||
return error("code不能为空");
|
return error("code不能为空");
|
||||||
|
|
Loading…
Reference in New Issue