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
    /**
 * 
 */
package com.product.admin.test;
 
import java.util.HashMap;
import java.util.Map;
 
import com.product.common.utils.HttpTest;
 
/**
 * Copyright  LX-BASE
 * @Title: 
 * @Project: LX-BASE-SERVER
 * @Date: 2020年5月29日 下午2:31:31 
 * @Author: 郑盟
 * @Description: 高级参照配置
 */
public class SystemPromptTest extends HttpTest{
    
    public static void main(String[] args) {
//        SystemPromptTest.addPrompt();//新增高级参照
        SystemPromptTest.updatePrompt();//修改高级参照
//        SystemPromptTest.listPrompt();//高级参照列表
//        SystemPromptTest.deletePrompt();//删除高级参照
//        SystemPromptTest.findPrompt();//高级参照详情
    }
     public static void addPrompt() {
/*            Map m = new HashMap();
            m.put("~table~", "product_sys_prompt");
            m.put("url/api", "/api/prompt/add-prompt/v1");
            m.put("prompt_name", "function_client_type");
            m.put("prompt_desc", "功能客户端类型下拉");
            m.put("source_table", "product_sys_dict");
            m.put("value_field", "dict_value");
            m.put("view_fields", "dict_value");
            m.put("prompt_field", "dict_name");
            m.put("filter", "dict_name='clientType' and dict_value in (SELECT substring_index(substring_index(a.client_type,',',b.help_topic_id + 1),',' ,- 1) AS client_type FROM product_sys_modules a JOIN mysql_help_topic b ON b.help_topic_id < (length(a.client_type) - length(REPLACE (a.client_type, ',', '')) + 1) where uuid =~module_uuid~) and org_level_uuid is null");            
            testPost(m);
*/
         Map m = new HashMap();
            m.put("~table~", "product_sys_prompt");
            m.put("url/api", "/api/prompt/add-prompt/v1");
            m.put("prompt_name", "level_dept");
            m.put("prompt_desc", "根据公司选择部门");
            m.put("source_table", "product_sys_org_levels");
            m.put("value_field", "org_level_code");
            m.put("view_fields", "org_level_name");
            m.put("prompt_field", "org_level_name");
            m.put("filter", "org_level_code like CONCAT((select org_level_code FROM product_sys_org_levels where uuid=~org_level_uuid~),'%') and org_level_type=1");            
            testPost(m);
        }
     public static void updatePrompt() {
            Map m = new HashMap();
            m.put("~table~", "product_sys_prompt");
            m.put("url/api", "/api/prompt/update-prompt/v1");
            m.put("uuid", "2860538c-769f-44e0-8e54-3ce6d4ac668d");
            m.put("prompt_name", "menu_parent");
            m.put("prompt_desc", "11111111");
            m.put("source_table", "product_sys_org_levels");
            m.put("value_field", "uuid");
            m.put("view_fields", "org_level_name");
            m.put("display_type", "1");
            m.put("user_filter_field", "created_by");
            testPost(m);
        }
     public static void listPrompt() {
            Map m = new HashMap();
            m.put("~table~", "product_sys_prompt");
            m.put("url/api", "/api/prompt/list-prompt/v1");
            m.put("cpage", "1");
            m.put("pagesize", "10");
            testPost(m);
        }
     public static void deletePrompt() {
            Map m = new HashMap();
            m.put("~table~", "product_sys_prompt");
            m.put("url/api", "/api/prompt/delete-prompt/v1");
            m.put("uuid", "bce9dac7-734b-48ac-ad6d-bd63b698782a");
            testPost(m);
        }
     public static void findPrompt() {
            Map m = new HashMap();
            m.put("~table~", "product_sys_prompt");
            m.put("url/api", "/api/prompt/delete-prompt/v1");
            m.put("uuid", "bce9dac7-734b-48ac-ad6d-bd63b698782a");
            testPost(m);
        }
}