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
/**
*/
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:SystemManagementUserTest
 * @Project: LX-BASE-SERVER
 * @Date: 2020年6月3日 下午7:58:16
 * @Author: 郑盟
 * @Description:系统管理员测试
 */
public class SystemManagementUserTest extends HttpTest {
    public static void main(String[] args) {
//        SystemManagementUserTest.addtManagementUser();//新增
//        SystemManagementUserTest.listManagementUser();//列表
//        SystemManagementUserTest.findManagementUser();//详情
//        SystemManagementUserTest.updatetManagementUser();//修改
//        SystemManagementUserTest.updateUserpwd();
//        SystemManagementUserTest.deleteUserpwd();
        SystemManagementUserTest.Resetpwd();
    }
 
    public static void addtManagementUser() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_users");
        m.put("url/api", "/api/systemmanagement/add-user/v1");
        m.put("user_account", "che");
        m.put("user_pwd", "11111111");
        m.put("status", "1");
        List sub = new ArrayList();
        m.put("product_sys_function_permission", sub);
        for (int i = 0; i < 2; i++) {
            Map stb = new HashMap();
            stb.put("function_uuid", "test-module-202005201014");// 流程UUID
            stb.put("button_uuid", "d305619f-5060-4b12-931d-3176eb691466,001");// 代理人员UUID
            sub.add(stb);
        }
        testPost(m);
    }
    public static void updatetManagementUser() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_users");
        m.put("url/api", "/api/systemmanagement/update-user/v1");
        m.put("uuid", "09ec8ac3-43ac-4ede-8ace-b7170893f781");
        m.put("user_account", "测试112222");
        m.put("user_pwd", "1234");
        m.put("status", "1");
        List sub = new ArrayList();
        m.put("product_sys_function_permission", sub);
        for (int i = 0; i < 1; i++) {
            Map stb = new HashMap();
            stb.put("function_uuid", "test-module-202005201014");// 流程UUID
            stb.put("button_uuid", "d305619f-5060-4b12-931d-3176eb691466,001");// 代理人员UUID
            sub.add(stb);
        }
        testPost(m);
    }
    public static void listManagementUser() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_users");
        m.put("url/api", "/api/management/list-user/v1");
        m.put("cpage", "1");
        m.put("pagesize", "10");
 
        testPost(m);
    }
    public static void findManagementUser() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_users");
        m.put("url/api", "/api/systemmanagement/find-user/v1");
        m.put("uuid", "09ec8ac3-43ac-4ede-8ace-b7170893f781");
        testPost(m);
    }
    
    public static void updateUserpwd() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_users");
        m.put("url/api", "/api/systemmanagement/update-userpwdstatus/v1");
        m.put("uuid", "09ec8ac3-43ac-4ede-8ace-b7170893f781");
        m.put("user_pwd", "4454545");//修改密码
//        m.put("status", "0");//禁用账号0为禁用 1为启用
        testPost(m);
    }
 
    public static void deleteUserpwd() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_users");
        m.put("url/api", "/api/systemmanagement/delete-user/v1");
        m.put("uuid", "0d8a0d15-4ada-4376-aa08-a34fb617a462");
        testPost(m);
    }
 
    public static void Resetpwd() {
        Map m = new HashMap();
        m.put("~table~", "product_sys_users");
        m.put("url/api", "/api/systemmanagement/update-reset-password/v1");
        m.put("uuid", "2af3e17d-f8f4-47f2-8e64-5fc0ec49e33a");
        testPost(m);
    }
}