Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cmeeting
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
翟斌
cmeeting
Commits
ee9a4269
提交
ee9a4269
authored
6月 04, 2025
作者:
duanxincheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
GraphApi接入推送邮件
父级
1a40d520
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
25 行增加
和
18 行删除
+25
-18
pom.xml
+0
-3
src/main/java/com/cmeeting/email/EmailSender.java
+0
-0
src/main/java/com/cmeeting/job/CmeetingJob.java
+9
-9
src/main/java/com/cmeeting/job/FileProcessTask.java
+12
-3
src/main/java/com/cmeeting/service/impl/TecentMeetingServiceImpl.java
+2
-2
src/main/resources/mapper/primary/TecentMeetingMapper.xml
+2
-1
没有找到文件。
pom.xml
浏览文件 @
ee9a4269
...
...
@@ -73,9 +73,6 @@
<version>
3.1
</version>
</dependency>
<dependency>
<groupId>
com.microsoft.graph
</groupId>
<artifactId>
microsoft-graph-auth
</artifactId>
<version>
0.3.0
</version>
...
...
src/main/java/com/cmeeting/email/EmailSender.java
浏览文件 @
ee9a4269
差异被折叠。
点击展开。
src/main/java/com/cmeeting/job/CmeetingJob.java
浏览文件 @
ee9a4269
...
...
@@ -38,15 +38,15 @@ public class CmeetingJob {
@Autowired
private
FileProcessProducer
producer
;
//
@PostConstruct
//
public void weComUserInit(){
//
weComUserSync();
//
}
//
//
@PostConstruct
//
public void tencentUserInit(){
//
TencentUserSync();
//
}
@PostConstruct
public
void
weComUserInit
(){
weComUserSync
();
}
@PostConstruct
public
void
tencentUserInit
(){
TencentUserSync
();
}
/**
* 企微人员定时同步
...
...
src/main/java/com/cmeeting/job/FileProcessTask.java
浏览文件 @
ee9a4269
...
...
@@ -267,9 +267,9 @@ public class FileProcessTask {
// 将xml格式的内容转换为特殊json
String
json
=
convertXmlToJSON
(
xml
);
String
recordContentPath
=
meetingId
+
"-recordContent-"
+
IdUtil
.
fastSimpleUUID
()
+
"txt"
;
minioUtils
.
upload
(
recordContentPath
,
recordData
);
String
recordXmlPath
=
meetingId
+
"-recordXmlPath-"
+
IdUtil
.
fastSimpleUUID
()
+
"xml"
;
try
{
minioUtils
.
upload
(
recordContentPath
,
recordData
);
//写入json文件,这里的json文件用于用户可编辑
Files
.
write
(
Paths
.
get
(
targetPath
),
json
.
getBytes
());
log
.
info
(
"json文件已保存到: {}"
,
targetPath
);
...
...
@@ -312,8 +312,17 @@ public class FileProcessTask {
if
(
meetingInfo
.
getEmailPushAccess
()){
log
.
info
(
"用户允许邮件推送,准备推送邮件至{}------"
,
meetingInfo
.
getEmail
());
//邮件推送
// isPushed = emailSender.sendEmailWithAttachment("duanxincheng@chatbot.cn",meetingName,path + targetFileName + ".docx",meetingId);
isPushed
=
emailSender
.
sendEmailWithAttachment
(
meetingInfo
.
getEmail
(),
meetingName
,
path
+
targetFileName
+
".docx"
,
meetingId
);
isPushed
=
emailSender
.
sendEmailWithAttachment
(
"duanxincheng@chatbot.cn"
,
meetingName
,
path
+
targetFileName
+
".docx"
,
meetingId
);
try
{
// isPushed = emailSender.sendEmailWithAttachment(meetingInfo.getEmail(),meetingName,path + targetFileName + ".docx",meetingId);
}
catch
(
Exception
e
)
{
log
.
error
(
"邮件推送失败: {}"
,
e
.
getMessage
(),
e
);
StringWriter
sw
=
new
StringWriter
();
PrintWriter
pw
=
new
PrintWriter
(
sw
);
e
.
printStackTrace
(
pw
);
processLogService
.
log
(
meetingId
,
subMeetingId
,
"【邮件推送】:"
+
sw
.
toString
());
throw
new
RuntimeException
(
e
);
}
if
(
isPushed
)
processLogService
.
log
(
meetingId
,
subMeetingId
,
"用户允许邮件推送,推送邮件至"
+
meetingInfo
.
getEmail
());
// emailSender.sendEmailWithAttachment("xuwentao@chatbot.cn",meetingName,path + targetFileName + ".docx",meetingId);
...
...
src/main/java/com/cmeeting/service/impl/TecentMeetingServiceImpl.java
浏览文件 @
ee9a4269
...
...
@@ -103,7 +103,7 @@ public class TecentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,Te
// 检查重名并设置标志
markDuplicateNamesTecent
(
users
);
// 批量插入数据库(分批次)
int
batchSize
=
10
;
int
batchSize
=
10
00
;
for
(
int
i
=
0
;
i
<
users
.
size
();
i
+=
batchSize
)
{
List
<
TencentMeetingUser
>
batch
=
users
.
subList
(
i
,
Math
.
min
(
i
+
batchSize
,
users
.
size
()));
batchInsert
(
batch
);
...
...
@@ -123,7 +123,7 @@ public class TecentMeetingServiceImpl extends ServiceImpl<TecentMeetingMapper,Te
// 查询近两天的会议录制列表
try
{
ZonedDateTime
now
=
ZonedDateTime
.
now
();
String
startTime
=
String
.
valueOf
(
now
.
minusDays
(
5
).
toEpochSecond
());
String
startTime
=
String
.
valueOf
(
now
.
minusDays
(
2
).
toEpochSecond
());
String
endTime
=
String
.
valueOf
(
now
.
toEpochSecond
());
AtomicInteger
currentPage
=
new
AtomicInteger
(
1
);
Long
totalPage
=
1L
;
...
...
src/main/resources/mapper/primary/TecentMeetingMapper.xml
浏览文件 @
ee9a4269
...
...
@@ -22,6 +22,6 @@
SELECT * FROM user_tencentmeeting
</select>
<select
id=
"getUsernameByUserId"
resultType=
"java.lang.String"
>
SELECT user_name FROM user_tencentmeeting where user_id = #{userId}
SELECT user_name FROM user_tencentmeeting where user_id = #{userId}
limit 1
</select>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论