方法执行完成,正常返回后,进入改切点
/** * @author hhh * @date 2020/2/10 14:43 * @Despriction 订单修改记录Cglib代理,增强订单修改后推送 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @Documented public @interface OrderChangeProxy { } @Component @Aspect @Log4j2 public class OrderChangePointCut { private final ModifyOrderService modifyOrderService; /** * 构造注入 * 保证实例唯一与实例不为null * @param modifyOrderService */ @Autowired public OrderChangePointCut(ModifyOrderService modifyOrderService) { this.modifyOrderService = modifyOrderService; } @Pointcut("@annotation(com.jn.ssr.superrescue.annotation.OrderChangeProxy)") public void orderChange() { } @AfterReturning(returning = "result",pointcut="orderChange()") public void doBefore(JoinPoint jp,Object result) { Object[] args =jp.getArgs(); OrderBasicRequestEntity orderBasicRequestEntity =(OrderBasicRequestEntity) args[0]; log.info("订单修改信息推送切点-{}",orderBasicRequestEntity.getId()); List<BaseUpdRecordEntity> updateList =(List<BaseUpdRecordEntity>) result; modifyOrderService.modifyOrderToTpr(orderBasicRequestEntity,updateList); } }