mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 09:11:52 +08:00
解决邮件发送用户编号为空问题
This commit is contained in:
parent
3e350151bc
commit
6ca09af97e
@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.system.controller.admin.mail;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
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.controller.admin.mail.vo.template.*;
|
||||||
import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert;
|
import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO;
|
||||||
@ -81,7 +83,8 @@ public class MailTemplateController {
|
|||||||
@Operation(summary = "发送短信")
|
@Operation(summary = "发送短信")
|
||||||
@PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')")
|
@PreAuthorize("@ss.hasPermission('system:mail-template:send-mail')")
|
||||||
public CommonResult<Long> sendMail(@Valid @RequestBody MailTemplateSendReqVO sendReqVO) {
|
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()));
|
sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user