增加同步异常捕获

master
wujingtao 3 years ago
parent 2a5625fc94
commit 5ca53239c7

@ -41,8 +41,13 @@ public class SynchronizedAmountServiceImpl implements SynchronizedAmountService
public CommonResult<Object> synchronizedAmount(SubAccountsVo subAccountsVo) {
PayTwoOrder payTwoOrder = new PayTwoOrder();
//获取同步时间内的历史订单数
Integer taoBaoSaleSize = requestCore.getTaoBaoSaleSize(subAccountsVo.getStartTime(), subAccountsVo.getEndTime(), subAccountsVo.getSessionKey());
Integer taoBaoSaleSize;
try {
taoBaoSaleSize = requestCore.getTaoBaoSaleSize(subAccountsVo.getStartTime(), subAccountsVo.getEndTime(), subAccountsVo.getSessionKey());
} catch (Exception e) {
log.error("==========获取淘宝历史订单数错误,{}", e.getMessage());
return new CommonResult<>().error("请求错误,检查是否账号过期");
}
double historyAmount = 0.00;
int day = Math.toIntExact(DateUtil.betweenDay(DateUtil.parse(subAccountsVo.getStartTime()), DateUtil.parse(subAccountsVo.getEndTime()), true));
int average;

@ -3,7 +3,7 @@ server:
spring:
profiles:
active: dev
active: prod
servlet:
multipart:
max-file-size: 200MB #单个文件上传大小

Loading…
Cancel
Save