mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 03:16:48 +08:00
Compare commits
8 Commits
20251031-1
...
20251103-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
748f7c5913 | ||
|
|
5954d54e44 | ||
|
|
00527271b6 | ||
|
|
308a16f4b4 | ||
|
|
302a673515 | ||
|
|
49b69db0bf | ||
|
|
8a0b05079a | ||
|
|
eaab48607d |
@@ -15,6 +15,8 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import it.sauronsoftware.jave.Encoder;
|
||||||
|
import it.sauronsoftware.jave.MultimediaInfo;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.orm.ObjectOptimisticLockingFailureException;
|
import org.springframework.orm.ObjectOptimisticLockingFailureException;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -46,8 +48,6 @@ import com.xboe.module.scorm.SCORMParser;
|
|||||||
import com.xboe.standard.BaseConstant;
|
import com.xboe.standard.BaseConstant;
|
||||||
import com.xboe.standard.enums.BoedxCourseFileType;
|
import com.xboe.standard.enums.BoedxCourseFileType;
|
||||||
|
|
||||||
import it.sauronsoftware.jave.Encoder;
|
|
||||||
import it.sauronsoftware.jave.MultimediaInfo;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -279,7 +279,7 @@ public class CourseFileApi extends ApiBaseController {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("读取视频时长错误", e);
|
log.error("读取视频时长错误", e);
|
||||||
// e.printStackTrace();
|
return error("视频解析失败,尝试重新上传或联系管理员", "视频解析失败,尝试重新上传或联系管理员");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
package com.xboe.module.course.dao;
|
|
||||||
|
|
||||||
import com.xboe.core.orm.BaseDao;
|
|
||||||
import com.xboe.module.course.entity.ModifyLog;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
@Repository
|
|
||||||
public class ModifyLogDao extends BaseDao<ModifyLog> {
|
|
||||||
|
|
||||||
public void insert(String requestId, String location, String body, String remark) {
|
|
||||||
ModifyLog entity = new ModifyLog();
|
|
||||||
entity.setRequestId(requestId);
|
|
||||||
entity.setLocation(location);
|
|
||||||
entity.setBody(body);
|
|
||||||
entity.setRemark(remark);
|
|
||||||
|
|
||||||
save(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
package com.xboe.module.course.entity;
|
|
||||||
|
|
||||||
import com.xboe.core.SysConstant;
|
|
||||||
import com.xboe.core.orm.IdBaseEntity;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 讲师删除记录表
|
|
||||||
* 为了监控PngCode-SZX-1227问题临时创建的表
|
|
||||||
*
|
|
||||||
* @author guo jia
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Entity
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Table(name = SysConstant.TABLE_PRE + "modify_log")
|
|
||||||
public class ModifyLog extends IdBaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 请求ID
|
|
||||||
*/
|
|
||||||
private String requestId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 位置
|
|
||||||
*/
|
|
||||||
private String location;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 请求body
|
|
||||||
*/
|
|
||||||
private String body;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注信息
|
|
||||||
*/
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -17,7 +17,6 @@ import javax.management.Query;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.xboe.api.ThirdApi;
|
import com.xboe.api.ThirdApi;
|
||||||
import com.xboe.core.orm.*;
|
import com.xboe.core.orm.*;
|
||||||
import com.xboe.module.course.dao.*;
|
import com.xboe.module.course.dao.*;
|
||||||
@@ -117,9 +116,6 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
@Resource
|
@Resource
|
||||||
private CourseTeacherDeletedRecordDao courseTeacherDeletedRecordDao;
|
private CourseTeacherDeletedRecordDao courseTeacherDeletedRecordDao;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ModifyLogDao modifyLogDao;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成过滤条件
|
* 生成过滤条件
|
||||||
*
|
*
|
||||||
@@ -914,7 +910,6 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
for (CourseTeacher ct : full.getTeachers()) {
|
for (CourseTeacher ct : full.getTeachers()) {
|
||||||
ct.setCourseId(c.getId());
|
ct.setCourseId(c.getId());
|
||||||
courseTeacherDao.save(ct);
|
courseTeacherDao.save(ct);
|
||||||
addBoeCourseTeacherModifyLog(ct, "M1位置讲师名修改", JSONUtil.toJsonStr(ct), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (full.getCrowds() != null && !full.getCrowds().isEmpty()) {
|
if (full.getCrowds() != null && !full.getCrowds().isEmpty()) {
|
||||||
@@ -1005,7 +1000,6 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
for (CourseTeacher ct : full.getTeachers()) {
|
for (CourseTeacher ct : full.getTeachers()) {
|
||||||
ct.setCourseId(c.getId());
|
ct.setCourseId(c.getId());
|
||||||
courseTeacherDao.saveOrUpdate(ct);
|
courseTeacherDao.saveOrUpdate(ct);
|
||||||
addBoeCourseTeacherModifyLog(ct, "M2位置讲师名修改", JSONUtil.toJsonStr(ct), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
||||||
@@ -1062,7 +1056,6 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
for (CourseTeacher ct : full.getTeachers()) {
|
for (CourseTeacher ct : full.getTeachers()) {
|
||||||
ct.setCourseId(c.getId());
|
ct.setCourseId(c.getId());
|
||||||
courseTeacherDao.saveOrUpdate(ct);
|
courseTeacherDao.saveOrUpdate(ct);
|
||||||
addBoeCourseTeacherModifyLog(ct, "M3位置讲师名修改", JSONUtil.toJsonStr(ct), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
||||||
@@ -1100,7 +1093,6 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
for (CourseTeacher ct : full.getTeachers()) {
|
for (CourseTeacher ct : full.getTeachers()) {
|
||||||
ct.setCourseId(c.getId());
|
ct.setCourseId(c.getId());
|
||||||
courseTeacherDao.saveOrUpdate(ct);
|
courseTeacherDao.saveOrUpdate(ct);
|
||||||
addBoeCourseTeacherModifyLog(ct, "M4位置讲师名修改", JSONUtil.toJsonStr(ct), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
//先清空受众信息,受众信息如果不一样了,也要加入到日志中
|
||||||
@@ -2038,20 +2030,4 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 增加boe_course_teacher的teacher_name字段被改为"BOE教师"的监控
|
|
||||||
*/
|
|
||||||
private void addBoeCourseTeacherModifyLog(CourseTeacher ct, String location, String body, String remark) {
|
|
||||||
try {
|
|
||||||
if (ct == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Objects.equals(ct.getTeacherName(), "BOE教师")) {
|
|
||||||
modifyLogDao.insert(null, location, body, remark);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("创建boe_course_teacher记录失败", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user