package shop.alien.dining.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
import shop.alien.dining.annotation.OperationLog;

/**
 * 操作日志切面
 *
 * @author ssk
 * @version 1.0
 * @date 2024/12/4
 */
@Slf4j
@Aspect
@Component
public class OperationLogAspect {

    @Before("@annotation(operationLog)")
    public void before(JoinPoint joinPoint, OperationLog operationLog) {
        // TODO: 实现操作日志记录逻辑
        log.info("操作日志: {}", operationLog.value());
    }
}

