| | |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | order.setOrderSettle(OrderSettleType.COMPLETE.val()); |
| | | order.setUpdateTime(new Date()); |
| | | if (!orderService.save(order)) { |
| | | if (!orderService.updateById(order)) { |
| | | throw new CoolException("订单更新失败"); |
| | | } |
| | | } |
| | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | }finally { |
| | | InterceptorIgnoreHelper.clearIgnoreStrategy(); |
| | | } |
| | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | }finally { |
| | | InterceptorIgnoreHelper.clearIgnoreStrategy(); |
| | | } |