shichongfu
2023-04-25 ce0b49552668d3331055e2b1a1447a743dc54939
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package com.product.admin.test;
 
import java.util.HashMap;
import java.util.Map;
 
import com.product.admin.config.CmnConst;
import com.product.common.utils.HttpTest;
 
/**
 * 邮件发送历史
* Copyright  LX-BASE
* @Title: LX-BASE-
* @Project: MailHistoryTest
* @Date:  2020-09-15 11:07   
* @Author: 杜洪波
* @Description:
 */
public class MailHistoryTest extends HttpTest{
    
    
    public static void main(String[] args) {
        listMailHostory();    //邮件发送历史记录列表
//        findMailHostory();    //邮件发送历史记录详情
//        updateMailHostory();    //邮件发送错误历史记录修改
//        errorMailSend();    //错误邮件发送
    }
    
    public static void listMailHostory() {
        Map<String,Object> map=new HashMap<>();
        map.put("url/api", "/api/mailhistory/list-mailHistory/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_MAIL_SEND);
        map.put("cpage",1);
        map.put("pagesize",10);
        testPost(map);
    }
    
    public static void findMailHostory() {
        Map<String,Object> map=new HashMap<>();
        map.put("url/api", "/api/mailhistory/find-mailHistory/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_MAIL_SEND);
        map.put("uuid", "5d67ba88-fc30-49d6-bd25-9253c67897fe");
        testPost(map);
    }
    
    public static void updateMailHostory() {
        Map<String,Object> map=new HashMap<>();
        map.put("url/api", "/api/mailhistory/update-mailHistory/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_MAIL_SEND);
        map.put("uuid","5d67ba88-fc30-49d6-bd25-9253c67897fe");
        map.put("org_level_uuid","83ff8990-ad89-44ba-a6a1-4d5535bee556");
        map.put("smtp_server_host","smtp.exmail.qq.com");
        map.put("smtp_server_port","456");
        map.put("smtp_username","1074825718@qq.com");
        map.put("smtp_license_code","D4hrLWLEP3fh9wBg");
        map.put("addressee","1582208867@qq.com");
        map.put("mail_title","你好啊");
        map.put("mail_content","你好啊");
        map.put("mail_attachment","");
//        map.put("send_stat","");
//        map.put("send_mode","smtp");
//        map.put("failure_reason","");
        testPost(map);
    }
    
    public static void errorMailSend() {
        Map<String,Object> map=new HashMap<>();
        map.put("url/api", "/api/mailhistory/send-error-mail/v1");
        map.put("~table~", CmnConst.PRODUCT_SYS_MAIL_SEND);
        map.put("uuid","5d67ba88-fc30-49d6-bd25-9253c67897fe");
        testPost(map);
    }
}