Prechádzať zdrojové kódy

增加修改邮件内容接口

chenkq 1 mesiac pred
rodič
commit
73cd7e2335

+ 1 - 1
storlead-mail/storlead-mail-mkt/src/main/java/com/storlead/sales/mail/mkt/pojo/MktEditMailContentDTO.java

@@ -9,7 +9,7 @@ import lombok.Data;
 public class MktEditMailContentDTO {
 
     @ApiModelProperty(value = "邮件ID", required = true)
-    private Long id;
+    private Long mailId;
 
     @ApiModelProperty(value = "正文HTML", required = true)
     private String content;

+ 2 - 2
storlead-mail/storlead-mail-mkt/src/main/java/com/storlead/sales/mail/mkt/service/impl/MktMailMessageServiceImpl.java

@@ -194,13 +194,13 @@ public class MktMailMessageServiceImpl extends MyBaseServiceImpl<MktMailMessageM
     @Override
     @Transactional(rollbackFor = Exception.class)
     public MktMailMessageEntity updateContent(MktEditMailContentDTO dto, Long operatorId) {
-        if (dto == null || dto.getId() == null) {
+        if (dto == null || dto.getMailId() == null) {
             throw new WebException("邮件ID不能为空");
         }
         if (dto.getContent() == null) {
             throw new WebException("邮件内容不能为空");
         }
-        MktMailMessageEntity entity = resolveWritableEntity(dto.getId(), operatorId);
+        MktMailMessageEntity entity = resolveWritableEntity(dto.getMailId(), operatorId);
         LambdaUpdateWrapper<MktMailMessageEntity> update = new LambdaUpdateWrapper<>();
         update.eq(MktMailMessageEntity::getId, entity.getId());
         update.set(MktMailMessageEntity::getContent, dto.getContent());