@be-link/ecommerce-backend-bff-service-node-sdk 0.0.16 → 0.0.17

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.
Files changed (41) hide show
  1. package/cjs/bff/modules/pandora/product/service.d.ts +1 -1
  2. package/cjs/bff/modules/pandora/product/types.d.ts +12 -12
  3. package/cjs/bff/modules/pandora/productExp/service.d.ts +1 -1
  4. package/cjs/bff/modules/pandora/productExp/types.d.ts +7 -7
  5. package/cjs/bff/modules/pandora/productLive/service.d.ts +1 -1
  6. package/cjs/bff/modules/pandora/productLive/types.d.ts +4 -4
  7. package/cjs/bff/request/client.js +1 -1
  8. package/cjs/bff/request/strategy.d.ts +2 -2
  9. package/cjs/bff/request/strategy.js +107 -27
  10. package/cjs/index.d.ts +3 -15
  11. package/cjs/index.js +9 -17
  12. package/cjs/utils/string.js +33 -4
  13. package/esm/bff/modules/pandora/product/service.d.ts +1 -1
  14. package/esm/bff/modules/pandora/product/types.d.ts +12 -12
  15. package/esm/bff/modules/pandora/productExp/service.d.ts +1 -1
  16. package/esm/bff/modules/pandora/productExp/types.d.ts +7 -7
  17. package/esm/bff/modules/pandora/productLive/service.d.ts +1 -1
  18. package/esm/bff/modules/pandora/productLive/types.d.ts +4 -4
  19. package/esm/bff/request/client.mjs +1 -1
  20. package/esm/bff/request/strategy.d.ts +2 -2
  21. package/esm/bff/request/strategy.mjs +108 -28
  22. package/esm/index.d.ts +3 -15
  23. package/esm/index.mjs +0 -6
  24. package/esm/utils/string.mjs +33 -4
  25. package/package.json +3 -2
  26. package/cjs/bff/modules/pandora/store/service.d.ts +0 -77
  27. package/cjs/bff/modules/pandora/store/service.js +0 -107
  28. package/cjs/bff/modules/pandora/store/types.d.ts +0 -628
  29. package/cjs/bff/modules/pandora/store/types.js +0 -25
  30. package/cjs/bff/modules/pandora/storeSelection/service.d.ts +0 -47
  31. package/cjs/bff/modules/pandora/storeSelection/service.js +0 -67
  32. package/cjs/bff/modules/pandora/storeSelection/types.d.ts +0 -274
  33. package/cjs/bff/modules/pandora/storeSelection/types.js +0 -28
  34. package/esm/bff/modules/pandora/store/service.d.ts +0 -77
  35. package/esm/bff/modules/pandora/store/service.mjs +0 -100
  36. package/esm/bff/modules/pandora/store/types.d.ts +0 -628
  37. package/esm/bff/modules/pandora/store/types.mjs +0 -22
  38. package/esm/bff/modules/pandora/storeSelection/service.d.ts +0 -47
  39. package/esm/bff/modules/pandora/storeSelection/service.mjs +0 -60
  40. package/esm/bff/modules/pandora/storeSelection/types.d.ts +0 -274
  41. package/esm/bff/modules/pandora/storeSelection/types.mjs +0 -25
@@ -1,5 +1,5 @@
1
1
  import { StandardResponse } from '../../../../types';
2
- export declare namespace ProductLiveService {
2
+ export declare namespace PandoraProductLiveService {
3
3
  namespace Request {
4
4
  interface list {
5
5
  pageIndex: number;
@@ -30,14 +30,14 @@ export declare namespace ProductLiveService {
30
30
  /**
31
31
  * 商品列表
32
32
  */
33
- list(request: ProductLiveService.Request.list): Promise<StandardResponse<ProductLiveService.Response.list>>;
33
+ list(request: PandoraProductLiveService.Request.list): Promise<StandardResponse<PandoraProductLiveService.Response.list>>;
34
34
  /**
35
35
  * 新增商品
36
36
  */
37
- add(request: ProductLiveService.Request.operate): Promise<StandardResponse<void>>;
37
+ add(request: PandoraProductLiveService.Request.operate): Promise<StandardResponse<void>>;
38
38
  /**
39
39
  * 删除商品
40
40
  */
41
- remove(request: ProductLiveService.Request.operate): Promise<StandardResponse<void>>;
41
+ remove(request: PandoraProductLiveService.Request.operate): Promise<StandardResponse<void>>;
42
42
  }
43
43
  }
@@ -45,7 +45,7 @@ export class HttpClient {
45
45
  // 构造标准请求头
46
46
  const standardHeaders = {
47
47
  'Content-Type': 'application/json',
48
- 'X-Request-Id': requestId,
48
+ 'x-request-id': requestId,
49
49
  'x-belink-authorization': token,
50
50
  'x-belink-pandora-userid': userId,
51
51
  'x-belink-pandora-roleid': roleId,
@@ -34,12 +34,12 @@ export declare class WebRequestStrategy extends BaseRequestStrategy {
34
34
  request<T>(path: string, data?: any, headers?: Record<string, string>): Promise<T>;
35
35
  }
36
36
  /**
37
- * 微信小程序请求策略,使用 wx.cloud.callContainer
37
+ * 微信小程序请求策略,使用 wx.request
38
38
  * 为微信小程序环境实现请求策略
39
39
  */
40
40
  export declare class MiniProgramRequestStrategy extends BaseRequestStrategy {
41
41
  /**
42
- * 使用微信云托管容器 API 执行请求
42
+ * 使用 wx.request 执行 HTTP 请求
43
43
  * @param path - API 端点路径
44
44
  * @param data - 请求负载(可选)
45
45
  * @param headers - 要包含在请求中的额外请求头(可选)
@@ -1,6 +1,6 @@
1
1
  import axios from 'axios';
2
2
  import { SdkError, BizError, SystemError } from '../../errors/index.mjs';
3
- import { getContainerHost, getContainerEnv, getContainerService } from '../../utils/env.mjs';
3
+ import { getContainerHost } from '../../utils/env.mjs';
4
4
  /**
5
5
  * 请求策略的抽象基类
6
6
  * 定义所有请求策略的公共契约和共享实现
@@ -29,7 +29,7 @@ export class WebRequestStrategy extends BaseRequestStrategy {
29
29
  * @throws SystemError 如果是 5xx 服务器错误或网络错误
30
30
  */
31
31
  async request(path, data, headers = {}) {
32
- const requestId = headers['X-Request-Id'] || 'unknown';
32
+ const requestId = headers['x-request-id'] || 'unknown';
33
33
  const url = `${getContainerHost(this.environment)}${path}`;
34
34
  try {
35
35
  if (console?.info) {
@@ -92,12 +92,12 @@ export class WebRequestStrategy extends BaseRequestStrategy {
92
92
  }
93
93
  }
94
94
  /**
95
- * 微信小程序请求策略,使用 wx.cloud.callContainer
95
+ * 微信小程序请求策略,使用 wx.request
96
96
  * 为微信小程序环境实现请求策略
97
97
  */
98
98
  export class MiniProgramRequestStrategy extends BaseRequestStrategy {
99
99
  /**
100
- * 使用微信云托管容器 API 执行请求
100
+ * 使用 wx.request 执行 HTTP 请求
101
101
  * @param path - API 端点路径
102
102
  * @param data - 请求负载(可选)
103
103
  * @param headers - 要包含在请求中的额外请求头(可选)
@@ -106,40 +106,36 @@ export class MiniProgramRequestStrategy extends BaseRequestStrategy {
106
106
  * @throws SystemError 如果是 5xx 服务器错误或微信 API 错误
107
107
  */
108
108
  async request(path, data, headers = {}) {
109
- const requestId = headers['X-Request-Id'] || 'unknown';
109
+ const requestId = headers['x-request-id'] || 'unknown';
110
110
  try {
111
111
  // 类型守卫,确保 wx 可用
112
- // 使用 any 类型避免类型定义冲突
113
112
  const wxGlobal = typeof wx !== 'undefined' ? wx : null;
114
- if (!wxGlobal || !wxGlobal.cloud) {
113
+ if (!wxGlobal || !wxGlobal.request) {
115
114
  if (console?.error) {
116
115
  console.error(`[SDK][${requestId}] 微信小程序环境不可用`);
117
116
  }
118
117
  throw new SystemError('微信小程序环境不可用', 500);
119
118
  }
120
- // 构造包含微信特定字段的请求头
121
- const requestHeaders = {
122
- ...headers,
123
- 'X-WX-SERVICE': getContainerService(this.environment),
124
- };
119
+ // 构造完整的 URL
120
+ const url = `${getContainerHost(this.environment)}${path}`;
125
121
  if (console?.info) {
126
- console.info(`[SDK][${requestId}] 发起小程序云调用: ${path}`, `环境: ${getContainerEnv(this.environment)}`, data ? `参数: ${JSON.stringify(data)}` : '');
122
+ console.info(`[SDK][${requestId}] 发起小程序请求: ${url}`, data ? `参数: ${JSON.stringify(data)}` : '');
127
123
  }
128
- // 调用微信云托管容器
129
- const response = await wxGlobal.cloud.callContainer({
130
- config: {
131
- env: getContainerEnv(this.environment),
132
- },
133
- path,
134
- method: 'POST',
135
- header: requestHeaders,
136
- data,
137
- timeout: 100000, // 100 秒超时
124
+ // 使用 Promise 包装 wx.request
125
+ const response = await new Promise((resolve, reject) => {
126
+ wxGlobal.request({
127
+ url,
128
+ method: 'POST',
129
+ data,
130
+ header: {
131
+ 'content-type': 'application/json',
132
+ ...headers,
133
+ },
134
+ timeout: 60000, // 60 秒超时
135
+ success: (res) => resolve(res),
136
+ fail: (err) => reject(err),
137
+ });
138
138
  });
139
- // 记录微信云调用 ID
140
- if (console?.info && response.callID) {
141
- console.info(`[SDK][${requestId}] 微信云调用 ID: ${response.callID}`);
142
- }
143
139
  // 检查响应状态码是否表示成功
144
140
  if (response.statusCode >= 200 && response.statusCode < 300) {
145
141
  const responseData = response.data;
@@ -150,7 +146,7 @@ export class MiniProgramRequestStrategy extends BaseRequestStrategy {
150
146
  // 非 2xx 状态码
151
147
  const errorMessage = response.data?.message || '请求失败';
152
148
  if (console?.error) {
153
- console.error(`[SDK][${requestId}] HTTP 错误: ${errorMessage}`, `状态码: ${response.statusCode}`, `微信云调用 ID: ${response.callID || 'unknown'}`, `响应数据: ${JSON.stringify(response.data)}`);
149
+ console.error(`[SDK][${requestId}] HTTP 错误: ${errorMessage}`, `状态码: ${response.statusCode}`, `响应数据: ${JSON.stringify(response.data)}`);
154
150
  }
155
151
  const ErrorClass = response.statusCode >= 400 && response.statusCode < 500 ? BizError : SystemError;
156
152
  throw new ErrorClass(errorMessage, response.statusCode);
@@ -177,3 +173,87 @@ export class MiniProgramRequestStrategy extends BaseRequestStrategy {
177
173
  }
178
174
  }
179
175
  }
176
+ /* ============================================
177
+ * 旧版本:使用 wx.cloud.callContainer(已废弃)
178
+ * ============================================
179
+ *
180
+ * export class MiniProgramRequestStrategy extends BaseRequestStrategy {
181
+ * async request<T>(path: string, data?: any, headers: Record<string, string> = {}): Promise<T> {
182
+ * const requestId = headers['x-request-id'] || 'unknown'
183
+ *
184
+ * try {
185
+ * const wxGlobal = typeof wx !== 'undefined' ? (wx as any) : null
186
+ * if (!wxGlobal || !wxGlobal.cloud) {
187
+ * if (console?.error) {
188
+ * console.error(`[SDK][${requestId}] 微信小程序环境不可用`)
189
+ * }
190
+ * throw new SystemError('微信小程序环境不可用', 500)
191
+ * }
192
+ *
193
+ * const requestHeaders = {
194
+ * ...headers,
195
+ * 'X-WX-SERVICE': getContainerService(this.environment),
196
+ * }
197
+ *
198
+ * if (console?.info) {
199
+ * console.info(
200
+ * `[SDK][${requestId}] 发起小程序云调用: ${path}`,
201
+ * `环境: ${getContainerEnv(this.environment)}`,
202
+ * data ? `参数: ${JSON.stringify(data)}` : '',
203
+ * )
204
+ * }
205
+ *
206
+ * const response = await wxGlobal.cloud.callContainer({
207
+ * config: {
208
+ * env: getContainerEnv(this.environment),
209
+ * },
210
+ * path,
211
+ * method: 'POST',
212
+ * header: requestHeaders,
213
+ * data,
214
+ * timeout: 100000,
215
+ * })
216
+ *
217
+ * if (console?.info && response.callID) {
218
+ * console.info(`[SDK][${requestId}] 微信云调用 ID: ${response.callID}`)
219
+ * }
220
+ *
221
+ * if (response.statusCode >= 200 && response.statusCode < 300) {
222
+ * const responseData = response.data
223
+ * return responseData as T
224
+ * }
225
+ *
226
+ * const errorMessage = response.data?.message || '请求失败'
227
+ * if (console?.error) {
228
+ * console.error(
229
+ * `[SDK][${requestId}] HTTP 错误: ${errorMessage}`,
230
+ * `状态码: ${response.statusCode}`,
231
+ * `微信云调用 ID: ${response.callID || 'unknown'}`,
232
+ * `响应数据: ${JSON.stringify(response.data)}`,
233
+ * )
234
+ * }
235
+ * const ErrorClass =
236
+ * response.statusCode >= 400 && response.statusCode < 500 ? BizError : SystemError
237
+ * throw new ErrorClass(errorMessage, response.statusCode)
238
+ * } catch (error) {
239
+ * if (error instanceof SdkError) {
240
+ * throw error
241
+ * }
242
+ *
243
+ * if (error && typeof error === 'object' && 'errMsg' in error) {
244
+ * const errorMessage = (error as any).errMsg || '微信 API 调用失败'
245
+ * if (console?.error) {
246
+ * console.error(`[SDK][${requestId}] 微信 API 错误: ${errorMessage}`)
247
+ * }
248
+ * throw new SystemError(errorMessage, 500)
249
+ * }
250
+ *
251
+ * const errorMessage = error instanceof Error ? error.message : '发生未知错误'
252
+ * if (console?.error) {
253
+ * console.error(`[SDK][${requestId}] 未知错误: ${errorMessage}`)
254
+ * }
255
+ * throw new SystemError(errorMessage, 500)
256
+ * }
257
+ * }
258
+ * }
259
+ */
package/esm/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  import { PandoraExampleService } from './bff/modules/pandora/example/service';
2
- import { PandoraStoreService } from './bff/modules/pandora/store/service';
3
- import { PandoraStoreSelectionService } from './bff/modules/pandora/storeSelection/service';
4
2
  import { MiniProgramDemoService } from './bff/modules/miniprogram/demo/service';
5
3
  import { PandoraProductService } from './bff/modules/pandora/product/service';
6
4
  import { PandoraProductExpService } from './bff/modules/pandora/productExp/service';
@@ -22,14 +20,6 @@ export declare class PandoraSDK {
22
20
  product: PandoraProductService;
23
21
  productExp: PandoraProductExpService;
24
22
  productLive: PandoraProductLiveService;
25
- /**
26
- * Pandora 门店服务模块
27
- */
28
- store: PandoraStoreService;
29
- /**
30
- * Pandora 圈选门店服务模块
31
- */
32
- storeSelection: PandoraStoreSelectionService;
33
23
  /**
34
24
  * 使用配置选项初始化 Pandora SDK
35
25
  * @param options - SDK 配置,包含凭证回调函数
@@ -60,8 +50,6 @@ export { SdkOptions, IRequestStrategy, StandardResponse } from './types';
60
50
  export * from './enums';
61
51
  export { Service as MiniProgramDemoTypes } from './bff/modules/miniprogram/demo/types';
62
52
  export { Service as PandoraExampleTypes } from './bff/modules/pandora/example/types';
63
- export { Service as PandoraStoreTypes } from './bff/modules/pandora/store/types';
64
- export { Service as PandoraStoreSelectionTypes } from './bff/modules/pandora/storeSelection/types';
65
- export { ProductService as PandoraProductServiceTypes } from './bff/modules/pandora/product/types';
66
- export { ProductExpService as PandoraProductExpServiceTypes } from './bff/modules/pandora/productExp/types';
67
- export { ProductLiveService as PandoraProductLiveServiceTypes } from './bff/modules/pandora/productLive/types';
53
+ export { PandoraProductService as PandoraProductServiceTypes } from './bff/modules/pandora/product/types';
54
+ export { PandoraProductExpService as PandoraProductExpServiceTypes } from './bff/modules/pandora/productExp/types';
55
+ export { PandoraProductLiveService as PandoraProductLiveServiceTypes } from './bff/modules/pandora/productLive/types';
package/esm/index.mjs CHANGED
@@ -1,7 +1,5 @@
1
1
  import { HttpClient } from './bff/request/client.mjs';
2
2
  import { PandoraExampleService } from './bff/modules/pandora/example/service.mjs';
3
- import { PandoraStoreService } from './bff/modules/pandora/store/service.mjs';
4
- import { PandoraStoreSelectionService } from './bff/modules/pandora/storeSelection/service.mjs';
5
3
  import { MiniProgramDemoService } from './bff/modules/miniprogram/demo/service.mjs';
6
4
  import { PandoraProductService } from './bff/modules/pandora/product/service.mjs';
7
5
  import { PandoraProductExpService } from './bff/modules/pandora/productExp/service.mjs';
@@ -20,8 +18,6 @@ export class PandoraSDK {
20
18
  this.http = new HttpClient(options);
21
19
  // 使用 HttpClient 实例化所有 Pandora 服务模块
22
20
  this.example = new PandoraExampleService(this.http);
23
- this.store = new PandoraStoreService(this.http);
24
- this.storeSelection = new PandoraStoreSelectionService(this.http);
25
21
  this.product = new PandoraProductService(this.http);
26
22
  this.productExp = new PandoraProductExpService(this.http);
27
23
  this.productLive = new PandoraProductLiveService(this.http);
@@ -48,5 +44,3 @@ export class MiniProgramSDK {
48
44
  export { SdkError, BizError, SystemError } from './errors/index.mjs';
49
45
  // 枚举和常量
50
46
  export * from './enums.mjs';
51
- export { Service as PandoraStoreTypes } from './bff/modules/pandora/store/types.mjs';
52
- export { Service as PandoraStoreSelectionTypes } from './bff/modules/pandora/storeSelection/types.mjs';
@@ -27,10 +27,39 @@ export function generateUUID() {
27
27
  if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
28
28
  return crypto.randomUUID();
29
29
  }
30
- // 降级方案:使用 Math.random() 生成 UUID v4
31
- // 格式:xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
32
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
33
- const r = (Math.random() * 16) | 0;
30
+ // 降级方案 1:使用 crypto.getRandomValues(浏览器和 Node.js)
31
+ if (typeof crypto !== 'undefined' && typeof crypto.getRandomValues === 'function') {
32
+ const bytes = new Uint8Array(16);
33
+ crypto.getRandomValues(bytes);
34
+ // 设置 UUID v4 的版本位和变体位
35
+ bytes[6] = (bytes[6] & 0x0f) | 0x40; // 版本 4
36
+ bytes[8] = (bytes[8] & 0x3f) | 0x80; // 变体 10
37
+ // 转换为 UUID 字符串格式
38
+ const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join('');
39
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20, 32)}`;
40
+ }
41
+ // 降级方案 2:微信小程序环境(尝试使用 wx.getRandomValues)
42
+ if (typeof wx !== 'undefined' && typeof wx.getRandomValues === 'function') {
43
+ try {
44
+ const bytes = new Uint8Array(16);
45
+ wx.getRandomValues(bytes);
46
+ bytes[6] = (bytes[6] & 0x0f) | 0x40;
47
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
48
+ const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join('');
49
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20, 32)}`;
50
+ }
51
+ catch (e) {
52
+ // 如果失败,继续使用最后的降级方案
53
+ }
54
+ }
55
+ // 最后的降级方案:使用增强的 Math.random()
56
+ // 结合时间戳和计数器来减少碰撞概率
57
+ const timestamp = Date.now();
58
+ const counter = generateUUID._counter || 0;
59
+ generateUUID._counter = (counter + 1) % 10000;
60
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c, i) => {
61
+ // 混合时间戳、计数器和随机数
62
+ const r = ((Math.random() * 16) | 0) ^ ((timestamp >> (i * 2)) & 0xf) ^ (counter & 0xf);
34
63
  const v = c === 'x' ? r : (r & 0x3) | 0x8;
35
64
  return v.toString(16);
36
65
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-backend-bff-service-node-sdk",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "EcommerceBackendBffService Node.js SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./cjs/index.js",
@@ -24,7 +24,8 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "axios": "1.13.2"
27
+ "axios": "1.13.2",
28
+ "@be-link/ecommerce-product-service-node-sdk": "^0.0.2"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@types/node": "^20.0.0",
@@ -1,77 +0,0 @@
1
- import { Service } from './types';
2
- import BaseService from '../../BaseService';
3
- import type { StandardResponse } from '../../../../types';
4
- /**
5
- * PandoraStoreService - Pandora Store 服务模块
6
- * 提供门店管理相关的 API 方法
7
- * 平台: pandora
8
- */
9
- export declare class PandoraStoreService extends BaseService {
10
- protected prefixUrl: string;
11
- /**
12
- * 创建门店
13
- * @param request - 请求参数
14
- * @returns Promise,解析为标准响应格式
15
- */
16
- createStore(request: Service.Request.createStore): Promise<StandardResponse<Service.Response.createStore>>;
17
- /**
18
- * 编辑门店信息
19
- * @param request - 请求参数
20
- * @returns Promise,解析为标准响应格式
21
- */
22
- updateStoreInfo(request: Service.Request.updateStoreInfo): Promise<StandardResponse<Service.Response.updateStoreInfo>>;
23
- /**
24
- * 获取门店详情
25
- * @param request - 请求参数
26
- * @returns Promise,解析为标准响应格式
27
- */
28
- getStoreDetail(request: Service.Request.getStoreDetail): Promise<StandardResponse<Service.Response.getStoreDetail>>;
29
- /**
30
- * 获取门店列表
31
- * @param request - 请求参数
32
- * @returns Promise,解析为标准响应格式
33
- */
34
- getStoreList(request: Service.Request.getStoreList): Promise<StandardResponse<Service.Response.getStoreList>>;
35
- /**
36
- * 批量修改门店经营状态
37
- * @param request - 请求参数
38
- * @returns Promise,解析为标准响应格式
39
- */
40
- batchUpdateBusinessStatus(request: Service.Request.batchUpdateBusinessStatus): Promise<StandardResponse<Service.Response.batchUpdateBusinessStatus>>;
41
- /**
42
- * 绑定用户到门店
43
- * @param request - 请求参数
44
- * @returns Promise,解析为标准响应格式
45
- */
46
- bindUserToStore(request: Service.Request.bindUserToStore): Promise<StandardResponse<Service.Response.bindUserToStore>>;
47
- /**
48
- * 解绑用户
49
- * @param request - 请求参数
50
- * @returns Promise,解析为标准响应格式
51
- */
52
- unbindUserFromStore(request: Service.Request.unbindUserFromStore): Promise<StandardResponse<Service.Response.unbindUserFromStore>>;
53
- /**
54
- * 创建门店分组
55
- * @param request - 请求参数
56
- * @returns Promise,解析为标准响应格式
57
- */
58
- createStoreGroup(request: Service.Request.createStoreGroup): Promise<StandardResponse<Service.Response.createStoreGroup>>;
59
- /**
60
- * 编辑门店分组
61
- * @param request - 请求参数
62
- * @returns Promise,解析为标准响应格式
63
- */
64
- editStoreGroup(request: Service.Request.editStoreGroup): Promise<StandardResponse<Service.Response.editStoreGroup>>;
65
- /**
66
- * 删除门店分组
67
- * @param request - 请求参数
68
- * @returns Promise,解析为标准响应格式
69
- */
70
- deleteStoreGroup(request: Service.Request.deleteStoreGroup): Promise<StandardResponse<Service.Response.deleteStoreGroup>>;
71
- /**
72
- * 查询门店分组列表
73
- * @param request - 请求参数
74
- * @returns Promise,解析为标准响应格式
75
- */
76
- getStoreGroupList(request: Service.Request.getStoreGroupList): Promise<StandardResponse<Service.Response.getStoreGroupList>>;
77
- }
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PandoraStoreService = void 0;
7
- const BaseService_1 = __importDefault(require("../../BaseService"));
8
- /**
9
- * PandoraStoreService - Pandora Store 服务模块
10
- * 提供门店管理相关的 API 方法
11
- * 平台: pandora
12
- */
13
- class PandoraStoreService extends BaseService_1.default {
14
- constructor() {
15
- super(...arguments);
16
- this.prefixUrl = '/pandora/store';
17
- }
18
- /**
19
- * 创建门店
20
- * @param request - 请求参数
21
- * @returns Promise,解析为标准响应格式
22
- */
23
- createStore(request) {
24
- return this.request(this.createStore, request);
25
- }
26
- /**
27
- * 编辑门店信息
28
- * @param request - 请求参数
29
- * @returns Promise,解析为标准响应格式
30
- */
31
- updateStoreInfo(request) {
32
- return this.request(this.updateStoreInfo, request);
33
- }
34
- /**
35
- * 获取门店详情
36
- * @param request - 请求参数
37
- * @returns Promise,解析为标准响应格式
38
- */
39
- getStoreDetail(request) {
40
- return this.request(this.getStoreDetail, request);
41
- }
42
- /**
43
- * 获取门店列表
44
- * @param request - 请求参数
45
- * @returns Promise,解析为标准响应格式
46
- */
47
- getStoreList(request) {
48
- return this.request(this.getStoreList, request);
49
- }
50
- /**
51
- * 批量修改门店经营状态
52
- * @param request - 请求参数
53
- * @returns Promise,解析为标准响应格式
54
- */
55
- batchUpdateBusinessStatus(request) {
56
- return this.request(this.batchUpdateBusinessStatus, request);
57
- }
58
- /**
59
- * 绑定用户到门店
60
- * @param request - 请求参数
61
- * @returns Promise,解析为标准响应格式
62
- */
63
- bindUserToStore(request) {
64
- return this.request(this.bindUserToStore, request);
65
- }
66
- /**
67
- * 解绑用户
68
- * @param request - 请求参数
69
- * @returns Promise,解析为标准响应格式
70
- */
71
- unbindUserFromStore(request) {
72
- return this.request(this.unbindUserFromStore, request);
73
- }
74
- /**
75
- * 创建门店分组
76
- * @param request - 请求参数
77
- * @returns Promise,解析为标准响应格式
78
- */
79
- createStoreGroup(request) {
80
- return this.request(this.createStoreGroup, request);
81
- }
82
- /**
83
- * 编辑门店分组
84
- * @param request - 请求参数
85
- * @returns Promise,解析为标准响应格式
86
- */
87
- editStoreGroup(request) {
88
- return this.request(this.editStoreGroup, request);
89
- }
90
- /**
91
- * 删除门店分组
92
- * @param request - 请求参数
93
- * @returns Promise,解析为标准响应格式
94
- */
95
- deleteStoreGroup(request) {
96
- return this.request(this.deleteStoreGroup, request);
97
- }
98
- /**
99
- * 查询门店分组列表
100
- * @param request - 请求参数
101
- * @returns Promise,解析为标准响应格式
102
- */
103
- getStoreGroupList(request) {
104
- return this.request(this.getStoreGroupList, request);
105
- }
106
- }
107
- exports.PandoraStoreService = PandoraStoreService;