package com.yeejoin.precontrol.common.listener.entity;

import com.yeejoin.precontrol.common.annotations.AfterInsert;
import com.yeejoin.precontrol.common.annotations.BeforeInsert;
import com.yeejoin.precontrol.common.entity.Task;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: duanwei
 * @create: 2020-07-19 14:58
 **/
@Component
public class TaskEntityListener {

    @BeforeInsert
    public void beforeInsert(Task task) {
        System.out.println("前置" + task);
    }

    @AfterInsert
    public void afterInsert(Task task) {
        System.out.println("后置" + task);
    }
}
