package com.rf.psychological.opLog.service.impl;

import cn.hutool.core.date.DateUtil;
import com.rf.psychological.opLog.dao.UserOperateLogEntity;
import com.rf.psychological.opLog.repository.UserOperateLogRepository;
import com.rf.psychological.opLog.service.UserOperateLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description:用户操作记录埋点接口
 * @Author: mimang
 * @Date: 2023/5/6
 */
@Service
public class UserOperateLogServiceImpl implements UserOperateLogService {

    @Autowired
    private UserOperateLogRepository userOperateLogRepository;

    @Override
    public UserOperateLogEntity saveLog(UserOperateLogEntity entity) {
        entity.setCreateTime(DateUtil.now());
        return userOperateLogRepository.save(entity);
    }
}
