MerchantServiceCenterControllerTest.java
5.07 KB
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
package cn.com.glsx.busassistant.controller;
import org.junit.Test;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
/**
* @description:
* @author: chenx
* @date: 2023/3/21 20:21
*/
public class MerchantServiceCenterControllerTest extends BaseControllerTest{
@Test
public void merchantInfoPage() throws Exception{
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "scrm.api.busassistant.serviceCenter.merchantInfo");
params.add("merchantId", "44211816");
params.add("sessionId", "mini-ba2657fe-f730-4515-aff9-999e11777438-rop");
System.out.println(post(params));
}
@Test
public void testPage() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "scrm.api.busassistant.serviceCenter.page");
params.add("pageSize", "20");
params.add("pageNum", "1");
params.add("sessionId", "mini-3eea23c1-f855-4a72-921c-b013c21d847d-rop");
System.out.println(post(params));
}
@Test
public void testStaffPage() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "scrm.api.busassistant.staff.searchStaffPage");
params.add("pageSize", "20");
params.add("pageNum", "1");
params.add("merchantNoList[0]", "44211747");
params.add("sessionId", "mini-4cce1135-a720-44dd-be05-6478eeff3d33-rop");
System.out.println(post(params));
}
@Test
public void testServiceCenterUpdate() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "scrm.api.busassistant.serviceCenter.update");
params.add("merchantName", "总部服务中心23");
params.add("oldMerchantName", "总部服务中心22");
params.add("merchantId", "44211711");
params.add("contactName", "我我我");
params.add("phone", "13132112126");
params.add("createdDate", "2023.03.22");
params.add("password", "123456");
params.add("oldPhone", "13132112126");
params.add("longitude", "111.15");
params.add("latitude", "29.26");
params.add("provinceCode", "420000");
params.add("provinceName", "湖北省");
params.add("cityCode", "421000");
params.add("cityName", "荆州市");
params.add("merchantAddress", "湖北省荆州市公安县");
params.add("merchantBrandJson", "[{\"merchantFirstBrandDetail\":{\"id\":2125,\"name\":\"奥迪\"},\"merchantSecondBrandDetailList\":[{\"id\":2983,\"name\":\"上汽奥迪\"},{\"id\":2126,\"name\":\"一汽-大众奥迪\"}]}]");
params.add("sessionId", "mini-8a06f7b3-103f-4f2e-9b08-d8293e0a1e56-rop");
System.out.println(post(params));
}
@Test
public void testServiceCenterSave() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "scrm.api.busassistant.serviceCenter.save");
params.add("merchantName", "cx测试园区店7");
params.add("contactName", "cx测试员工6");
params.add("phone", "13132112126");
params.add("password", "789456qwer");
params.add("createdDate", "2023.03.22");
params.add("password", "123456");
params.add("longitude", "111.15");
params.add("latitude", "29.26");
params.add("provinceCode", "420000");
params.add("provinceName", "湖北省");
params.add("cityCode", "421000");
params.add("cityName", "荆州市");
params.add("merchantAddress", "湖北省荆州市公安县");
params.add("merchantBrandJson", "[{\"merchantFirstBrandDetail\":{\"id\":2125,\"name\":\"奥迪\"},\"merchantSecondBrandDetailList\":[{\"id\":2983,\"name\":\"上汽奥迪\"},{\"id\":2126,\"name\":\"一汽-大众奥迪\"}]}]");
params.add("sessionId", "mini-8a06f7b3-103f-4f2e-9b08-d8293e0a1e56-rop");
System.out.println(post(params));
}
@Test
public void testServiceCenterList() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "scrm.api.busassistant.serviceCenter.listByServiceMerchantId");
params.add("sessionId", "mini-60a72a58-9297-4d65-a3b8-fb371b857731-rop");
System.out.println(post(params));
}
@Test
public void testInit() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "scrm.api.busassistant.serviceCenter.init");
params.add("sessionId", "mini-063082e0-bbc3-4a5d-938a-a4c2ea738f97-rop");
System.out.println(post(params));
}
}