/**
|
*
|
*/
|
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);
|
}
|
}
|