当前位置:网站首页>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;
}
}
边栏推荐
- Conditional compilation
- IT外包驻场人员怎么定位自己的痛点?
- Safe holidays without holidays, VR traffic makes children travel safely | Guangzhou Sinovel viewpoint
- Kubernetes为什么会赢,容器圈的风云变幻!
- 线下门店为什么要做新零售?
- 闲鱼难“翻身”
- 【ICCV 2019】特征超分检测:Towards Precise Supervision of Feature Super-Resolution for Small Object Detection
- Character class of regular series
- MQ advantages and disadvantages (2022.5.2-5.8)
- 请指教在线开户是什么意思?究竟网上开户是否安全么?
猜你喜欢

Enterprise middle office planning and it architecture microservice transformation

The prospectus of pelt medical was "invalid" for the second time in the Hong Kong stock exchange, and the listing plan was substantially delayed

qt中toLocal8Bit和toUtf8()有什么区别

SSM整合流程(整合配置、功能模块开发、接口测试)
Solution to rollback of MySQL database by mistake deletion

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

【LeetCode】【SQL】刷题笔记

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

TorchDrug--药物属性预测

科大讯飞活跃竞赛汇总!(12个)
随机推荐
Spark - 一文搞懂 Partitioner
FH6908A负极关断同步整流模拟低压降二极管控制IC芯片TSOT23-6超低功耗整流器 1w功耗 <100uA静态 替代MP6908
广州炒股开户选择手机办理安全吗?
4.3寸触控屏12路控制端口可编程网络中控支持5台中控主机相互备份
基于slate构建文档编辑器
实现各种效果和功能的按钮,读这篇文章就够了
今早,投资人开始集体出差
4.3-inch touch screen 12 channel control port programmable network central control supports mutual backup of 5 central control hosts
Redis ziplist 压缩列表的源码解析
1. 爬虫之Beautifulsoup解析库&在线解析图片验证码
线上线下双结合,VR全景是家具线上转型好方法!
派尔特医疗在港交所招股书二次“失效”,上市计划实质性延迟
太湖 “中国健康农产品·手机直播万里行”走进太湖
广州股票开户选择手机办理安全吗?
CV+Deep Learning——网络架构Pytorch复现系列——basenets(BackBones)(一)
VB的基本语法
台湾SSS鑫创SSS1700替代Cmedia CM6533 24bit 96KHZ USB音频编解码芯片
Tencent conference application market was officially launched, with more than 20 applications in the first batch
Cartoon | has Oracle been abandoned by the new era?
History, selection strategy and in-depth evaluation of note taking software