fix:授权码接口默认设置token
This commit is contained in:
parent
14f1503435
commit
86dbda2d28
|
@ -107,7 +107,16 @@ public class WeComServiceImpl implements IWeComService {
|
|||
String access_token = jsonObject.getString("access_token");
|
||||
String code = jsonObject.getString("code");
|
||||
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)){
|
||||
return error("code不能为空");
|
||||
|
|
Loading…
Reference in New Issue