mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-23 23:45:08 +08:00
邮箱模块:vue3 邮件日志的管理
This commit is contained in:
@ -5,14 +5,19 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogPageReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.mail.vo.log.MailLogRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.mail.vo.template.MailTemplateRespVO;
|
||||
import cn.iocoder.yudao.module.system.convert.mail.MailLogConvert;
|
||||
import cn.iocoder.yudao.module.system.convert.mail.MailTemplateConvert;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailLogDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.mail.MailTemplateDO;
|
||||
import cn.iocoder.yudao.module.system.service.mail.MailLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -37,4 +42,13 @@ public class MailLogController {
|
||||
return success(MailLogConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@ApiOperation("获得邮箱日志")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@PreAuthorize("@ss.hasPermission('system:mail-log:query')")
|
||||
public CommonResult<MailLogRespVO> getMailTemplate(@RequestParam("id") Long id) {
|
||||
MailLogDO mailLogDO = mailLogService.getMailLog(id);
|
||||
return success(MailLogConvert.INSTANCE.convert(mailLogDO));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,4 +13,6 @@ public interface MailLogConvert {
|
||||
|
||||
PageResult<MailLogRespVO> convertPage(PageResult<MailLogDO> pageResult);
|
||||
|
||||
MailLogRespVO convert(MailLogDO bean);
|
||||
|
||||
}
|
||||
|
@ -24,6 +24,14 @@ public interface MailLogService {
|
||||
*/
|
||||
PageResult<MailLogDO> getMailLogPage(MailLogPageReqVO pageVO);
|
||||
|
||||
/**
|
||||
* 获得指定编号的邮件日志
|
||||
*
|
||||
* @param id 日志编号
|
||||
* @return 邮件日志
|
||||
*/
|
||||
MailLogDO getMailLog(Long id);
|
||||
|
||||
/**
|
||||
* 创建邮件日志
|
||||
*
|
||||
|
@ -35,6 +35,11 @@ public class MailLogServiceImpl implements MailLogService {
|
||||
return mailLogMapper.selectPage(pageVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MailLogDO getMailLog(Long id) {
|
||||
return mailLogMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long createMailLog(Long userId, Integer userType, String toMail,
|
||||
MailAccountDO account, MailTemplateDO template,
|
||||
|
Reference in New Issue
Block a user