|
@@ -1,8 +1,16 @@
|
|
|
package com.fs.his.service.impl;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fs.common.utils.StringUtils;
|
|
|
+import com.fs.course.vo.FsUserCourseVO;
|
|
|
+import com.fs.his.param.FsUserOperationLogQueryParam;
|
|
|
+import com.fs.his.vo.FsUserOperationLogPageVo;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.fs.his.mapper.FsUserOperationLogMapper;
|
|
@@ -11,7 +19,7 @@ import com.fs.his.service.IFsUserOperationLogService;
|
|
|
|
|
|
/**
|
|
|
* 用户操作日志Service业务层处理
|
|
|
- *
|
|
|
+ *
|
|
|
* @author fs
|
|
|
* @date 2025-07-04
|
|
|
*/
|
|
@@ -20,7 +28,7 @@ public class FsUserOperationLogServiceImpl extends ServiceImpl<FsUserOperationLo
|
|
|
|
|
|
/**
|
|
|
* 查询用户操作日志
|
|
|
- *
|
|
|
+ *
|
|
|
* @param logId 用户操作日志主键
|
|
|
* @return 用户操作日志
|
|
|
*/
|
|
@@ -32,19 +40,53 @@ public class FsUserOperationLogServiceImpl extends ServiceImpl<FsUserOperationLo
|
|
|
|
|
|
/**
|
|
|
* 查询用户操作日志列表
|
|
|
- *
|
|
|
+ *
|
|
|
* @param fsUserOperationLog 用户操作日志
|
|
|
* @return 用户操作日志
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<FsUserOperationLog> selectFsUserOperationLogList(FsUserOperationLog fsUserOperationLog)
|
|
|
+ public List<FsUserOperationLogPageVo> selectFsUserOperationLogList(FsUserOperationLogQueryParam fsUserOperationLog)
|
|
|
{
|
|
|
- return baseMapper.selectFsUserOperationLogList(fsUserOperationLog);
|
|
|
+ List<FsUserOperationLog> logs = baseMapper.selectFsUserOperationLogList(fsUserOperationLog);
|
|
|
+ ArrayList<FsUserOperationLogPageVo> vos = new ArrayList<>();
|
|
|
+ if(logs!=null&& !logs.isEmpty()){
|
|
|
+ for (FsUserOperationLog log : logs) {
|
|
|
+ FsUserOperationLogPageVo vo = new FsUserOperationLogPageVo();
|
|
|
+ BeanUtils.copyProperties(log, vo);
|
|
|
+ StringBuilder richText = new StringBuilder();
|
|
|
+ richText.append("<div>")
|
|
|
+ .append("<div style='font-weight: bold;'>")
|
|
|
+ .append(log.getOperationType())
|
|
|
+ .append("<div>");
|
|
|
+ String param = log.getParam();
|
|
|
+ if (StringUtils.isNotBlank(param)){
|
|
|
+ FsUserCourseVO courseVO = JSON.parseObject(param, FsUserCourseVO.class);
|
|
|
+ if(courseVO!=null){
|
|
|
+ if (StringUtils.isNotBlank(courseVO.getCourseName())){
|
|
|
+ richText.append("<div style='font-weight: bold;'>").append("课节名称").append("</div>");
|
|
|
+ richText.append("<p>").append(courseVO.getCourseName()).append("<p>");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(courseVO.getTrainingCampName())){
|
|
|
+ richText.append("<div style='font-weight: bold;'>").append("所属训练营").append("</div>");
|
|
|
+ richText.append("<p>").append(courseVO.getTrainingCampName()).append("<p>");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(courseVO.getTrainingCampName())){
|
|
|
+ richText.append("<div style='font-weight: bold;'>").append("营期名称").append("</div>");
|
|
|
+ richText.append("<p>").append(courseVO.getPeriodName()).append("<p>");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ richText.append("</div>");
|
|
|
+ vo.setText(richText.toString());
|
|
|
+ vos.add(vo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return vos;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 新增用户操作日志
|
|
|
- *
|
|
|
+ *
|
|
|
* @param fsUserOperationLog 用户操作日志
|
|
|
* @return 结果
|
|
|
*/
|
|
@@ -57,7 +99,7 @@ public class FsUserOperationLogServiceImpl extends ServiceImpl<FsUserOperationLo
|
|
|
|
|
|
/**
|
|
|
* 修改用户操作日志
|
|
|
- *
|
|
|
+ *
|
|
|
* @param fsUserOperationLog 用户操作日志
|
|
|
* @return 结果
|
|
|
*/
|
|
@@ -69,7 +111,7 @@ public class FsUserOperationLogServiceImpl extends ServiceImpl<FsUserOperationLo
|
|
|
|
|
|
/**
|
|
|
* 批量删除用户操作日志
|
|
|
- *
|
|
|
+ *
|
|
|
* @param logIds 需要删除的用户操作日志主键
|
|
|
* @return 结果
|
|
|
*/
|
|
@@ -81,7 +123,7 @@ public class FsUserOperationLogServiceImpl extends ServiceImpl<FsUserOperationLo
|
|
|
|
|
|
/**
|
|
|
* 删除用户操作日志信息
|
|
|
- *
|
|
|
+ *
|
|
|
* @param logId 用户操作日志主键
|
|
|
* @return 结果
|
|
|
*/
|