@cpzxrobot/sdk 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,6 @@ export class CustomerGateway extends Object {
22
22
  }
23
23
 
24
24
  listV2(args: any) {
25
-
26
25
  return this.context.ready.then((axios) => {
27
26
  return axios.post(`/api/v2/coremde-sale/customer/list/v2`, args);
28
27
  });
@@ -53,6 +52,12 @@ export class CustomerGateway extends Object {
53
52
  });
54
53
  }
55
54
 
55
+ delete(id: number) {
56
+ return this.context.ready.then((axios) => {
57
+ return axios.get(`/api/v2/coremde-sale/customer/delete?id=${id}`);
58
+ });
59
+ }
60
+
56
61
  accountManager(customerId: number, pageNo: number | undefined = undefined, pageSize: number | undefined = undefined) {
57
62
  return this.context.ready.then((axios) => {
58
63
  var params = {
@@ -100,6 +105,14 @@ export class CustomerGateway extends Object {
100
105
  );
101
106
  });
102
107
  },
108
+ list: (args: any) => {
109
+ return this.context.ready.then((axios) => {
110
+ return axios.post(
111
+ `/api/v2/coremde-sale/customer/visit/list`,
112
+ args,
113
+ );
114
+ });
115
+ },
103
116
  }
104
117
  }
105
118
 
@@ -113,6 +126,16 @@ export class CustomerGateway extends Object {
113
126
  }
114
127
  }
115
128
 
129
+ get count() {
130
+ return {
131
+ byStatus: () => {
132
+ return this.context.ready.then((axios) => {
133
+ return axios.get(`/api/v2/coremde-sale/customer/status/list-count`);
134
+ });
135
+ },
136
+ }
137
+ }
138
+
116
139
  //获得客户状态列表
117
140
  status() {
118
141
  return this.context.ready.then((axios) => {
@@ -120,10 +143,19 @@ export class CustomerGateway extends Object {
120
143
  });
121
144
  }
122
145
 
146
+
147
+
123
148
  //获得客户类型列表
124
149
  types() {
125
150
  return this.context.ready.then((axios) => {
126
- return axios.get(`/api/v2/coremde-sale/customer/types`);
151
+ return axios.get(`/api/v2/coremde-sale/customer/type/list`);
152
+ });
153
+ }
154
+
155
+ //获取客户类别列表
156
+ categories() {
157
+ return this.context.ready.then((axios) => {
158
+ return axios.get(`/api/v2/coremde-sale/customer/category/list`);
127
159
  });
128
160
  }
129
161
 
@@ -37,6 +37,11 @@ class CustomerGateway extends Object {
37
37
  return axios.post(`/api/v2/coremde-sale/customer/update`, args);
38
38
  });
39
39
  }
40
+ delete(id) {
41
+ return this.context.ready.then((axios) => {
42
+ return axios.get(`/api/v2/coremde-sale/customer/delete?id=${id}`);
43
+ });
44
+ }
40
45
  accountManager(customerId, pageNo = undefined, pageSize = undefined) {
41
46
  return this.context.ready.then((axios) => {
42
47
  var params = {
@@ -71,6 +76,11 @@ class CustomerGateway extends Object {
71
76
  return axios.get(`/api/v2/coremde-sale/customer/visit/get?id=${id}`);
72
77
  });
73
78
  },
79
+ list: (args) => {
80
+ return this.context.ready.then((axios) => {
81
+ return axios.post(`/api/v2/coremde-sale/customer/visit/list`, args);
82
+ });
83
+ },
74
84
  };
75
85
  }
76
86
  get stat() {
@@ -82,6 +92,15 @@ class CustomerGateway extends Object {
82
92
  },
83
93
  };
84
94
  }
95
+ get count() {
96
+ return {
97
+ byStatus: () => {
98
+ return this.context.ready.then((axios) => {
99
+ return axios.get(`/api/v2/coremde-sale/customer/status/list-count`);
100
+ });
101
+ },
102
+ };
103
+ }
85
104
  //获得客户状态列表
86
105
  status() {
87
106
  return this.context.ready.then((axios) => {
@@ -91,7 +110,13 @@ class CustomerGateway extends Object {
91
110
  //获得客户类型列表
92
111
  types() {
93
112
  return this.context.ready.then((axios) => {
94
- return axios.get(`/api/v2/coremde-sale/customer/types`);
113
+ return axios.get(`/api/v2/coremde-sale/customer/type/list`);
114
+ });
115
+ }
116
+ //获取客户类别列表
117
+ categories() {
118
+ return this.context.ready.then((axios) => {
119
+ return axios.get(`/api/v2/coremde-sale/customer/category/list`);
95
120
  });
96
121
  }
97
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -219,8 +219,12 @@ baseURL: "/"
219
219
  | cpzxrobot().customer.stat.china | 获得客户在全国的统计信息 |
220
220
  | cpzxrobot().customer.listByProvince | 获得客户在某个省的统计信息,传入province参数 |
221
221
  | cpzxrobot().customer.accountManager | 获得客户对应的销售员 |
222
+ | cpzxrobot().customer.delete | 删除客户,传入id参数 |
222
223
  | cpzxrobot().customer.types | 获得客户类型列表 |
223
224
  | cpzxrobot().customer.status | 获得客户状态列表 |
225
+ | cpzxrobot().customer.categories | 获得客户类别列表 |
226
+ | cpzxrobot().customer.count.byStatus | 获取客户状态列表及各状态下的客户数量 |
227
+ | cpzxrobot().customer.visit.list | 获取客户拜访列表 |
224
228
  | cpzxrobot().company.list | 获得公司列表,传入必要的分页参数 |
225
229
  | cpzxrobot().company.rank.byRevenue | 按公司营收获取排名,传入必要的分页参数 |
226
230
  | cpzxrobot().company.rank.byProfit | 按公司利润获取排名,传入必要的分页参数 |