OrderLogProcessor.java 612 字节
Newer Older
Q
qinyingjie 已提交
1 2 3 4 5
package com.study.design.auditlog;

import com.study.design.auditlog.pojo.AuditLog;
import org.springframework.stereotype.Component;

6 7 8 9 10 11 12 13

/**
 * 订单日志处理器
 *
 * @author : qinyingjie
 * @version : 2.2.0
 * @date : 2023/7/30 13:11
 */
Q
qinyingjie 已提交
14
@Component
15
public class OrderLogProcessor extends AbstractAuditLogProcessor {
Q
qinyingjie 已提交
16 17 18 19 20 21 22 23 24
    @Override
    protected AuditLog buildDetails(AuditLog auditLog) {
        String orderId = auditLog.getOrderId();
        String productDetails = "通过 orderId 获取";
        auditLog.setDetails(productDetails);
        System.out.println(auditLog);
        return auditLog;
    }
}