package org.jeecg.modules.okki.site.service.impl;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.HttpClientUtil;
import org.jeecg.modules.okki.site.service.IFeiShuMsgService;
import org.springframework.stereotype.Service;


/**
 * @author Chen
 */
@Slf4j
@Service
public class FeiShuMsgServiceImpl implements IFeiShuMsgService {

    /**
     * 发送同步站点-飞书消息
     *
     * @param customerName
     * @param siteId
     * @param planName
     * @param syncStatus
     */
    @Override
    public void sendSyncFeiShuSheetMsg(String customerName, String siteId, String planName, String syncStatus) {
        String botUrl = "https://open.feishu.cn/open-apis/bot/v2/hook/f77f9317-5f15-4aa7-8036-32ce771f40c1";

        String template = "{\n" +
                "    \"config\": {\n" +
                "        \"update_multi\": true\n" +
                "    },\n" +
                "    \"i18n_elements\": {\n" +
                "        \"zh_cn\": [\n" +
                "            {\n" +
                "                \"tag\": \"markdown\",\n" +
                "                \"content\": \"<at id=\\\"all\\\">所有人</at> \",\n" +
                "                \"text_align\": \"left\",\n" +
                "                \"text_size\": \"normal\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"horizontal_spacing\": \"8px\",\n" +
                "                \"horizontal_align\": \"left\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**公司名称：**\\n${customerName}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**套餐名称：**\\n${planName}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**站点ID：**\\n${siteId}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**同步状态：**\\n${syncStatus}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"margin\": \"16px 0px 0px 0px\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"hr\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"horizontal_spacing\": \"default\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"div\",\n" +
                "                                \"text\": {\n" +
                "                                    \"tag\": \"plain_text\",\n" +
                "                                    \"content\": \"来自 OK项目组-文档机器人\",\n" +
                "                                    \"text_size\": \"normal\",\n" +
                "                                    \"text_align\": \"left\",\n" +
                "                                    \"text_color\": \"default\"\n" +
                "                                }\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ]\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    \"i18n_header\": {\n" +
                "        \"zh_cn\": {\n" +
                "            \"title\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"【来客（qiě）了】新客户已同步，请及时处理\"\n" +
                "            },\n" +
                "            \"subtitle\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"\"\n" +
                "            },\n" +
                "            \"template\": \"green\"\n" +
                "        }\n" +
                "    }\n" +
                "}";
        template = template.replace("${customerName}", customerName);
        template = template.replace("${siteId}", siteId);
        template = template.replace("${planName}", planName);
        template = template.replace("${syncStatus}", syncStatus);

        JSONObject object = new JSONObject();
        object.put("msg_type", "interactive");
        object.put("card", template);
        HttpClientUtil.doPostJson(botUrl, object.toJSONString());
    }

    /**
     * 发送更新表格-飞书消息
     *
     * @param customerName
     * @param siteId
     * @param groupName
     * @param status
     */
    @Override
    public void sendUpdateFeiShuSheetMsg(String customerName, String siteId, String groupName, String status) {
        String botUrl = "https://open.feishu.cn/open-apis/bot/v2/hook/f77f9317-5f15-4aa7-8036-32ce771f40c1";

        String template = "{\n" +
                "    \"config\": {\n" +
                "        \"update_multi\": true\n" +
                "    },\n" +
                "    \"i18n_elements\": {\n" +
                "        \"zh_cn\": [\n" +
                "            {\n" +
                "                \"tag\": \"markdown\",\n" +
                "                \"content\": \"<at id=\\\"all\\\">所有人</at> \",\n" +
                "                \"text_align\": \"left\",\n" +
                "                \"text_size\": \"normal\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"horizontal_spacing\": \"8px\",\n" +
                "                \"horizontal_align\": \"left\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**公司名称：**\\n${customerName}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**建站小组：**\\n${groupName}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**站点ID：**\\n${siteId}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**更新状态：**\\n${status}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"margin\": \"16px 0px 0px 0px\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"hr\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"horizontal_spacing\": \"default\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"div\",\n" +
                "                                \"text\": {\n" +
                "                                    \"tag\": \"plain_text\",\n" +
                "                                    \"content\": \"来自 OK项目组-文档机器人\",\n" +
                "                                    \"text_size\": \"normal\",\n" +
                "                                    \"text_align\": \"left\",\n" +
                "                                    \"text_color\": \"default\"\n" +
                "                                }\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ]\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    \"i18n_header\": {\n" +
                "        \"zh_cn\": {\n" +
                "            \"title\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"${title}\"\n" +
                "            },\n" +
                "            \"subtitle\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"\"\n" +
                "            },\n" +
                "            \"template\": \"green\"\n" +
                "        }\n" +
                "    }\n" +
                "}";
        template = template.replace("${title}", "【" + customerName + "】分配建站小组通知");
        template = template.replace("${customerName}", customerName);
        template = template.replace("${siteId}", siteId);
        template = template.replace("${groupName}", groupName);
        template = template.replace("${status}", status);

        JSONObject object = new JSONObject();
        object.put("msg_type", "interactive");
        object.put("card", template);
        HttpClientUtil.doPostJson(botUrl, object.toJSONString());
    }

    /**
     * 发送创建飞书群聊-飞书消息
     *
     * @param customerName
     * @param siteId
     * @param feiShuGroupName
     * @param status
     */
    @Override
    public void sendCreateFeiShuGroupMsg(String customerName, String siteId, String feiShuGroupName, String status) {
        String botUrl = "https://open.feishu.cn/open-apis/bot/v2/hook/f77f9317-5f15-4aa7-8036-32ce771f40c1";

        String template = "{\n" +
                "    \"config\": {\n" +
                "        \"update_multi\": true\n" +
                "    },\n" +
                "    \"i18n_elements\": {\n" +
                "        \"zh_cn\": [\n" +
                "            {\n" +
                "                \"tag\": \"markdown\",\n" +
                "                \"content\": \"<at id=\\\"all\\\">所有人</at> \",\n" +
                "                \"text_align\": \"left\",\n" +
                "                \"text_size\": \"normal\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"horizontal_spacing\": \"8px\",\n" +
                "                \"horizontal_align\": \"left\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**公司名称：**\\n${customerName}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**群聊名称：**\\n${feiShuGroupName}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**站点ID：**\\n${siteId}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**状态：**\\n${status}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"margin\": \"16px 0px 0px 0px\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"hr\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"horizontal_spacing\": \"default\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"div\",\n" +
                "                                \"text\": {\n" +
                "                                    \"tag\": \"plain_text\",\n" +
                "                                    \"content\": \"来自 OK项目组-文档机器人\",\n" +
                "                                    \"text_size\": \"normal\",\n" +
                "                                    \"text_align\": \"left\",\n" +
                "                                    \"text_color\": \"default\"\n" +
                "                                }\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ]\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    \"i18n_header\": {\n" +
                "        \"zh_cn\": {\n" +
                "            \"title\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"${title}\"\n" +
                "            },\n" +
                "            \"subtitle\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"\"\n" +
                "            },\n" +
                "            \"template\": \"green\"\n" +
                "        }\n" +
                "    }\n" +
                "}";
        template = template.replace("${title}", "【" + customerName + "】创建飞书项目群通知");
        template = template.replace("${customerName}", customerName);
        template = template.replace("${siteId}", siteId);
        template = template.replace("${feiShuGroupName}", feiShuGroupName);
        template = template.replace("${status}", status);

        JSONObject object = new JSONObject();
        object.put("msg_type", "interactive");
        object.put("card", template);
        HttpClientUtil.doPostJson(botUrl, object.toJSONString());
    }

    /**
     * 发送同步外链消息
     *
     * @param customerName
     * @param siteId
     * @param tableLink
     * @param status
     */
    @Override
    public void sendSyncSeoExternalLinkMsg(String customerName, String feiShuUnionId, String siteId, String tableLink, String status) {
        String botUrl = "https://open.feishu.cn/open-apis/bot/v2/hook/dd827854-2d0b-41b4-ba69-f7f417d5e086";

        String template = "{\n" +
                "    \"config\": {\n" +
                "        \"update_multi\": true\n" +
                "    },\n" +
                "    \"i18n_elements\": {\n" +
                "        \"zh_cn\": [\n" +
                "            {\n" +
                "                \"tag\": \"markdown\",\n" +
                "                \"content\": \"<at id=\\\"${feiShuUnionId}\\\"></at> \",\n" +
                "                \"text_align\": \"left\",\n" +
                "                \"text_size\": \"normal\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"horizontal_spacing\": \"8px\",\n" +
                "                \"horizontal_align\": \"left\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**公司名称：**\\n${customerName}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**SEO外链文档：**\\n${tableLink}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**站点ID：**\\n${siteId}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**状态：**\\n${status}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"margin\": \"16px 0px 0px 0px\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"hr\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"horizontal_spacing\": \"default\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"div\",\n" +
                "                                \"text\": {\n" +
                "                                    \"tag\": \"plain_text\",\n" +
                "                                    \"content\": \"来自 OK项目组-文档机器人\",\n" +
                "                                    \"text_size\": \"normal\",\n" +
                "                                    \"text_align\": \"left\",\n" +
                "                                    \"text_color\": \"default\"\n" +
                "                                }\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ]\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    \"i18n_header\": {\n" +
                "        \"zh_cn\": {\n" +
                "            \"title\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"${title}\"\n" +
                "            },\n" +
                "            \"subtitle\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"\"\n" +
                "            },\n" +
                "            \"template\": \"green\"\n" +
                "        }\n" +
                "    }\n" +
                "}";
        template = template.replace("${title}", "【" + customerName + "】同步SEO外链通知");
        template = template.replace("${customerName}", customerName);
        template = template.replace("${feiShuUnionId}", feiShuUnionId);
        template = template.replace("${siteId}", siteId);
        template = template.replace("${tableLink}", tableLink);
        template = template.replace("${status}", status);

        JSONObject object = new JSONObject();
        object.put("msg_type", "interactive");
        object.put("card", template);
        HttpClientUtil.doPostJson(botUrl, object.toJSONString());
    }

    /**
     * 创建showlist基表消息通知
     *
     * @param customerName
     * @param siteId
     * @param tableLink
     * @param status
     */
    @Override
    public void sendCreateSeoShowlistTableLinkMsg(String customerName, String feiShuUnionId, String siteId, String tableLink, String status) {
        String botUrl = "https://open.feishu.cn/open-apis/bot/v2/hook/dd827854-2d0b-41b4-ba69-f7f417d5e086";

        String template = "{\n" +
                "    \"config\": {\n" +
                "        \"update_multi\": true\n" +
                "    },\n" +
                "    \"i18n_elements\": {\n" +
                "        \"zh_cn\": [\n" +
                "            {\n" +
                "                \"tag\": \"markdown\",\n" +
                "                \"content\": \"<at id=\\\"${feiShuUnionId}\\\"></at> \",\n" +
                "                \"text_align\": \"left\",\n" +
                "                \"text_size\": \"normal\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"horizontal_spacing\": \"8px\",\n" +
                "                \"horizontal_align\": \"left\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**公司名称：**\\n${customerName}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**SEO外链文档：**\\n${tableLink}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"vertical_align\": \"top\",\n" +
                "                        \"vertical_spacing\": \"8px\",\n" +
                "                        \"background_style\": \"default\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**站点ID：**\\n${siteId}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            },\n" +
                "                            {\n" +
                "                                \"tag\": \"markdown\",\n" +
                "                                \"content\": \"**状态：**\\n${status}\",\n" +
                "                                \"text_align\": \"left\",\n" +
                "                                \"text_size\": \"normal\"\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"margin\": \"16px 0px 0px 0px\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"hr\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"tag\": \"column_set\",\n" +
                "                \"flex_mode\": \"none\",\n" +
                "                \"horizontal_spacing\": \"default\",\n" +
                "                \"background_style\": \"default\",\n" +
                "                \"columns\": [\n" +
                "                    {\n" +
                "                        \"tag\": \"column\",\n" +
                "                        \"elements\": [\n" +
                "                            {\n" +
                "                                \"tag\": \"div\",\n" +
                "                                \"text\": {\n" +
                "                                    \"tag\": \"plain_text\",\n" +
                "                                    \"content\": \"来自 OK项目组-文档机器人\",\n" +
                "                                    \"text_size\": \"normal\",\n" +
                "                                    \"text_align\": \"left\",\n" +
                "                                    \"text_color\": \"default\"\n" +
                "                                }\n" +
                "                            }\n" +
                "                        ],\n" +
                "                        \"width\": \"weighted\",\n" +
                "                        \"weight\": 1\n" +
                "                    }\n" +
                "                ]\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    \"i18n_header\": {\n" +
                "        \"zh_cn\": {\n" +
                "            \"title\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"${title}\"\n" +
                "            },\n" +
                "            \"subtitle\": {\n" +
                "                \"tag\": \"plain_text\",\n" +
                "                \"content\": \"\"\n" +
                "            },\n" +
                "            \"template\": \"green\"\n" +
                "        }\n" +
                "    }\n" +
                "}";
        template = template.replace("${title}", "【" + customerName + "】Showlist通知");
        template = template.replace("${customerName}", customerName);
        template = template.replace("${feiShuUnionId}", feiShuUnionId);
        template = template.replace("${siteId}", siteId);
        template = template.replace("${tableLink}", tableLink);
        template = template.replace("${status}", status);

        JSONObject object = new JSONObject();
        object.put("msg_type", "interactive");
        object.put("card", template);
        HttpClientUtil.doPostJson(botUrl, object.toJSONString());
    }
}
