当前位置:网站首页>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;
}
}
边栏推荐
- 正则系列之字符类
- Redis ziplist 压缩列表的源码解析
- 企业中通过组策略管理Edge浏览器设置(IE模式、主页绑定等)
- Idle fish is hard to turn over
- Graduates
- 达梦数据库重新初始化实例操作记录
- SSM整合流程(整合配置、功能模块开发、接口测试)
- History, selection strategy and in-depth evaluation of note taking software
- matlab Delaunay 三角剖分内的查询点
- 解决arm_release_ver of this libmali is ‘g2p0-01eac0‘,rk_so_ver is ‘4‘,libgl1-mesa-dev不会被安装,存在未满足的依赖关系
猜你喜欢

数据智能——DTCC2022!中国数据库技术大会即将开幕

Advanced skills of testers: a guide to the application of unit test reports

Code shoe set - mt3435 · assignment - bipartite graph problem - Graphic explanation

笔记软件的历史、选择策略以及深度评测

CADD课程学习(1)-- 药物设计基础知识

盘点华为云GaussDB(for Redis)六大秒级能力

Friends in Guangzhou can join us if they have the opportunity

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

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

计网 | 【五 传输层、六 应用层】知识点及例题
随机推荐
为什么一定要从DevOps走向BizDevOps?
笔记软件的历史、选择策略以及深度评测
WeakSet
Go语言学习教程(十三)
计网 | 【五 传输层、六 应用层】知识点及例题
杭州炒股开户选择手机办理安全吗?
盘点华为云GaussDB(for Redis)六大秒级能力
太湖 “中国健康农产品·手机直播万里行”走进太湖
Convert seconds to * * hours * * minutes
派尔特医疗在港交所招股书二次“失效”,上市计划实质性延迟
当我们在看待产业互联网的时候,总是会站在消费互联网的对立面来看待它
[jetsonnano] [tutorial] [introductory series] [i] how to enable VNC sharing
8 - 函数
WordPress 博客使用火山引擎 veImageX 进行静态资源 CDN 加速(免费)
如何做好测试用例设计
WeakSet
暑期实训21组第一周个人工作总结
6-1漏洞利用-FTP漏洞利用
#夏日挑战赛#【FFH】HarmonyOS手机遥控Dayu开发板相机
MySQL billing Statistics (Part 1): MySQL installation and client dbeaver connection