Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
b1844a67
Commit
b1844a67
authored
Jan 23, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化邮箱通知插件
parent
842116de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
NotificationReminderFunction.java
...n/notification_reminder/NotificationReminderFunction.java
+2
-2
No files found.
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/function/notification_reminder/NotificationReminderFunction.java
View file @
b1844a67
...
@@ -46,14 +46,14 @@ public class NotificationReminderFunction extends AbstractLargeModelFunction {
...
@@ -46,14 +46,14 @@ public class NotificationReminderFunction extends AbstractLargeModelFunction {
MemberInfoEntity
memberInfoEntity
=
bizMemberInfoService
.
getById
(
userBaseEntity
.
getUserId
().
intValue
());
MemberInfoEntity
memberInfoEntity
=
bizMemberInfoService
.
getById
(
userBaseEntity
.
getUserId
().
intValue
());
String
email
=
memberInfoEntity
.
getEmail
();
String
email
=
memberInfoEntity
.
getEmail
();
if
(
StringUtils
.
isBlank
(
email
))
{
if
(
StringUtils
.
isBlank
(
email
))
{
return
"
告知用户插件执行失败,原因是
用户需要完善个人邮箱信息后再使用。"
;
return
"
Error 【执行失败】:
用户需要完善个人邮箱信息后再使用。"
;
}
}
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
content
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
content
);
jsonObject
.
put
(
"email"
,
email
);
jsonObject
.
put
(
"email"
,
email
);
jsonObject
.
put
(
"sign"
,
UUIDTool
.
getUUID
());
jsonObject
.
put
(
"sign"
,
UUIDTool
.
getUUID
());
Date
date
=
jsonObject
.
getDate
(
"datetime"
);
Date
date
=
jsonObject
.
getDate
(
"datetime"
);
if
(
date
.
before
(
DateUtils
.
getCurrDateTime
()))
{
if
(
date
.
before
(
DateUtils
.
getCurrDateTime
()))
{
return
"
告知用户插件执行失败,原因是
通知的日期时间已经超过当前时间。"
;
return
"
Error 【执行失败】:
通知的日期时间已经超过当前时间。"
;
}
}
long
expiredTime
=
DateUtils
.
diffTwoDate
(
date
,
DateUtils
.
getCurrDateTime
())
/
1000
;
long
expiredTime
=
DateUtils
.
diffTwoDate
(
date
,
DateUtils
.
getCurrDateTime
())
/
1000
;
redisService
.
set
(
NotificationReminderConstant
.
REDIS_KEY
+
jsonObject
.
toJSONString
(),
null
,
expiredTime
);
redisService
.
set
(
NotificationReminderConstant
.
REDIS_KEY
+
jsonObject
.
toJSONString
(),
null
,
expiredTime
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment