mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-02-08 14:44:57 +08:00
498 解决解决 Set access token expire time to 0 报错问题和邮件发送用户编号为空问题
This commit is contained in:
parent
933bb188bd
commit
16dd86a8db
@ -2,8 +2,6 @@ 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;
|
||||||
@ -20,6 +18,7 @@ import javax.validation.Valid;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 邮件模版")
|
@Tag(name = "管理后台 - 邮件模版")
|
||||||
@RestController
|
@RestController
|
||||||
@ -83,8 +82,7 @@ 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) {
|
||||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
return success(mailSendService.sendSingleMailToAdmin(sendReqVO.getMail(), getLoginUserId(),
|
||||||
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