From ee2316e2cb7afde1c54f5e4216a1b0d1e055749e Mon Sep 17 00:00:00 2001
From: xinyb <574600396@qq.com>
Date: 星期五, 27 九月 2024 17:33:14 +0800
Subject: [PATCH] CRM邮箱配置调整

---
 src/com/yc/crm/mail/action/MailTag.java |   49 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/src/com/yc/crm/mail/action/MailTag.java b/src/com/yc/crm/mail/action/MailTag.java
index 58a390a..11ef9c6 100644
--- a/src/com/yc/crm/mail/action/MailTag.java
+++ b/src/com/yc/crm/mail/action/MailTag.java
@@ -3,6 +3,7 @@
 //import com.yc.crm.mail.entity.T482115Entity;
 
 import com.yc.crm.base.entity.T482115Entity;
+import com.yc.crm.mail.entity.MailModuleBelowEntity;
 import com.yc.crm.mail.service.MailTagIfc;
 import com.yc.crm.mail.util.AllBackMsg;
 import com.yc.entity.DataSourceEntity;
@@ -16,6 +17,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -147,7 +149,7 @@
      * @return
      */
     @GetMapping("/getTagList.do")
-    public AllBackMsg getTagList(String search,@RequestParam(defaultValue = "-1") Integer type, HttpServletRequest request, HttpServletResponse response) {
+    public AllBackMsg getTagList(String search, @RequestParam(defaultValue = "-1") Integer type, HttpServletRequest request, HttpServletResponse response) {
         AllBackMsg msg = new AllBackMsg();
         try {
             HttpSession session = request.getSession();
@@ -158,7 +160,7 @@
             }
             DataSourceEntity dataSource = MultiDataSource.getDataSourceMap(request);//鑾峰彇鏁版嵁婧�
             SpObserver.setDBtoInstance("_" + dataSource.getDbId());
-            List<T482115Entity> list = mailTagIfc.getTagList(userCode, search,type);
+            List<T482115Entity> list = mailTagIfc.getTagList(userCode, search, type);
             msg.setSuccess("鎵ц鎴愬姛", list);
         } catch (Exception e) {
             msg.setFail(e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
@@ -167,4 +169,47 @@
         }
         return msg;
     }
+
+    /**
+     * 鏍囩鏍戠粨鏋�
+     *
+     * @param t482107
+     * @param rowId
+     * @return
+     */
+    public static List<MailModuleBelowEntity> getTagModule(List<T482115Entity> T482115) {
+        List<MailModuleBelowEntity> tagList = new ArrayList<>();
+        MailModuleBelowEntity tag1 = new MailModuleBelowEntity();
+        tag1.setKey("systemTag");
+        tag1.setType("tag");
+        tag1.setName("绯荤粺鏍囩");
+        MailModuleBelowEntity tag2 = new MailModuleBelowEntity();
+        tag2.setKey("customTag");
+        tag2.setType("tag");
+        tag2.setName("鑷畾涔夋爣绛�");
+        try {
+            List<MailModuleBelowEntity> system = new ArrayList<>();
+            List<MailModuleBelowEntity> custom = new ArrayList<>();
+            for (T482115Entity t : T482115) {
+                MailModuleBelowEntity tag = new MailModuleBelowEntity();
+                tag.setId(t.getTagId());
+                tag.setType("tag");
+                tag.setName(t.getTagName());
+                if (t.isSystemFlag()) {
+                    tag.setKey("systemTag" + t.getTagId());
+                    system.add(tag);
+                } else {
+                    tag.setKey("customTag" + t.getTagId());
+                    custom.add(tag);
+                }
+            }
+            tag1.setList(system);
+            tag2.setList(custom);
+            tagList.add(tag1);
+            tagList.add(tag2);
+            return tagList;
+        } catch (Exception e) {
+            throw e;
+        }
+    }
 }

--
Gitblit v1.8.0