运维学堂-在线课程模块 新增修改时设置操作人id

This commit is contained in:
xusd 2024-04-28 11:46:17 +08:00
parent 9bd32fc056
commit 863f7c6701

View File

@ -2,6 +2,7 @@ package com.inspur.operations.service.impl;
import java.util.List;
import com.inspur.common.utils.DateUtils;
import com.inspur.common.utils.SecurityUtils;
import com.inspur.common.utils.uuid.IdUtils;
import com.inspur.operations.domain.CourseOnlineInfo;
import com.inspur.operations.mapper.CourseOnlineInfoMapper;
@ -55,6 +56,7 @@ public class CourseOnlineInfoServiceImpl implements ICourseOnlineInfoService
public int insertCourseOnlineInfo(CourseOnlineInfo courseOnlineInfo)
{
courseOnlineInfo.setCreateTime(DateUtils.getNowDate());
courseOnlineInfo.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
courseOnlineInfo.setClassId(IdUtils.fastSimpleUUID());
return courseOnlineInfoMapper.insertCourseOnlineInfo(courseOnlineInfo);
}
@ -69,6 +71,7 @@ public class CourseOnlineInfoServiceImpl implements ICourseOnlineInfoService
public int updateCourseOnlineInfo(CourseOnlineInfo courseOnlineInfo)
{
courseOnlineInfo.setUpdateTime(DateUtils.getNowDate());
courseOnlineInfo.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
return courseOnlineInfoMapper.updateCourseOnlineInfo(courseOnlineInfo);
}