Commit 3b42b7061000c66eea944bdc22b9f8ca2ec50fa0
1 parent
d2075d5c
邮箱账号管理
Showing
17 changed files
with
572 additions
and
0 deletions
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/SystemMailAccountController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail; | |
| 2 | + | |
| 3 | + | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 6 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.SystemMailAccountBaseVO; | |
| 8 | +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelCreateReqVO; | |
| 9 | +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelPageReqVO; | |
| 10 | +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelRespVO; | |
| 11 | +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelSimpleRespVO; | |
| 12 | +import cn.iocoder.yudao.module.system.convert.mail.SystemMailAccountConvert; | |
| 13 | +import cn.iocoder.yudao.module.system.convert.sms.SmsChannelConvert; | |
| 14 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.SystemMailAccountDO; | |
| 15 | +import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsChannelDO; | |
| 16 | +import cn.iocoder.yudao.module.system.service.mail.SystemMailAccountService; | |
| 17 | +import cn.iocoder.yudao.module.system.service.sms.SmsChannelService; | |
| 18 | +import io.swagger.annotations.Api; | |
| 19 | +import io.swagger.annotations.ApiImplicitParam; | |
| 20 | +import io.swagger.annotations.ApiOperation; | |
| 21 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 22 | +import org.springframework.web.bind.annotation.*; | |
| 23 | + | |
| 24 | +import javax.annotation.Resource; | |
| 25 | +import javax.validation.Valid; | |
| 26 | + | |
| 27 | +import java.util.Comparator; | |
| 28 | +import java.util.List; | |
| 29 | + | |
| 30 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | |
| 31 | + | |
| 32 | +/** | |
| 33 | + * <p> | |
| 34 | + * 前端控制器 | |
| 35 | + * </p> | |
| 36 | + * | |
| 37 | + * @author wangjingyi | |
| 38 | + * @since 2022-03-21 | |
| 39 | + */ | |
| 40 | +@Api(tags = "管理后台 - 邮件模板") | |
| 41 | +@RestController | |
| 42 | +@RequestMapping("/system-mail-account") | |
| 43 | +public class SystemMailAccountController { | |
| 44 | + @Resource | |
| 45 | + private SystemMailAccountService systemMailAccountService; | |
| 46 | + | |
| 47 | + @PostMapping("/create") | |
| 48 | + @ApiOperation("创建邮箱账号") | |
| 49 | + @PreAuthorize("@ss.hasPermission('system:system-mail-account:create')") | |
| 50 | + public CommonResult<Long> createMailAccount(@Valid @RequestBody SystemMailAccountBaseVO baseVO) { | |
| 51 | + return success(systemMailAccountService.create(baseVO)); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @PutMapping("/update") | |
| 55 | + @ApiOperation("修改邮箱账号") | |
| 56 | + @PreAuthorize("@ss.hasPermission('system:system-mail-account:update')") | |
| 57 | + public CommonResult<Boolean> updateMailAccount(@Valid @RequestBody SystemMailAccountBaseVO baseVO) { | |
| 58 | + systemMailAccountService.update(baseVO); | |
| 59 | + return success(true); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @DeleteMapping("/delete") | |
| 63 | + @ApiOperation("删除邮箱账号") | |
| 64 | + @PreAuthorize("@ss.hasPermission('system:system-mail-account:delete')") | |
| 65 | + public CommonResult<Boolean> deleteMailAccount(@Valid @RequestBody SystemMailAccountBaseVO baseVO) { | |
| 66 | + systemMailAccountService.delete(baseVO); | |
| 67 | + return success(true); | |
| 68 | + } | |
| 69 | + | |
| 70 | + @GetMapping("/get") | |
| 71 | + @ApiOperation("获得邮箱账号") | |
| 72 | + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) | |
| 73 | + @PreAuthorize("@ss.hasPermission('system:system-mail-account:get')") | |
| 74 | + public CommonResult<SystemMailAccountBaseVO> getMailAccount(@RequestParam("id") Long id) { | |
| 75 | + SystemMailAccountDO systemMailAccountDO = systemMailAccountService.getMailAccount(id); | |
| 76 | + return success(SystemMailAccountConvert.INSTANCE.convert(systemMailAccountDO)); | |
| 77 | + } | |
| 78 | + | |
| 79 | + @GetMapping("/page") | |
| 80 | + @ApiOperation("获得邮箱账号分页") | |
| 81 | + @PreAuthorize("@ss.hasPermission('system:system-mail-account:query')") | |
| 82 | + public CommonResult<PageResult<SystemMailAccountBaseVO>> getSmsChannelPage(@Valid PageParam pageParam) { | |
| 83 | + PageResult<SystemMailAccountDO> pageResult = systemMailAccountService.getMailAccountPage(pageParam); | |
| 84 | + return success(SystemMailAccountConvert.INSTANCE.convertPage(pageResult)); | |
| 85 | + } | |
| 86 | + | |
| 87 | + @GetMapping("/list-all-simple") | |
| 88 | + @ApiOperation(value = "获得邮箱账号精简列表") | |
| 89 | + public CommonResult<List<SystemMailAccountBaseVO>> getSimpleSmsChannels() { | |
| 90 | + List<SystemMailAccountDO> list = systemMailAccountService.getMailAccountList(); | |
| 91 | + // 排序后,返回给前端 | |
| 92 | + list.sort(Comparator.comparing(SystemMailAccountDO::getId)); | |
| 93 | + return success(SystemMailAccountConvert.INSTANCE.convertList02(list)); | |
| 94 | + } | |
| 95 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/SystemMailLogController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail; | |
| 2 | + | |
| 3 | + | |
| 4 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 5 | + | |
| 6 | +import org.springframework.web.bind.annotation.RestController; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * <p> | |
| 10 | + * 前端控制器 | |
| 11 | + * </p> | |
| 12 | + * | |
| 13 | + * @author wangjingyi | |
| 14 | + * @since 2022-03-21 | |
| 15 | + */ | |
| 16 | +@RestController | |
| 17 | +@RequestMapping("/system-mail-log") | |
| 18 | +public class SystemMailLogController { | |
| 19 | + | |
| 20 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/SystemMailTempleController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail; | |
| 2 | + | |
| 3 | + | |
| 4 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 5 | + | |
| 6 | +import org.springframework.web.bind.annotation.RestController; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * <p> | |
| 10 | + * 前端控制器 | |
| 11 | + * </p> | |
| 12 | + * | |
| 13 | + * @author wangjingyi | |
| 14 | + * @since 2022-03-21 | |
| 15 | + */ | |
| 16 | +@RestController | |
| 17 | +@RequestMapping("/system-mail-temple") | |
| 18 | +public class SystemMailTempleController { | |
| 19 | + | |
| 20 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/SystemMailAccountBaseVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 4 | +import io.swagger.annotations.ApiModelProperty; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@Data | |
| 8 | +public class SystemMailAccountBaseVO { | |
| 9 | + @ApiModelProperty(value = "来源" , required = true , example = "yudaoyuanma") | |
| 10 | + private String from; | |
| 11 | + | |
| 12 | + @ApiModelProperty(value = "用户名" , required = true , example = "yudao") | |
| 13 | + private String username; | |
| 14 | + | |
| 15 | + @ApiModelProperty(value = "密码" , required = true , example = "123456") | |
| 16 | + private String password; | |
| 17 | + | |
| 18 | + @ApiModelProperty(value = "网站" , required = true , example = "www.iocoder.cn") | |
| 19 | + private String host; | |
| 20 | + | |
| 21 | + @ApiModelProperty(value = "端口" , required = true , example = "80") | |
| 22 | + private String port; | |
| 23 | + | |
| 24 | + @ApiModelProperty(value = "是否开启ssl" , required = true , example = "2") | |
| 25 | + private Integer sslEnable; | |
| 26 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/convert/mail/SystemMailAccountConvert.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.convert.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.SystemMailAccountBaseVO; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelRespVO; | |
| 6 | +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelSimpleRespVO; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.SystemMailAccountDO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsChannelDO; | |
| 9 | +import org.mapstruct.Mapper; | |
| 10 | +import org.mapstruct.factory.Mappers; | |
| 11 | + | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +@Mapper | |
| 15 | +public interface SystemMailAccountConvert { | |
| 16 | + SystemMailAccountConvert INSTANCE = Mappers.getMapper(SystemMailAccountConvert.class); | |
| 17 | + | |
| 18 | + SystemMailAccountDO convert (SystemMailAccountBaseVO systemMailAccountBaseVO); | |
| 19 | + | |
| 20 | + SystemMailAccountBaseVO convert (SystemMailAccountDO systemMailAccountDO); | |
| 21 | + | |
| 22 | + PageResult<SystemMailAccountBaseVO> convertPage(PageResult<SystemMailAccountDO> pageResult); | |
| 23 | + | |
| 24 | + List<SystemMailAccountBaseVO> convertList02(List<SystemMailAccountDO> list); | |
| 25 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/SystemMailAccountDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.dataobject.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 4 | +import com.baomidou.mybatisplus.annotation.IdType; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 7 | +import java.io.Serializable; | |
| 8 | + | |
| 9 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 10 | +import io.swagger.annotations.ApiModel; | |
| 11 | +import io.swagger.annotations.ApiModelProperty; | |
| 12 | +import lombok.Data; | |
| 13 | +import lombok.EqualsAndHashCode; | |
| 14 | +import lombok.experimental.Accessors; | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * <p> | |
| 18 | + * | |
| 19 | + * </p> | |
| 20 | + * | |
| 21 | + * @author wangjingyi | |
| 22 | + * @since 2022-03-21 | |
| 23 | + */ | |
| 24 | +@Data | |
| 25 | +@EqualsAndHashCode(callSuper = false) | |
| 26 | +@Accessors(chain = true) | |
| 27 | +@ApiModel(value="SystemMailAccount对象", description="") | |
| 28 | +@TableName(value = "system_mail_account", autoResultMap = true) | |
| 29 | +public class SystemMailAccountDO extends BaseDO implements Serializable { | |
| 30 | + | |
| 31 | + private static final long serialVersionUID = 1L; | |
| 32 | + @TableId | |
| 33 | + private Long id; | |
| 34 | + | |
| 35 | + @TableField("from") | |
| 36 | + private String from; | |
| 37 | + | |
| 38 | + @TableField("username") | |
| 39 | + private String username; | |
| 40 | + | |
| 41 | + @TableField("password") | |
| 42 | + private String password; | |
| 43 | + | |
| 44 | + @TableField("host") | |
| 45 | + private String host; | |
| 46 | + | |
| 47 | + @TableField("port") | |
| 48 | + private String port; | |
| 49 | + | |
| 50 | + @TableField("sslEnable") | |
| 51 | + private Integer sslEnable; | |
| 52 | + | |
| 53 | + | |
| 54 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/SystemMailLogDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.dataobject.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 4 | +import com.baomidou.mybatisplus.annotation.IdType; | |
| 5 | +import java.sql.Timestamp; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 7 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 8 | +import java.io.Serializable; | |
| 9 | +import io.swagger.annotations.ApiModel; | |
| 10 | +import io.swagger.annotations.ApiModelProperty; | |
| 11 | +import lombok.Data; | |
| 12 | +import lombok.EqualsAndHashCode; | |
| 13 | +import lombok.experimental.Accessors; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * <p> | |
| 17 | + * | |
| 18 | + * </p> | |
| 19 | + * | |
| 20 | + * @author wangjingyi | |
| 21 | + * @since 2022-03-21 | |
| 22 | + */ | |
| 23 | +@Data | |
| 24 | +@EqualsAndHashCode(callSuper = false) | |
| 25 | +@Accessors(chain = true) | |
| 26 | +@ApiModel(value="SystemMailLog对象", description="") | |
| 27 | +public class SystemMailLogDO extends BaseDO implements Serializable { | |
| 28 | + | |
| 29 | + private static final long serialVersionUID = 1L; | |
| 30 | + @TableId | |
| 31 | + private Long id; | |
| 32 | + | |
| 33 | + @TableField("account_code") | |
| 34 | + private String accountCode; | |
| 35 | + | |
| 36 | + @TableField("from") | |
| 37 | + private String from; | |
| 38 | + | |
| 39 | + @TableField("temple_code") | |
| 40 | + private String templeCode; | |
| 41 | + | |
| 42 | + @TableField("title") | |
| 43 | + private String title; | |
| 44 | + | |
| 45 | + @TableField("content") | |
| 46 | + private String content; | |
| 47 | + | |
| 48 | + @TableField("to") | |
| 49 | + private String to; | |
| 50 | + | |
| 51 | + @TableField("sendTime") | |
| 52 | + private Timestamp sendTime; | |
| 53 | + | |
| 54 | + @TableField("sendStatus") | |
| 55 | + private String sendStatus; | |
| 56 | + | |
| 57 | + @TableField("sendResult") | |
| 58 | + private String sendResult; | |
| 59 | + | |
| 60 | + | |
| 61 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/SystemMailTempleDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.dataobject.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 4 | +import com.baomidou.mybatisplus.annotation.IdType; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 7 | +import java.io.Serializable; | |
| 8 | +import io.swagger.annotations.ApiModel; | |
| 9 | +import io.swagger.annotations.ApiModelProperty; | |
| 10 | +import lombok.Data; | |
| 11 | +import lombok.EqualsAndHashCode; | |
| 12 | +import lombok.experimental.Accessors; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * <p> | |
| 16 | + * | |
| 17 | + * </p> | |
| 18 | + * | |
| 19 | + * @author wangjingyi | |
| 20 | + * @since 2022-03-21 | |
| 21 | + */ | |
| 22 | +@Data | |
| 23 | +@EqualsAndHashCode(callSuper = false) | |
| 24 | +@Accessors(chain = true) | |
| 25 | +@ApiModel(value="SystemMailTemple对象", description="") | |
| 26 | +public class SystemMailTempleDO extends BaseDO implements Serializable { | |
| 27 | + | |
| 28 | + private static final long serialVersionUID = 1L; | |
| 29 | + @TableId | |
| 30 | + private Long id; | |
| 31 | + | |
| 32 | + @TableField("name") | |
| 33 | + private String name; | |
| 34 | + | |
| 35 | + @TableField("code") | |
| 36 | + private String code; | |
| 37 | + | |
| 38 | + @TableField("username") | |
| 39 | + private String username; | |
| 40 | + | |
| 41 | + @TableField("title") | |
| 42 | + private String title; | |
| 43 | + | |
| 44 | + @TableField("content") | |
| 45 | + private String content; | |
| 46 | + | |
| 47 | + @TableField("status") | |
| 48 | + private String status; | |
| 49 | + | |
| 50 | + @TableField("remark") | |
| 51 | + private String remark; | |
| 52 | + | |
| 53 | + | |
| 54 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/SystemMailAccountMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.mysql.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | |
| 6 | +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; | |
| 7 | +import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelPageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.SystemMailAccountDO; | |
| 9 | +import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsChannelDO; | |
| 10 | +import org.apache.ibatis.annotations.Mapper; | |
| 11 | + | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * Mapper 接口 | |
| 16 | + * </p> | |
| 17 | + * | |
| 18 | + * @author wangjingyi | |
| 19 | + * @since 2022-03-21 | |
| 20 | + */ | |
| 21 | +@Mapper | |
| 22 | +public interface SystemMailAccountMapper extends BaseMapperX<SystemMailAccountDO> { | |
| 23 | + | |
| 24 | + default PageResult<SystemMailAccountDO> selectPage(PageParam pageParam) { | |
| 25 | + return selectPage(pageParam, new QueryWrapperX<SystemMailAccountDO>()); | |
| 26 | + } | |
| 27 | + | |
| 28 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/SystemMailLogMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.mysql.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.SystemMailLogDO; | |
| 4 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * <p> | |
| 8 | + * Mapper 接口 | |
| 9 | + * </p> | |
| 10 | + * | |
| 11 | + * @author wangjingyi | |
| 12 | + * @since 2022-03-21 | |
| 13 | + */ | |
| 14 | +public interface SystemMailLogMapper extends BaseMapper<SystemMailLogDO> { | |
| 15 | + | |
| 16 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/SystemMailTempleMapper.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.dal.mysql.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.SystemMailTempleDO; | |
| 4 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * <p> | |
| 8 | + * Mapper 接口 | |
| 9 | + * </p> | |
| 10 | + * | |
| 11 | + * @author wangjingyi | |
| 12 | + * @since 2022-03-21 | |
| 13 | + */ | |
| 14 | +public interface SystemMailTempleMapper extends BaseMapper<SystemMailTempleDO> { | |
| 15 | + | |
| 16 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/mail/SystemMailAccountService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.SystemMailAccountBaseVO; | |
| 6 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.SystemMailAccountDO; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 服务类 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author wangjingyi | |
| 16 | + * @since 2022-03-21 | |
| 17 | + */ | |
| 18 | +public interface SystemMailAccountService { | |
| 19 | + | |
| 20 | + Long create(SystemMailAccountBaseVO baseVO); | |
| 21 | + | |
| 22 | + String update(SystemMailAccountBaseVO baseVO); | |
| 23 | + | |
| 24 | + String delete(SystemMailAccountBaseVO baseVO); | |
| 25 | + | |
| 26 | + SystemMailAccountDO getMailAccount(Long id); | |
| 27 | + | |
| 28 | + PageResult<SystemMailAccountDO> getMailAccountPage(PageParam pageParam); | |
| 29 | + | |
| 30 | + List<SystemMailAccountDO> getMailAccountList(); | |
| 31 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/mail/SystemMailLogService.java
0 → 100644
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/mail/SystemMailTempleService.java
0 → 100644
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/mail/impl/SystemMailAccountServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail.impl; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.module.system.controller.admin.mail.vo.account.SystemMailAccountBaseVO; | |
| 6 | +import cn.iocoder.yudao.module.system.convert.mail.SystemMailAccountConvert; | |
| 7 | +import cn.iocoder.yudao.module.system.dal.dataobject.mail.SystemMailAccountDO; | |
| 8 | +import cn.iocoder.yudao.module.system.dal.mysql.mail.SystemMailAccountMapper; | |
| 9 | +import cn.iocoder.yudao.module.system.service.mail.SystemMailAccountService; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | + | |
| 12 | +import javax.annotation.Resource; | |
| 13 | +import java.util.List; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * <p> | |
| 17 | + * 服务实现类 | |
| 18 | + * </p> | |
| 19 | + * | |
| 20 | + * @author wangjingyi | |
| 21 | + * @since 2022-03-21 | |
| 22 | + */ | |
| 23 | +@Service | |
| 24 | +public class SystemMailAccountServiceImpl implements SystemMailAccountService { | |
| 25 | + @Resource | |
| 26 | + SystemMailAccountMapper systemMailAccountMapper; | |
| 27 | + @Override | |
| 28 | + public Long create(SystemMailAccountBaseVO baseVO) { | |
| 29 | + SystemMailAccountDO systemMailAccountDO = SystemMailAccountConvert.INSTANCE.convert(baseVO); | |
| 30 | + systemMailAccountMapper.insert(systemMailAccountDO); | |
| 31 | + return systemMailAccountDO.getId(); | |
| 32 | + } | |
| 33 | + | |
| 34 | + @Override | |
| 35 | + public String update(SystemMailAccountBaseVO baseVO) { | |
| 36 | + SystemMailAccountDO systemMailAccountDO = SystemMailAccountConvert.INSTANCE.convert(baseVO); | |
| 37 | + systemMailAccountMapper.updateById(systemMailAccountDO); | |
| 38 | + return null; | |
| 39 | + } | |
| 40 | + | |
| 41 | + @Override | |
| 42 | + public String delete(SystemMailAccountBaseVO baseVO) { | |
| 43 | + SystemMailAccountDO systemMailAccountDO = SystemMailAccountConvert.INSTANCE.convert(baseVO); | |
| 44 | + systemMailAccountMapper.deleteById(systemMailAccountDO); | |
| 45 | + return null; | |
| 46 | + } | |
| 47 | + | |
| 48 | + @Override | |
| 49 | + public SystemMailAccountDO getMailAccount(Long id) { | |
| 50 | + return systemMailAccountMapper.selectById(id); | |
| 51 | + } | |
| 52 | + | |
| 53 | + @Override | |
| 54 | + public PageResult<SystemMailAccountDO> getMailAccountPage(PageParam pageParam) { | |
| 55 | + return systemMailAccountMapper.selectPage(pageParam); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @Override | |
| 59 | + public List<SystemMailAccountDO> getMailAccountList() { | |
| 60 | + return systemMailAccountMapper.selectList(); | |
| 61 | + } | |
| 62 | + | |
| 63 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/mail/impl/SystemMailLogServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail.impl; | |
| 2 | + | |
| 3 | + | |
| 4 | +import cn.iocoder.yudao.module.system.service.mail.SystemMailLogService; | |
| 5 | +import org.springframework.stereotype.Service; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * 服务实现类 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author wangjingyi | |
| 13 | + * @since 2022-03-21 | |
| 14 | + */ | |
| 15 | +@Service | |
| 16 | +public class SystemMailLogServiceImpl implements SystemMailLogService { | |
| 17 | + | |
| 18 | +} | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/mail/impl/SystemMailTempleServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.system.service.mail.impl; | |
| 2 | + | |
| 3 | + | |
| 4 | +import cn.iocoder.yudao.module.system.service.mail.SystemMailTempleService; | |
| 5 | +import org.springframework.stereotype.Service; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * 服务实现类 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author wangjingyi | |
| 13 | + * @since 2022-03-21 | |
| 14 | + */ | |
| 15 | +@Service | |
| 16 | +public class SystemMailTempleServiceImpl implements SystemMailTempleService { | |
| 17 | + | |
| 18 | +} | ... | ... |