2 Коммиты e580f7b1b2 ... 5868b39abb

Автор SHA1 Сообщение Дата
  18118724055@163.com 5868b39abb Merge remote-tracking branch 'origin/master' 3 недель назад
  18118724055@163.com e608e11769 增加拒收标记,拆分CRM邮箱模块与邮件耦合,远程调用到独立邮件模块 3 недель назад

+ 337 - 0
java/storlead-mail/storlead-mail-api/src/main/java/com/storlead/mail/controller/crm/MailApiController.java

@@ -0,0 +1,337 @@
+package com.storlead.mail.controller.crm;
+
+import com.storlead.framework.common.result.Result;
+import com.storlead.mail.pojo.AttachmentDTO;
+import com.storlead.mail.pojo.MailListDTO;
+import com.storlead.mail.pojo.MailMoveDTO;
+import com.storlead.mail.pojo.QueryEmailAddressDTO;
+import com.storlead.mail.pojo.SendMailDTO;
+import com.storlead.mail.pojo.dto.MailDTO;
+import com.storlead.mail.webclient.client.CrmMailRemoteClient;
+import com.storlead.mail.webclient.support.MailRemoteResponseWriter;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * CRM 邮件主流程(路径保持 /mail/**,转发独立邮件服务 /crm/**)。
+ */
+@RestController
+@RequestMapping("/mail")
+@Api(tags = "020.邮件管理相关接口")
+@Log4j2
+public class MailApiController {
+
+    @Resource
+    private CrmMailRemoteClient crmMailRemoteClient;
+
+    @PostMapping(value = "/page_list")
+    @ApiOperation(value = "获取邮件")
+    public Result<?> pageList(MailDTO dto) {
+        return crmMailRemoteClient.pageList(dto);
+    }
+
+    @PostMapping(value = "/get_no_read_count")
+    @ApiOperation(value = "获取未读邮件")
+    public Result<?> getNoReadCount() {
+        return crmMailRemoteClient.getNoReadCount();
+    }
+
+    @PostMapping(value = "/send_mail")
+    @ApiOperation(value = "发送邮件")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> sendMail(SendMailDTO dto) {
+        return crmMailRemoteClient.sendMail(dto);
+    }
+
+    @PostMapping(value = "/asyn_send_mail")
+    @ApiOperation(value = "发送邮件")
+    public Result<?> asynSendMail(SendMailDTO dto) {
+        return crmMailRemoteClient.asynSendMail(dto);
+    }
+
+    @PostMapping(value = "/save_draft")
+    @ApiOperation(value = "保存草稿")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> saveDraft(SendMailDTO dto) {
+        return crmMailRemoteClient.saveDraft(dto);
+    }
+
+    @PostMapping(value = "/receive_mail")
+    @ApiOperation(value = "接收邮件")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> receiveMail() {
+        return crmMailRemoteClient.receiveMail();
+    }
+
+    @PostMapping(value = "/download_mail_eml_zip")
+    @ApiOperation(value = "下载邮件")
+    public void downloadMailEmlZip(MailDTO dto, HttpServletResponse response) {
+        MailRemoteResponseWriter.write(response, crmMailRemoteClient.downloadMailEmlZip(dto));
+    }
+
+    @PostMapping(value = "/download_mail_eml")
+    @ApiOperation(value = "下载邮件")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public void downloadMail(MailDTO dto, HttpServletResponse response) {
+        MailRemoteResponseWriter.write(response, crmMailRemoteClient.downloadMailEml(dto));
+    }
+
+    @PostMapping(value = "/getMailDetail")
+    @ApiOperation(value = "获取邮件详情")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> getMailDetail(Long mailId, Long customerId) {
+        return crmMailRemoteClient.getMailDetail(mailId, customerId);
+    }
+
+    @PostMapping(value = "/mv_mail_box")
+    @ApiOperation(value = "移动邮件")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> mvMailBox(MailMoveDTO dto) {
+        return crmMailRemoteClient.mvMailBox(dto);
+    }
+
+    @PostMapping(value = "/get_contact_mail")
+    @ApiOperation(value = "获取同事邮箱")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> contactMailAccount() {
+        return crmMailRemoteClient.contactMailAccount();
+    }
+
+    @PostMapping(value = "/get_customer_liaison")
+    @ApiOperation(value = "获取客户联系人")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> customerLiaison() {
+        return crmMailRemoteClient.customerLiaison();
+    }
+
+    @PostMapping(value = "/get_mail_customer_liaison")
+    @ApiOperation(value = "获取客户联系人")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> getMailCustomerLiaison(@RequestBody QueryEmailAddressDTO dto) {
+        return crmMailRemoteClient.getMailCustomerLiaison(dto);
+    }
+
+    @PostMapping(value = "/mark_trash")
+    @ApiOperation(value = "垃圾箱")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> mvTrashBox(MailMoveDTO dto) {
+        return crmMailRemoteClient.markTrash(dto);
+    }
+
+    @ApiOperation(value = "彻底删除")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    @PostMapping("/deleteIds")
+    public Result<?> deleteIds(Long[] ids) {
+        return crmMailRemoteClient.deleteIds(ids);
+    }
+
+    @ApiOperation(value = "彻底删除草稿")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    @PostMapping("/deleteDraftIds")
+    public Result<?> deleteDraftIds(Long[] ids) {
+        return crmMailRemoteClient.deleteDraftIds(ids);
+    }
+
+    @PostMapping(value = "/get_mail_detial")
+    @ApiOperation(value = "获取详情接口")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> getMailDetial(Long mailId) {
+        return crmMailRemoteClient.getMailDetial(mailId);
+    }
+
+    @PostMapping(value = "/mv_custom_folder")
+    @ApiOperation(value = "迁移邮件到自定义文件夹", notes = "迁移邮件到自定义文件夹")
+    public Result<?> getMailPortConfig(Long[] mailIds, Long folderId) {
+        return crmMailRemoteClient.mvCustomFolder(mailIds, folderId);
+    }
+
+    @PostMapping(value = "/del_custom_folder_mail")
+    @ApiOperation(value = "获取邮箱端口配置", notes = "获取邮箱端口配置")
+    public Result<?> delCustomFolderMail(Long[] mailIds) {
+        return crmMailRemoteClient.delCustomFolderMail(mailIds);
+    }
+
+    @PostMapping(value = "/mark_star")
+    @ApiOperation(value = "星标")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> takeStar(MailMoveDTO dto) {
+        return crmMailRemoteClient.markStar(dto);
+    }
+
+    @PostMapping(value = "/mark_read")
+    @ApiOperation(value = "已读未读标记")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> markRead(MailMoveDTO dto) {
+        return crmMailRemoteClient.markRead(dto);
+    }
+
+    @PostMapping(value = "/mark_reply_msg_id")
+    @ApiOperation(value = "标记陌生客户回复不回复")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> markReplyMsgId(MailMoveDTO dto) {
+        return crmMailRemoteClient.markReplyMsgId(dto);
+    }
+
+    @PostMapping(value = "/mark_all_read")
+    @ApiOperation(value = "已读未读标记")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> markAllRead() {
+        return crmMailRemoteClient.markAllRead();
+    }
+
+    @PostMapping(value = "/list_mail_attachment")
+    @ApiOperation(value = "邮件附件")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> listMailAttachment(AttachmentDTO dto) {
+        return crmMailRemoteClient.listMailAttachment(dto);
+    }
+
+    @PostMapping(value = "/download_zip")
+    @ApiOperation(value = "打包下载")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public void downloadZip(AttachmentDTO dto, HttpServletResponse response) {
+        MailRemoteResponseWriter.write(response, crmMailRemoteClient.downloadZip(dto));
+    }
+
+    @PostMapping(value = "/download_url")
+    @ApiOperation(value = "下载", notes = "下载")
+    public Result<?> downloadUrl(Long attachmentId) throws IOException {
+        return crmMailRemoteClient.downloadUrl(attachmentId);
+    }
+
+    @PostMapping(value = "/draft_download_url")
+    @ApiOperation(value = "下载", notes = "下载")
+    public Result<?> draft_download(Long attachmentId) throws IOException {
+        return crmMailRemoteClient.draftDownloadUrl(attachmentId);
+    }
+
+    @PostMapping(value = "/draft_download")
+    @ApiOperation(value = "下载", notes = "下载")
+    public void draft_download(Long attachmentId, HttpServletResponse response) throws IOException {
+        MailRemoteResponseWriter.write(response, crmMailRemoteClient.draftDownload(attachmentId));
+    }
+
+    @RequestMapping(value = "/download")
+    @ApiOperation(value = "下载", notes = "下载")
+    public void download(Long attachmentId, HttpServletResponse response) throws IOException {
+        MailRemoteResponseWriter.write(response, crmMailRemoteClient.download(attachmentId));
+    }
+
+    @PostMapping(value = "/mail_port_config")
+    @ApiOperation(value = "获取邮箱端口配置", notes = "获取邮箱端口配置")
+    public Result<?> getMailPortConfig(String mailAccount) throws IOException {
+        return crmMailRemoteClient.mailPortConfig(mailAccount);
+    }
+
+    @PostMapping(value = "/get_unread_count")
+    @ApiOperation(value = "获取邮箱未读数", notes = "获取邮箱未读数")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> getUnReadCount() {
+        return crmMailRemoteClient.getUnReadCount();
+    }
+
+    @PostMapping(value = "/get_new_mail")
+    @ApiOperation(value = "获取未读和最新的邮件", notes = "获取邮箱未读数")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> getNewMail() {
+        return crmMailRemoteClient.getNewMail();
+    }
+
+    @PostMapping(value = "/bind_mail_customer")
+    @ApiOperation(value = "修改客户关系")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> repairMailCustomer(Long userId) {
+        return crmMailRemoteClient.bindMailCustomer(userId);
+    }
+
+    @PostMapping(value = "/bind_mail_customer_all")
+    @ApiOperation(value = "修改客户关系")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> repairMailCustomerAll() {
+        return crmMailRemoteClient.bindMailCustomerAll();
+    }
+
+    @PostMapping(value = "/email_list")
+    @ApiOperation(value = "客户列表-获取邮件")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> emailList(MailListDTO dto) {
+        return crmMailRemoteClient.emailList(dto);
+    }
+
+    @PostMapping(value = "/import_mail_eml")
+    @ApiOperation(value = "导入邮件eml")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> importMailEml(HttpServletResponse response,
+                                   @RequestParam(value = "file", required = true) MultipartFile file) {
+        return crmMailRemoteClient.importMailEml(file);
+    }
+
+    @PostMapping(value = "/import_mail_eml_zip")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "", response = Result.class)
+    })
+    public Result<?> importMailEmlZip(HttpServletResponse response,
+                                      @RequestParam(value = "file", required = true) MultipartFile file,
+                                      String mobileNo) {
+        return crmMailRemoteClient.importMailEmlZip(file, mobileNo);
+    }
+}

+ 72 - 3
java/storlead-mail/storlead-mail-api/src/main/java/com/storlead/mail/webclient/client/CrmMailRemoteClient.java

@@ -2,21 +2,36 @@ package com.storlead.mail.webclient.client;
 
 import com.storlead.framework.common.result.Result;
 import com.storlead.mail.pojo.AttachmentDTO;
-import com.storlead.mail.pojo.MailDTO;
+import com.storlead.mail.pojo.MailListDTO;
 import com.storlead.mail.pojo.MailMoveDTO;
+import com.storlead.mail.pojo.QueryEmailAddressDTO;
 import com.storlead.mail.pojo.SendMailDTO;
+import com.storlead.mail.pojo.dto.MailDTO;
 import com.storlead.mail.webclient.constant.MailRemoteApiConstants;
 import com.storlead.mail.webclient.support.MailRemoteHttpSupport;
 import lombok.RequiredArgsConstructor;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
- * CRM 邮件主流程远程客户端,对齐 B 服务 {@code /mail/**}。
+ * CRM 邮件主流程远程客户端,对齐 B 服务 {@code /crm/**}。
  */
 @RequiredArgsConstructor
 public class CrmMailRemoteClient {
 
     private final MailRemoteHttpSupport http;
 
+    public Result<?> pageList(MailDTO dto) {
+        return http.postForm(MailRemoteApiConstants.CRM_PAGE_LIST, dto);
+    }
+
+    public Result<?> getNoReadCount() {
+        return http.postForm(MailRemoteApiConstants.CRM_GET_NO_READ_COUNT, http.formOf());
+    }
+
     public Result<?> sendMail(SendMailDTO dto) {
         return http.postForm(MailRemoteApiConstants.CRM_SEND_MAIL, dto);
     }
@@ -41,10 +56,27 @@ public class CrmMailRemoteClient {
         return http.postForBytes(MailRemoteApiConstants.CRM_DOWNLOAD_MAIL_EML, http.toForm(dto));
     }
 
+    public Result<?> getMailDetail(Long mailId, Long customerId) {
+        return http.postForm(MailRemoteApiConstants.CRM_GET_MAIL_DETAIL_FULL,
+                http.formOf("mailId", mailId, "customerId", customerId));
+    }
+
     public Result<?> mvMailBox(MailMoveDTO dto) {
         return http.postForm(MailRemoteApiConstants.CRM_MV_MAIL_BOX, dto);
     }
 
+    public Result<?> contactMailAccount() {
+        return http.postForm(MailRemoteApiConstants.CRM_GET_CONTACT_MAIL, http.formOf());
+    }
+
+    public Result<?> customerLiaison() {
+        return http.postForm(MailRemoteApiConstants.CRM_GET_CUSTOMER_LIAISON, http.formOf());
+    }
+
+    public Result<?> getMailCustomerLiaison(QueryEmailAddressDTO dto) {
+        return http.postJson(MailRemoteApiConstants.CRM_GET_MAIL_CUSTOMER_LIAISON, dto);
+    }
+
     public Result<?> markTrash(MailMoveDTO dto) {
         return http.postForm(MailRemoteApiConstants.CRM_MARK_TRASH, dto);
     }
@@ -57,7 +89,7 @@ public class CrmMailRemoteClient {
         return http.postForm(MailRemoteApiConstants.CRM_DELETE_DRAFT_IDS, http.formOf("ids", ids));
     }
 
-    public Result<?> getMailDetail(Long mailId) {
+    public Result<?> getMailDetial(Long mailId) {
         return http.postForm(MailRemoteApiConstants.CRM_GET_MAIL_DETAIL, http.formOf("mailId", mailId));
     }
 
@@ -109,4 +141,41 @@ public class CrmMailRemoteClient {
     public byte[] download(Long attachmentId) {
         return http.postForBytes(MailRemoteApiConstants.CRM_DOWNLOAD, http.formOf("attachmentId", attachmentId));
     }
+
+    public Result<?> mailPortConfig(String mailAccount) {
+        return http.postForm(MailRemoteApiConstants.COMMON_MAIL_PORT_CONFIG, http.formOf("mailAccount", mailAccount));
+    }
+
+    public Result<?> getUnReadCount() {
+        return http.postForm(MailRemoteApiConstants.CRM_GET_UNREAD_COUNT, http.formOf());
+    }
+
+    public Result<?> getNewMail() {
+        return http.postForm(MailRemoteApiConstants.CRM_GET_NEW_MAIL, http.formOf());
+    }
+
+    public Result<?> bindMailCustomer(Long userId) {
+        return http.postForm(MailRemoteApiConstants.CRM_BIND_MAIL_CUSTOMER, http.formOf("userId", userId));
+    }
+
+    public Result<?> bindMailCustomerAll() {
+        return http.postForm(MailRemoteApiConstants.CRM_BIND_MAIL_CUSTOMER_ALL, http.formOf());
+    }
+
+    public Result<?> emailList(MailListDTO dto) {
+        return http.postForm(MailRemoteApiConstants.CRM_EMAIL_LIST, dto);
+    }
+
+    public Result<?> importMailEml(MultipartFile file) {
+        return http.postFile(MailRemoteApiConstants.CRM_IMPORT_MAIL_EML, "file", file, null);
+    }
+
+    public Result<?> importMailEmlZip(MultipartFile file, String mobileNo) {
+        Map<String, String> extra = new HashMap<>(2);
+        if (mobileNo != null) {
+            extra.put("mobileNo", mobileNo);
+        }
+        return http.postFile(MailRemoteApiConstants.CRM_IMPORT_MAIL_EML_ZIP, "file", file,
+                extra.isEmpty() ? Collections.emptyMap() : extra);
+    }
 }

+ 40 - 1
java/storlead-mail/storlead-mail-api/src/main/java/com/storlead/mail/webclient/constant/MailRemoteApiConstants.java

@@ -114,7 +114,13 @@ public final class MailRemoteApiConstants {
     /** 测试营销邮箱连通性(以 SMTP 为主),JSON:SmtpPopSettingsEntity */
     public static final String MKT_ACCOUNT_TEST_CONNECT = "/mkt/account/test_connect";
 
-    // ========================= CRM 邮件主流程 /mail =========================
+    // ========================= CRM 邮件主流程 /crm =========================
+
+    /** 邮件分页,form:MailDTO */
+    public static final String CRM_PAGE_LIST = "/crm/page_list";
+
+    /** 未读邮件数量(旧接口 get_no_read_count) */
+    public static final String CRM_GET_NO_READ_COUNT = "/crm/get_no_read_count";
 
     /** 同步发送邮件,form:SendMailDTO */
     public static final String CRM_SEND_MAIL = "/crm/send_mail";
@@ -134,9 +140,21 @@ public final class MailRemoteApiConstants {
     /** 下载单封邮件 eml,form:MailDTO,返回二进制 */
     public static final String CRM_DOWNLOAD_MAIL_EML = "/crm/download_mail_eml";
 
+    /** 邮件详情(含客户),参数:mailId、customerId */
+    public static final String CRM_GET_MAIL_DETAIL_FULL = "/crm/getMailDetail";
+
     /** 移动邮件到指定箱,form:MailMoveDTO */
     public static final String CRM_MV_MAIL_BOX = "/crm/mv_mail_box";
 
+    /** 同事邮箱列表 */
+    public static final String CRM_GET_CONTACT_MAIL = "/crm/get_contact_mail";
+
+    /** 客户联系人邮箱列表 */
+    public static final String CRM_GET_CUSTOMER_LIAISON = "/crm/get_customer_liaison";
+
+    /** 分页查询客户联系人邮箱,JSON:QueryEmailAddressDTO */
+    public static final String CRM_GET_MAIL_CUSTOMER_LIAISON = "/crm/get_mail_customer_liaison";
+
     /** 标记/移入垃圾箱,form:MailMoveDTO */
     public static final String CRM_MARK_TRASH = "/crm/mark_trash";
 
@@ -185,6 +203,27 @@ public final class MailRemoteApiConstants {
     /** 下载正式附件文件流,参数:attachmentId */
     public static final String CRM_DOWNLOAD = "/crm/download";
 
+    /** 未读汇总 get_unread_count */
+    public static final String CRM_GET_UNREAD_COUNT = "/crm/get_unread_count";
+
+    /** 未读与最新邮件 tip */
+    public static final String CRM_GET_NEW_MAIL = "/crm/get_new_mail";
+
+    /** 按用户重绑邮件客户关系,参数:userId */
+    public static final String CRM_BIND_MAIL_CUSTOMER = "/crm/bind_mail_customer";
+
+    /** 全量重绑邮件客户关系 */
+    public static final String CRM_BIND_MAIL_CUSTOMER_ALL = "/crm/bind_mail_customer_all";
+
+    /** 客户列表侧邮件分页,form:MailListDTO */
+    public static final String CRM_EMAIL_LIST = "/crm/email_list";
+
+    /** 导入单封 eml,multipart:file */
+    public static final String CRM_IMPORT_MAIL_EML = "/crm/import_mail_eml";
+
+    /** 导入 eml zip,multipart:file + mobileNo */
+    public static final String CRM_IMPORT_MAIL_EML_ZIP = "/crm/import_mail_eml_zip";
+
     /** 根据邮箱账号查询端口/服务器配置,参数:mailAccount */
     public static final String COMMON_MAIL_PORT_CONFIG = "/common/mail_port_config";
 

+ 81 - 0
java/storlead-mail/storlead-mail-core/src/main/java/com/storlead/mail/pojo/dto/MailDTO.java

@@ -0,0 +1,81 @@
+package com.storlead.mail.pojo.dto;
+
+import com.storlead.framework.mybatis.page.Page;
+import com.storlead.framework.mybatis.query.QueryBaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class MailDTO  extends QueryBaseEntity {
+
+    private String boxCode;
+
+    @ApiModelProperty(value = "邮箱")
+    private String emailAddress;
+
+    private Long mailId;
+    @ApiModelProperty(value = "1:星标")
+    private Integer isStar;
+    @ApiModelProperty(value = "1:垃圾箱")
+    private Integer isTrash;
+    @ApiModelProperty(value = "客户id")
+    private Long customerId;
+
+    @ApiModelProperty(value = "1:已读,0:未读")
+    private Integer readStatu;
+
+    @ApiModelProperty(value = "1:有客户,0:无客户")
+    private Integer bindCustomer;
+
+    @ApiModelProperty(value = "1:线索,0:无线索")
+    private Integer bindClue;
+
+    @ApiModelProperty(value = "1: 只取客户的最后一封邮箱")
+    private Integer latestMail;
+
+    @ApiModelProperty(value = "0:未跟进,1:跟进")
+    private Integer followUpState;
+
+    @ApiModelProperty(value = "系统邮箱")
+    private Integer systemMail;
+
+    @ApiModelProperty(value = "客户类型:10:客户,11: 档案")
+    private Integer customerType;
+
+    private Long ownerBy;
+
+    private Long smtpPopId;
+
+    private  String folder;
+
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "客户类型")
+    private String customerTypeDictValue;
+
+    @ApiModelProperty(value = "客户等级value(对应字典客户等级value)")
+    private String customerLevelDictValue;
+
+    @ApiModelProperty(value = "客户来源value(对应字典客户来源value)")
+    private String customerSourceDictValue;
+
+    @ApiModelProperty(value = "所属大洲(区域)")
+    private String continent;
+
+    @ApiModelProperty(value = "所属国家(区域)")
+    private String country;
+
+    @ApiModelProperty(value = "线索状态value(对应字典线索状态value)")
+    private String clueStatusDictValue;
+
+    @ApiModelProperty(value = "自定义文件夹id")
+    private Long folderId;
+
+    @ApiModelProperty(value = "跟进提醒:默认null,1:查询跟进提醒")
+    private Integer followRemind;
+
+    private List<Long> mailIds;
+}

+ 1 - 0
java/storlead-sasa/storlead-trade/src/main/java/com/storlead/trade/service/impl/MarketEmailsStatusSyncServiceImpl.java

@@ -181,6 +181,7 @@ public class MarketEmailsStatusSyncServiceImpl implements MarketEmailsStatusSync
         if (Integer.valueOf(1).equals(change.getHasRefuse())
                 && !Integer.valueOf(1).equals(existing.getHasRefuse())) {
             update.set(MarketEmailsEntity::getHasRefuse, 1);
+            update.set(MarketEmailsEntity::getStatus, -4);
             changed = true;
         }
         if (!changed) {