mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-23 22:11:40 +08:00
🎨 优化代码
This commit is contained in:
parent
fa2c990ab2
commit
7bf9373b55
@ -29,7 +29,7 @@ public class WxMaLinkServiceImpl implements WxMaLinkService {
|
||||
String linkField = "url_link";
|
||||
JsonObject jsonObject = GsonParser.parse(result);
|
||||
if (jsonObject.has(linkField)) {
|
||||
return jsonObject.get(linkField).toString();
|
||||
return jsonObject.get(linkField).getAsString();
|
||||
}
|
||||
throw new WxErrorException("无url_link");
|
||||
}
|
||||
@ -40,7 +40,7 @@ public class WxMaLinkServiceImpl implements WxMaLinkService {
|
||||
String linkField = "link";
|
||||
JsonObject jsonObject = GsonParser.parse(result);
|
||||
if (jsonObject.has(linkField)) {
|
||||
return jsonObject.get(linkField).toString();
|
||||
return jsonObject.get(linkField).getAsString();
|
||||
}
|
||||
throw new WxErrorException("无link");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user