当前位置:网站首页>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;
}
}
边栏推荐
- composer
- IT外包驻场人员怎么定位自己的痛点?
- 4.3寸触控屏12路控制端口可编程网络中控支持5台中控主机相互备份
- Which brokerage has the lowest commission? In addition, is it safe to open a mobile account?
- Advanced skills of testers: a guide to the application of unit test reports
- The former king of fruit juice sold for 1.6 billion yuan
- 新出生的机器狗,打滚1小时后自己掌握走路,吴恩达开山大弟子最新成果
- 英语没学好到底能不能做coder,别再纠结了先学起来
- 【450. 删除二叉搜索树中的节点】
- 标配10个安全气囊,奇瑞艾瑞泽8安全防护无死角
猜你喜欢

小学期,第三场-下午:WEB_xxe

Tencent conference application market was officially launched, with more than 20 applications in the first batch

ABAQUS 2022最新版——完善的现实仿真解决方案

4.3寸触控屏12路控制端口可编程网络中控支持5台中控主机相互备份

Idle fish is hard to turn over

Tupu software has passed CMMI5 certification| High authority and high-level certification in the international software field

SSM整合流程(整合配置、功能模块开发、接口测试)

GeoServer安装

条件编译
![[solved] how does Tiktok cancel paying attention to the cancelled account](/img/1f/7b0bd2c0f69f7f3d1c25c426cc5771.png)
[solved] how does Tiktok cancel paying attention to the cancelled account
随机推荐
VB的基本语法
Convert seconds to * * hours * * minutes
discuz 论坛提速之删除data/log下的xxx.php文件
SM2246EN+闪迪15131
计网 | 【五 传输层、六 应用层】知识点及例题
暑期实训21组第一周个人工作总结
composer
Redis beginner to master 01
解决arm_release_ver of this libmali is ‘g2p0-01eac0‘,rk_so_ver is ‘4‘,libgl1-mesa-dev不会被安装,存在未满足的依赖关系
Django上传excel表格并将数据写入数据库的详细步骤
传输层 使用滑动窗口实现流量控制
Wechat applets - basics takes you to understand the life cycle of applets (2)
TorchDrug--药物属性预测
CADD课程学习(2)-- 靶点晶体结构信息
KubeVela 1.4:让应用交付更安全、上手更简单、过程更透明
SSM整合流程(整合配置、功能模块开发、接口测试)
Graduates
软件工程最佳实践——项目需求分析
VR全景添加对比功能,让差异化效果展示更直观!
IT外包驻场人员怎么定位自己的痛点?