当前位置:网站首页>Client请求外部接口标准处理方式
Client请求外部接口标准处理方式
2022-06-30 19:32:00 【蜗牛使劲冲】
简单记录下client外部请求代码的我认为比较标准的书写格式
public List<GdtDailyBalanceReportAO> getGdtDailyReportList2(Long accountId){
List<GdtDailyBalanceReportAO> listGdtDailyBalance = new ArrayList<>();
try {
response = HttpUtil.get(url, null, false);
log.info("调用 GdtDailyReportClient getGdtDailyReportList accountId:{}, response:{}", accountId, String.valueOf(response));
} catch (Exception e) {
log.error("调用GdtDailyReportClient getGdtDailyReportList异常:{}", e);
e.printStackTrace();
return listGdtDailyBalance;
}
GdtDailyBalanceResponse gdtDailyBalanceResponse = JSON.parseObject(response, GdtDailyBalanceResponse.class);
if (gdtDailyBalanceResponse.getData() == null || gdtDailyBalanceResponse.getData().getList() == null || gdtDailyBalanceResponse.getData().getList().size() <= 0) {
log.info("GdtDailyReportClient getGdtDailyReportList response:{},accountId:{}", JSON.toJSONString(gdtDailyBalanceResponse), accountId);
return listGdtDailyBalance;
}
}
边栏推荐
- PS2手柄-1「建议收藏」
- 如何快速通过PMP考试?
- 解决arm_release_ver of this libmali is ‘g2p0-01eac0‘,rk_so_ver is ‘4‘,libgl1-mesa-dev不会被安装,存在未满足的依赖关系
- “更福特、更中国”拨云见日,长安福特王牌产品订单过万
- 线上线下双结合,VR全景是家具线上转型好方法!
- 将 EMQX Cloud 数据通过公网桥接到 AWS IoT
- Filebeat自定义index和fields
- 为什么一定要从DevOps走向BizDevOps?
- Convert seconds to * * hours * * minutes
- Source code analysis of redis ziplist compressed list
猜你喜欢

超视频时代的音视频架构建设|Science和英特尔联袂推出“架构师成长计划”第二季

测试必备工具 —— Postman实战教程

QQmlApplicationEngine failed to load component qrc:/main.qml:-1 No such file or directory

KubeVela 1.4:让应用交付更安全、上手更简单、过程更透明

VR全景添加对比功能,让差异化效果展示更直观!

如何做好测试用例设计

Audio and video architecture construction in the super video era | science and Intel jointly launched the second season of "architect growth plan"

Idle fish is hard to turn over

屏幕显示技术进化史

CV+Deep Learning——网络架构Pytorch复现系列——basenets(BackBones)(一)
随机推荐
The former king of fruit juice sold for 1.6 billion yuan
Filebeat自定义index和fields
Which brokerage has the lowest commission? In addition, is it safe to open a mobile account?
条件编译
MySQL billing Statistics (Part 1): MySQL installation and client dbeaver connection
操作系统面试题汇总(不定期更新)
启动PHP报错ERROR: [pool www] cannot get uid for user ‘@[email protected]’
C语言:hashTable
Primary school, session 3 - afternoon: Web_ xxe
Buttons to achieve various effects and functions. Reading this article is enough
Graduates
[solved] how does Tiktok cancel paying attention to the cancelled account
PS2手柄-1「建议收藏」
计网 | 【五 传输层、六 应用层】知识点及例题
S7-1500 PLC之间进行TCP通信的具体方法和步骤详解(图文)
Growth summer challenge is coming, exclusive community welfare is coming ~ get CSDN customized T-shirt for free
暑期实训21组第一周个人工作总结
WeakSet
【NLP】【TextCNN】 文本分类
History, selection strategy and in-depth evaluation of note taking software