@Override @Transactional(propagation = Propagation.REQUIRED, rollbackFor = java.lang.RuntimeException.class) public void autoApply(BizOrderExitApply waitApply) { Assert.notNull(waitApply, "waitApply must not null."); BusFinancePlanOrder order = busFinancePlanOrderService.getById(waitApply.getXsOrderId()); Assert.notNull(order, "order must not null."); BusFinancePlan plan = busFinancePlanService.getById(waitApply.getFinanceplanId()); Assert.notNull(plan, "plan must not null."); BusUser user = busUserService.queryUser(waitApply.getUserId()); Assert.notNull(user, "user must not null."); // 订单状态必须是“TRANSFERING” Assert.isTrue( BusOrderStatus.TRANSFERING.equals(order.getOrderStatus()), "order must is [TRANSFERING] status"); // 理财计划配置必须是“NONFIXED_FINANCEPLAN” or “MOBILE_FINANCEPLAN” or // “XS_FINANCEPLAN” or “PROFITS_ADVANCE_FINANCEPLAN” Assert.isTrue( BusFinancePlanConfigType.ORDER_EXIT_NEED_APPLY_FINANCEPLANS.contains( plan.getFinancePlanConfigType()), "finance plan config type check error."); bizOrderExitApplyService.updateOrderExitApply( waitApply.getId(), waitApply.getVersion(), "system", new Date(), "system task auto apply", OrderExitApplyStatus.APPLY_SUCCESS); }