Skip to content

Commit 66b01f0

Browse files
committed
Revert "support sendemail about md file."
This reverts commit de508fb.
1 parent d085653 commit 66b01f0

File tree

3 files changed

+3
-42
lines changed

3 files changed

+3
-42
lines changed

dss-appconn/appconns/dss-sendemail-appconn/sendemail-appconn-core/src/main/scala/com/webank/wedatasphere/dss/appconn/sendemail/conf/SendEmailAppConnConfiguration.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,5 @@ object SendEmailAppConnConfiguration {
5252
val EMAIL_ENTITY_CLASSES = CommonVars("wds.dss.appconn.email.hook.entity.classes",
5353
"com.webank.wedatasphere.dss.appconn.sendemail.hook.entity.newvisualis.NewVisualisEmailInfo," +
5454
"com.webank.wedatasphere.dss.appconn.sendemail.hook.entity.visualis.VisualisEmailInfo," +
55-
"com.webank.wedatasphere.dss.appconn.sendemail.hook.entity.visualis.MetaBaseEmailInfo," +
56-
"com.webank.wedatasphere.dss.appconn.sendemail.hook.entity.mlss.MlssEmailInfo")
55+
"com.webank.wedatasphere.dss.appconn.sendemail.hook.entity.visualis.MetaBaseEmailInfo")
5756
}

dss-appconn/appconns/dss-sendemail-appconn/sendemail-appconn-core/src/main/scala/com/webank/wedatasphere/dss/appconn/sendemail/email/domain/MdAttachment.scala

Lines changed: 0 additions & 31 deletions
This file was deleted.

dss-appconn/appconns/dss-sendemail-appconn/sendemail-appconn-core/src/main/scala/com/webank/wedatasphere/dss/appconn/sendemail/emailcontent/parser/PictureEmailContentParser.scala

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ import java.awt.image.BufferedImage
2020
import java.io.{ByteArrayInputStream, ByteArrayOutputStream, InputStream}
2121
import java.util
2222
import java.util.{Base64, Iterator, UUID}
23-
import com.webank.wedatasphere.dss.appconn.sendemail.email.domain.{AbstractEmail, ExcelAttachment, MdAttachment, MultiContentEmail, PdfAttachment, PngAttachment}
23+
24+
import com.webank.wedatasphere.dss.appconn.sendemail.email.domain.{AbstractEmail, ExcelAttachment, MultiContentEmail, PdfAttachment, PngAttachment}
2425
import com.webank.wedatasphere.dss.appconn.sendemail.emailcontent.domain.PictureEmailContent
2526
import org.apache.linkis.common.conf.Configuration
26-
2727
import javax.imageio.{ImageIO, ImageReader}
2828
import org.apache.commons.codec.binary.Base64OutputStream
2929
import com.webank.wedatasphere.dss.appconn.sendemail.conf.SendEmailAppConnConfiguration._
3030
import com.webank.wedatasphere.dss.appconn.sendemail.exception.EmailSendFailedException
31-
3231
import javax.imageio.stream.ImageInputStream
3332
import org.apache.commons.io.IOUtils
3433
import org.apache.linkis.common.utils.Utils
@@ -47,12 +46,6 @@ object PictureEmailContentParser extends AbstractEmailContentParser[PictureEmail
4746
val decoder = Base64.getDecoder
4847
val byteArr = decoder.decode(imageStr)
4948
multiContentEmail.addAttachment(new PdfAttachment(pdfName, Base64.getEncoder.encodeToString(byteArr)))
50-
case "md" =>
51-
val mdUUID: String = UUID.randomUUID.toString
52-
val mdName = mdUUID + ".md"
53-
val decoder = Base64.getDecoder
54-
val byteArr = decoder.decode(imageStr)
55-
multiContentEmail.addAttachment(new MdAttachment(mdName, Base64.getEncoder.encodeToString(byteArr)))
5649
case "excel" =>
5750
//val excelUUID: String = UUID.randomUUID.toString
5851
val excelName = emailContent.getFileName + ".xlsx"

0 commit comments

Comments
 (0)