xg
许鹏程
2023-05-26 2476c4f7acc1a3a9087227660e32ef42157a46b6
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/**
*/
package com.product.admin.test;
 
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import com.product.common.utils.HttpTest;
 
/**
 * Copyright LX-BASE
 * 
 * @Title: DictTest
 * @Project: LX-BASE-SERVER
 * @Date: 2020年5月30日 下午2:41:46
 * @Author: 郑盟
 * @Description: 普通参照测试
 */
public class DictTest extends HttpTest {
    public static void main(String[] args) {
//        DictTest.findtDict();//更具uuid获取数据字典详情接口
//        DictTest.addtDict();//数据字典新增结构
//        DictTest.listDict();//数据字典列表查询结构
//        DictTest.updateDict();//数据字典更新结构
//        DictTest.deleteDictionary();//数据字典删除结构
        DictTest.listDictByname();//更具字典名获取数据字典接口
        
    
//        addtDictForMobile();//手机端国际化数据上传
//        DictTest.updateDictForMobile();
//        DictTest.findtDictForMobile();//更具uuid获取数据字典详情接口
//        DictTest.listDictForMobile();
//        DictTest.listDictBynameMobile();
    }
 
    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", "7277cd48-509c-41f1-a7fb-f7fdc3565c5c");
    
        testPost(m);
    }
    /**
     * 手机端
     */
    public static void findtDictForMobile() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/find-dict-mobile/v1");
        m.put("uuid", "1309a209-94c8-4be8-be35-18b3e94defb1");
    
        testPost(m);
    }
    public static void addtDictForMobile() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/add-dictionary-mobile/v1");
        m.put("dict_name", "reason_for_resignation");
        m.put("dict_label", "国人目hhhhhh");
        m.put("dict_value", "个人jjjjjj");
        m.put("system_language_code", "1");
        m.put("system_client_type", "wweb");
        m.put("system_client_version", "1");
        m.put("is_used", "1");
        m.put("sequence", 1);
        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("dict_name", "reason_for_resignation");
        m.put("dict_label", "!!!!!11111");
        m.put("dict_value", "@@@3###");
        m.put("system_language_code", "1");
        m.put("system_client_type", "wweb");
        m.put("system_client_version", "1");
        m.put("is_used", "1");
        m.put("sequence", 1);
        m.put("created_utc_datetime",1600531200000L);
        m.put("updated_utc_datetime",1600531200000L);
        
        
        List template_language = new ArrayList();
        Map template_language1 = new HashMap();
        template_language1.put("zh-CN", "222222");
        Map template_language2 = new HashMap();
        template_language2.put("en", "444444");
        
        template_language.add(template_language1);
        template_language.add(template_language2);
        m.put("dict_label", template_language);
        Map m1 = new HashMap();
        m1.put("aa","bbb");
        m1.put("aa1","bbsdb");
        m1.put("aa2","bbagb");
        m1.put("aa3","bbsgb");
        m1.put("aa4","bgggbb");
        m1.put("aa5","bhhbb");
        Map m12 = new HashMap();
        m12.put("aa6","bjkbb");
        m12.put("aa7","boubb");
        m12.put("aa8","bboub");
        m12.put("aa9","bbrrb");
        m1.put("aa10",m12);
        m1.put("aa11","bbpkb");
        m1.put("aa12","bbhjb");
        
        Map m11 = new HashMap();
        m11.put("aa","bbb");
        m11.put("aa1","bbsdb");
        m11.put("aa2","bbagb");
        m11.put("aa3","bbsgb");
        m1.put("TTEGAAA",m11);
        m.put("GDEGEE", m1);
        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", "500");
        testPost(m);
    }
    public static void listDictForMobile() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/list-dictionary-mobile/v1");
        m.put("cpage", "1");
        m.put("pagesize", "500");
        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", "portals_types");
        m.put("cpage", "1");
        m.put("pagesize", "10");
 
        testPost(m);
    }
    public static void listDictBynameMobile() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/list-dictionary-byname-mobile/v1");
        m.put("dict_name", "reason_for_resignation");
        m.put("cpage", "1");
        m.put("pagesize", "10");
 
        testPost(m);
    }
    public static void updateDictForMobile() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_dict");
        m.put("url/api", "/api/dictionary/update-dictionary-mobile/v1");
        m.put("uuid", "1309a209-94c8-4be8-be35-18b3e94defb1"); 
        m.put("dict_label", "国人000000000");
        
        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", "ee987b0a-d01b-4fe7-aa79-ea708efb8339");
        
        List template_language = new ArrayList();
        Map template_language1 = new HashMap();
        template_language1.put("zh-CN", "w2222w6666");
        template_language1.put("uuid", "235f4035-87e3-48b8-905a-0786694ed7b3");
        Map template_language2 = new HashMap();
        template_language2.put("en", "5555566666");
        template_language2.put("uuid", "59417381-3176-4a93-81f8-50ac1ada5229");
        
        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", "392ca644-c513-4aed-936b-dd0f1dbc8633");
 
        testPost(m);
    }
}