Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat cloud send mail limit develop #1507

Merged
merged 7 commits into from
Nov 17, 2023

Conversation

weiliang110100
Copy link
Contributor

No description provided.

@@ -494,7 +492,10 @@ private boolean sendMail(AlarmInfo info, AlarmMessageDto alarmMessageDto, UserDe
Settings prefix = settingsService.getByCategoryAndKey(CategoryEnum.SMTP, KeyEnum.EMAIL_TITLE_PREFIX);
AtomicReference<String> mailTitle = new AtomicReference<>(title);
Optional.ofNullable(prefix).ifPresent(pre -> mailTitle.updateAndGet(v -> pre.getValue() + v));
MailUtils.sendHtmlEmail(mailAccount, mailAccount.getReceivers(), mailTitle.get(), content);
if(!settingsService.isCloud() || messageService.checkMessageLimit(userDetail) < MailUtils.CLOUD_MAIL_LIMIT){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 这个判断出现多次,是否可以封装一下?
  2. CLOUD_MAIL_LIMIT这个常量作为默认值,最好提供一个环境变量的修改入口

@jackin-code jackin-code merged commit 0dbe226 into develop Nov 17, 2023
8 of 10 checks passed
@jackin-code jackin-code deleted the feat-cloud_sendMail_limit-develop branch November 17, 2023 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants