mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 11:56:50 +08:00
szx-1194 获取用户信息用http添加日志修改
This commit is contained in:
@@ -8,6 +8,7 @@ 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;
|
||||
@@ -640,8 +641,10 @@ public class CourseManageApi extends ApiBaseController{
|
||||
String email = userBasicInfoVoList.get(0).getEmail();
|
||||
log.info("审批获取邮箱 userBasicInfoVoList.get(0).getEmail():{}", email);
|
||||
|
||||
// 记录日志到boe_thread_log表
|
||||
saveEmailLog(email);
|
||||
// 记录日志到boe_thread_log表(只有当email不为空时才记录)
|
||||
if (StringUtils.isNotBlank(email)) {
|
||||
saveEmailLog(email);
|
||||
}
|
||||
|
||||
return email;
|
||||
} catch (Exception e) {
|
||||
@@ -1282,6 +1285,12 @@ public class CourseManageApi extends ApiBaseController{
|
||||
* @param email 获取到的邮箱地址
|
||||
*/
|
||||
private void saveEmailLog(String email) {
|
||||
// 如果email为null或空,不记录日志
|
||||
if (StringUtils.isBlank(email)) {
|
||||
log.warn("邮箱地址为空,跳过日志记录");
|
||||
email = "null";
|
||||
}
|
||||
|
||||
try {
|
||||
JSONObject extraData = new JSONObject();
|
||||
extraData.put("email", email);
|
||||
|
||||
Reference in New Issue
Block a user