package com.qmth.exam.reserve.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.exam.reserve.dao.OperateLogDao;
import com.qmth.exam.reserve.entity.OperateLogEntity;
import com.qmth.exam.reserve.enums.EventType;
import com.qmth.exam.reserve.service.OperateLogService;

@Service
public class OperateLogServiceImpl extends ServiceImpl<OperateLogDao, OperateLogEntity> implements OperateLogService {

    @Override
    public void insertOperateLog(Long operateId, EventType eventType, String content) {
        OperateLogEntity operateLog = new OperateLogEntity();
        operateLog.setOperateId(operateId);
        operateLog.setEventType(eventType.toString());
        operateLog.setContent(content);
        this.baseMapper.insert(operateLog);
    }

}
