提交 c6803426 作者: duanxincheng

查询个人的邮件推送许可优化

父级 de77b5ff
...@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.cmeeting.ad.entity.*; import com.cmeeting.ad.entity.*;
import com.cmeeting.ad.util.SecurityUtil; import com.cmeeting.ad.util.SecurityUtil;
import com.cmeeting.ad.vo.UserVo; import com.cmeeting.ad.vo.UserVo;
import com.cmeeting.dto.UserDTO;
import com.cmeeting.exception.RobotBaseException; import com.cmeeting.exception.RobotBaseException;
import com.cmeeting.mapper.primary.CommonMapper; import com.cmeeting.mapper.primary.CommonMapper;
import com.cmeeting.ad.service.ILdapService; import com.cmeeting.ad.service.ILdapService;
...@@ -18,10 +19,10 @@ import com.cmeeting.ad.util.JwtUtil; ...@@ -18,10 +19,10 @@ import com.cmeeting.ad.util.JwtUtil;
import com.cmeeting.constant.CategoryConstant; import com.cmeeting.constant.CategoryConstant;
import com.cmeeting.constant.UserAdminRouteConstant; import com.cmeeting.constant.UserAdminRouteConstant;
import com.cmeeting.mapper.secondary.SysUserSysMapper; import com.cmeeting.mapper.secondary.SysUserSysMapper;
import com.cmeeting.pojo.CoreModulePermissions;
import com.cmeeting.util.*; import com.cmeeting.util.*;
import com.cmeeting.ad.vo.ApplicationUserVO; import com.cmeeting.ad.vo.ApplicationUserVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.AuthenticationManager;
...@@ -29,11 +30,13 @@ import org.springframework.security.authentication.UsernamePasswordAuthenticatio ...@@ -29,11 +30,13 @@ import org.springframework.security.authentication.UsernamePasswordAuthenticatio
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.*; import java.time.*;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -242,8 +245,8 @@ public class UserServiceImpl implements UserService { ...@@ -242,8 +245,8 @@ public class UserServiceImpl implements UserService {
} }
JSONObject data = object.getJSONObject("data"); JSONObject data = object.getJSONObject("data");
RobotSecurityUser robotSecurityUser = JSON.parseObject(data.toJSONString(), RobotSecurityUser.class); RobotSecurityUser robotSecurityUser = JSON.parseObject(data.toJSONString(), RobotSecurityUser.class);
String userId = String.format("%08d", robotSecurityUser.getUserId());
UserVo.Auth authParams = UserVo.Auth.builder().id(String.format("%08d", robotSecurityUser.getUserId())).nick(robotSecurityUser.getNickName()).build(); UserVo.Auth authParams = UserVo.Auth.builder().id(userId).nick(robotSecurityUser.getNickName()).build();
String token = auth(authParams); String token = auth(authParams);
return token; return token;
} }
......
...@@ -202,6 +202,7 @@ public class EmailSender { ...@@ -202,6 +202,7 @@ public class EmailSender {
} else{ } else{
log.info("用户关闭了邮件推送,推送终止------"); log.info("用户关闭了邮件推送,推送终止------");
processLogService.log(meetingId,subMeetingId,"用户关闭了邮件推送,推送终止"); processLogService.log(meetingId,subMeetingId,"用户关闭了邮件推送,推送终止");
return false;
} }
if(StringUtils.isEmpty(toEmail)){ if(StringUtils.isEmpty(toEmail)){
......
...@@ -49,10 +49,10 @@ public class CmeetingJob { ...@@ -49,10 +49,10 @@ public class CmeetingJob {
public void tencentUserInit(){ public void tencentUserInit(){
TencentUserSync(); TencentUserSync();
} }
// @PostConstruct @PostConstruct
// public void userBindInit(){ public void userBindInit(){
// userBind(); userBind();
// } }
/** /**
* 企微人员定时同步 * 企微人员定时同步
......
...@@ -219,9 +219,9 @@ public class WeComServiceImpl extends ServiceImpl<WeComUserMapper, WeComUser> i ...@@ -219,9 +219,9 @@ public class WeComServiceImpl extends ServiceImpl<WeComUserMapper, WeComUser> i
} }
// 查询会议详情,获取主持人腾讯会议userid // 查询会议详情,获取主持人腾讯会议userid
String hostUserId = tencentMeetingService.getMeetingHost(meetingCode); String hostUserId = tencentMeetingService.getMeetingHost(meetingCode);
cancelMeeting(meetingId, weComToken); // 尝试取消无效会议
if (hostUserId == null || hostUserId.isEmpty()) { if (hostUserId == null || hostUserId.isEmpty()) {
log.error("获取主持人失败,跳过会议: " + meetingCode); log.error("获取主持人失败,跳过会议: " + meetingCode);
cancelMeeting(meetingId, weComToken); // 尝试取消无效会议
continue; continue;
} }
UserId userId = UserId.builder().userName(user.getUserName()).wid(user.getUserId()).tid(hostUserId).build(); UserId userId = UserId.builder().userName(user.getUserName()).wid(user.getUserId()).tid(hostUserId).build();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论