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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
package com.product.admin.test;
 
import org.junit.Assert;
import org.junit.Test;
 
import com.product.common.utils.HttpTest;
import com.product.core.sign.HmacUtils;
import com.product.core.sign.HmacUtils.Algorithm;
 
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
public class TokenTest extends HttpTest {
    public static void main(String[] args) {
        DictTest.findtDict();//更具uuid获取数据字典详情接口
//        DictTest.addtDict();//数据字典新增结构
//        DictTest.listDict();//数据字典列表查询结构
//        DictTest.updateDict();//数据字典更新结构
//        DictTest.deleteDictionary();//数据字典删除结构
//        DictTest.listDictByname();//更具字典名获取数据字典接口
    }
 
    public static void findtDict() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/find-dict/v1");
        m.put("uuid", "e874ae20-e574-4e83-b6f3-f785a3b09b23");
        m.put("uuid", "e874ae20-e574-4e83-b6f3-f785a3b09b23");
//        m.put("created_utc_datetime", 1594789998000L);
//        m.put("dict_name", "客户端类型");
//        m.put("dict_label", "H5业务端33");
        
//        List template_language = new ArrayList();
//        Map template_language1 = new HashMap();
//        template_language1.put("zh-CN", "你好");
//        
//        template_language.add(template_language1);
//        m.put("dict_label", template_language);
        testPost(m);
    }
 
    public static void addtDict() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/add-dictionary/v1");
        m.put("uuid", "9b130c51-ad65-4755-9f82-0c3f22b66b6c");
        m.put("dict_name", "客户端类型");
        m.put("dict_label", "H5业务端33");
        m.put("dict_value", "223232223333453266622223");
        m.put("system_language_code", "E34448");
        m.put("system_client_type", "E34448");
        m.put("system_client_version", "E34448");
        m.put("is_used", "1");
        m.put("sequence", 1);
        m.put("created_utc_datetime", 1594789998000L);
        
        List template_language = new ArrayList();
        Map template_language1 = new HashMap();
        template_language1.put("uuid", "43f8a6f8-6c2c-443b-868f-ab73888b4dea");
        template_language1.put("zh-CN", "你好,我是修改");
        Map template_language2 = new HashMap();
        template_language2.put("en", "hello,is update");
        
        template_language.add(template_language1);
        template_language.add(template_language2);
        m.put("dict_label", template_language);
        testPost(m);
    }
 
    public static void listDict() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/list-dictionary/v1");
        m.put("cpage", "1");
        m.put("pagesize", "50");
 
        testPost(m);
    }
 
    public static void listDictByname() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/list-dictionary-byname/v1");
        m.put("dict_name", "客户端类型");
        m.put("cpage", "1");
        m.put("pagesize", "10");
 
        testPost(m);
    }
 
    public static void updateDict() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/update-dictionary/v1");
        m.put("uuid", "9b130c51-ad65-4755-9f82-0c3f22b66b6c");
        m.put("dict_name", "客户端类型");
        m.put("dict_label", "测试111ttttttttt");
 
        m.put("dict_value", "测据111333333333");
        m.put("is_used", "1");
        m.put("sequence", "10");
        
        List template_language = new ArrayList();
        Map template_language1 = new HashMap();
        template_language1.put("zh-CN", "你好@@@@@ ,我是修改");
        template_language1.put("uuid","43f8a6f8-6c2c-443b-868f-ab73888b4dea");
        Map template_language2 = new HashMap();
        template_language2.put("en", "hello is update");
        template_language2.put("uuid","97ad3ba9-7538-485d-a766-102e498505d2");
        template_language.add(template_language1);
        template_language.add(template_language2);
        m.put("dict_label", template_language);
        
        testPost(m);
    }
 
    public static void deleteDictionary() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/delete-dictionary/v1");
        m.put("uuid", "086aa3f8-41d9-4f7c-a4ae-1912cc36c6f0");
 
        testPost(m);
    }
   
}