diff --git a/servers/boe-server-all/src/main/java/com/xboe/module/course/api/CourseManageApi.java b/servers/boe-server-all/src/main/java/com/xboe/module/course/api/CourseManageApi.java index b8269475..129bea29 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/module/course/api/CourseManageApi.java +++ b/servers/boe-server-all/src/main/java/com/xboe/module/course/api/CourseManageApi.java @@ -1,18 +1,12 @@ package com.xboe.module.course.api; import java.io.OutputStream; -import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.transaction.Transactional; - -import com.alibaba.fastjson.JSONObject; -import com.xboe.module.course.dao.ThreadLogDao; - import com.boe.feign.api.infrastructure.entity.CommonSearchVo; import com.boe.feign.api.infrastructure.entity.Dict; import com.xboe.api.ThirdApi; @@ -99,10 +93,7 @@ public class CourseManageApi extends ApiBaseController{ IDataUserSyncService userSyncService; @Resource private ThirdApi thirdApi; - - @Autowired - private ThreadLogDao threadLogDao; - + // @PostMapping("/test") // public JsonResponse> findTest(Pagination pager,CourseQueryDto dto){ // //dto.setOrgAid("7003708665807110150"); @@ -640,11 +631,7 @@ public class CourseManageApi extends ApiBaseController{ } String email = userBasicInfoVoList.get(0).getEmail(); log.info("审批获取邮箱 userBasicInfoVoList.get(0).getEmail():{}", email); - - // 记录日志到boe_thread_log表(只有当email不为空时才记录) - if (StringUtils.isNotBlank(email)) { - saveEmailLog(email); - } + return email; } catch (Exception e) { @@ -1279,47 +1266,4 @@ public class CourseManageApi extends ApiBaseController{ courseService.saveTip(aid); return success(true); } - - /** - * 保存邮箱日志到boe_thread_log表 - * @param email 获取到的邮箱地址 - */ - @Transactional - public void saveEmailLog(String email) { - // 如果email为null或空,写入占位并记录日志 - if (StringUtils.isBlank(email)) { - log.warn("邮箱地址为空,使用占位值记录日志"); - email = "null"; - } - - try { - JSONObject extraData = new JSONObject(); - extraData.put("email", email); - - LocalDateTime now = LocalDateTime.now(); - String threadName = "email"; - - String sql = "INSERT INTO boe_thread_log (system_name,module_name,action_name,level,content,thread_name,extra_data,remark,create_time,create_id,create_name,update_time,update_id,update_name) " - + "VALUES (?1,?2,?3,?4,?5,?6,?7,?8,?9,?10,?11,?12,?13,?14)"; - - threadLogDao.sqlUpdate(sql, - "课程审批", - "课程审批邮箱", - "记录获取的邮箱", - "info", - null, - threadName, - extraData.toJSONString(), - null, - now, - null, - null, - now, - null, - null); - log.info("课程审批邮箱日志插入成功, email={}", email); - } catch (Exception ex) { - log.error("保存课程审批邮箱日志失败 email={}", email, ex); - } - } }