|
|
@@ -34,7 +34,13 @@ public class InsuranceApplyJob implements JobHandler {
|
|
|
log.info("开始执行保险购买定时任务");
|
|
|
TenantUtils.execute(1L, () -> {
|
|
|
List<Long> orderIdList = tradeOrderService.getCanBuyInsuranceOrder();
|
|
|
- orderIdList.stream().forEach(orderId -> insuranceService.applyInsurance(orderId));
|
|
|
+ orderIdList.stream().forEach(orderId -> {
|
|
|
+ try {
|
|
|
+ insuranceService.applyInsurance(orderId);
|
|
|
+ }catch (Exception e) {
|
|
|
+ log.error("保险购买定时任务异常,订单id{}", orderId, e);
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
log.info("结束执行保险购买定时定时任务");
|
|
|
return "success";
|