Skip to content

Commit

Permalink
解决邮件发送用户编号为空问题
Browse files Browse the repository at this point in the history
  • Loading branch information
shizhong committed Jun 5, 2023
1 parent 3e35015 commit 6ca09af
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.*;
import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert;
import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO;
Expand Down Expand Up @@ -81,7 +83,8 @@ public CommonResult<List<MailTemplateSimpleRespVO>> getSimpleTemplateList() {
@Operation(summary = "发送短信")
@PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')")
public CommonResult<Long> sendMail(@Valid @RequestBody MailTemplateSendReqVO sendReqVO) {
return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), null,
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), loginUser != null ? loginUser.getId() : null,
sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
}

Expand Down

0 comments on commit 6ca09af

Please sign in to comment.