@be-link/ecommerce-backend-bff-service-node-sdk 0.0.63 → 0.0.64
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.
- package/cjs/bff/modules/pandora/pointsMall/service.d.ts +53 -0
- package/cjs/bff/modules/pandora/pointsMall/service.js +75 -0
- package/cjs/bff/modules/pandora/pointsMall/types.d.ts +193 -0
- package/cjs/bff/modules/pandora/pointsMall/types.js +2 -0
- package/cjs/enums.d.ts +1 -0
- package/cjs/enums.js +7 -5
- package/esm/bff/modules/pandora/pointsMall/service.d.ts +53 -0
- package/esm/bff/modules/pandora/pointsMall/service.mjs +68 -0
- package/esm/bff/modules/pandora/pointsMall/types.d.ts +193 -0
- package/esm/bff/modules/pandora/pointsMall/types.mjs +1 -0
- package/esm/enums.d.ts +1 -0
- package/esm/enums.mjs +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* PandoraPointsMallService - Pandora Points Mall 服务模块
|
|
6
|
+
* 提供积分商城管理相关的 API 方法
|
|
7
|
+
* 平台: pandora
|
|
8
|
+
*/
|
|
9
|
+
export declare class PandoraPointsMallService extends BaseService implements Service.Controller.PointsMallController {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
/**
|
|
12
|
+
* 批量创建积分商城商品
|
|
13
|
+
* @param request - 请求参数
|
|
14
|
+
* @returns Promise,解析为标准响应格式
|
|
15
|
+
*/
|
|
16
|
+
batchCreateProducts(request: Service.Request.batchCreateProducts): Promise<StandardResponse<Service.Response.batchCreateProducts>>;
|
|
17
|
+
/**
|
|
18
|
+
* 批量编辑积分商城商品
|
|
19
|
+
* @param request - 请求参数
|
|
20
|
+
* @returns Promise,解析为标准响应格式
|
|
21
|
+
*/
|
|
22
|
+
batchUpdateProducts(request: Service.Request.batchUpdateProducts): Promise<StandardResponse<void>>;
|
|
23
|
+
/**
|
|
24
|
+
* 批量是否开启
|
|
25
|
+
* @param request - 请求参数
|
|
26
|
+
* @returns Promise,解析为标准响应格式
|
|
27
|
+
*/
|
|
28
|
+
batchToggleProductEnabled(request: Service.Request.batchToggleProductEnabled): Promise<StandardResponse<void>>;
|
|
29
|
+
/**
|
|
30
|
+
* 批量是否上下架
|
|
31
|
+
* @param request - 请求参数
|
|
32
|
+
* @returns Promise,解析为标准响应格式
|
|
33
|
+
*/
|
|
34
|
+
batchToggleProductOnline(request: Service.Request.batchToggleProductOnline): Promise<StandardResponse<void>>;
|
|
35
|
+
/**
|
|
36
|
+
* 根据条件查询积分商城商品
|
|
37
|
+
* @param request - 请求参数
|
|
38
|
+
* @returns Promise,解析为标准响应格式
|
|
39
|
+
*/
|
|
40
|
+
queryProducts(request: Service.Request.queryProducts): Promise<StandardResponse<Service.Response.queryProducts>>;
|
|
41
|
+
/**
|
|
42
|
+
* 根据商品ID查询商品详情
|
|
43
|
+
* @param request - 请求参数
|
|
44
|
+
* @returns Promise,解析为标准响应格式
|
|
45
|
+
*/
|
|
46
|
+
getProductDetail(request: Service.Request.getProductDetail): Promise<StandardResponse<Service.Response.getProductDetail>>;
|
|
47
|
+
/**
|
|
48
|
+
* 查询开启且上架的积分商城列表
|
|
49
|
+
* @param request - 请求参数
|
|
50
|
+
* @returns Promise,解析为标准响应格式
|
|
51
|
+
*/
|
|
52
|
+
queryEnabledAndOnlineProducts(request: Service.Request.queryEnabledAndOnlineProducts): Promise<StandardResponse<Service.Response.queryEnabledAndOnlineProducts>>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.PandoraPointsMallService = void 0;
|
|
7
|
+
const BaseService_1 = __importDefault(require("../../BaseService"));
|
|
8
|
+
/**
|
|
9
|
+
* PandoraPointsMallService - Pandora Points Mall 服务模块
|
|
10
|
+
* 提供积分商城管理相关的 API 方法
|
|
11
|
+
* 平台: pandora
|
|
12
|
+
*/
|
|
13
|
+
class PandoraPointsMallService extends BaseService_1.default {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.prefixUrl = '/pandora/points-mall';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 批量创建积分商城商品
|
|
20
|
+
* @param request - 请求参数
|
|
21
|
+
* @returns Promise,解析为标准响应格式
|
|
22
|
+
*/
|
|
23
|
+
batchCreateProducts(request) {
|
|
24
|
+
return this.request(this.batchCreateProducts, request);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 批量编辑积分商城商品
|
|
28
|
+
* @param request - 请求参数
|
|
29
|
+
* @returns Promise,解析为标准响应格式
|
|
30
|
+
*/
|
|
31
|
+
batchUpdateProducts(request) {
|
|
32
|
+
return this.request(this.batchUpdateProducts, request);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 批量是否开启
|
|
36
|
+
* @param request - 请求参数
|
|
37
|
+
* @returns Promise,解析为标准响应格式
|
|
38
|
+
*/
|
|
39
|
+
batchToggleProductEnabled(request) {
|
|
40
|
+
return this.request(this.batchToggleProductEnabled, request);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 批量是否上下架
|
|
44
|
+
* @param request - 请求参数
|
|
45
|
+
* @returns Promise,解析为标准响应格式
|
|
46
|
+
*/
|
|
47
|
+
batchToggleProductOnline(request) {
|
|
48
|
+
return this.request(this.batchToggleProductOnline, request);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 根据条件查询积分商城商品
|
|
52
|
+
* @param request - 请求参数
|
|
53
|
+
* @returns Promise,解析为标准响应格式
|
|
54
|
+
*/
|
|
55
|
+
queryProducts(request) {
|
|
56
|
+
return this.request(this.queryProducts, request);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 根据商品ID查询商品详情
|
|
60
|
+
* @param request - 请求参数
|
|
61
|
+
* @returns Promise,解析为标准响应格式
|
|
62
|
+
*/
|
|
63
|
+
getProductDetail(request) {
|
|
64
|
+
return this.request(this.getProductDetail, request);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 查询开启且上架的积分商城列表
|
|
68
|
+
* @param request - 请求参数
|
|
69
|
+
* @returns Promise,解析为标准响应格式
|
|
70
|
+
*/
|
|
71
|
+
queryEnabledAndOnlineProducts(request) {
|
|
72
|
+
return this.request(this.queryEnabledAndOnlineProducts, request);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.PandoraPointsMallService = PandoraPointsMallService;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { PROMOTION_ENUM } from '../../../../enums';
|
|
2
|
+
import type { StandardResponse } from '../../../../types';
|
|
3
|
+
export declare namespace Service {
|
|
4
|
+
namespace Entity {
|
|
5
|
+
/** 商品积分兑换配置 */
|
|
6
|
+
interface ProductPointExchange {
|
|
7
|
+
/** 主键ID */
|
|
8
|
+
id: string;
|
|
9
|
+
/** 创建时间 */
|
|
10
|
+
createdAt: number;
|
|
11
|
+
/** 更新时间 */
|
|
12
|
+
updatedAt: number;
|
|
13
|
+
/** 删除时间 */
|
|
14
|
+
deletedAt: number;
|
|
15
|
+
/** 商品ID */
|
|
16
|
+
productId: string;
|
|
17
|
+
/** 所需券的数量 */
|
|
18
|
+
couponRequired: number;
|
|
19
|
+
/** 所需积分的数量 */
|
|
20
|
+
pointsRequired: number;
|
|
21
|
+
/** 兑换类型 */
|
|
22
|
+
exchangeType: PROMOTION_ENUM.POINT_MALL.ExchangeType;
|
|
23
|
+
/** 是否开启 */
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
/** 是否上架 */
|
|
26
|
+
online: boolean;
|
|
27
|
+
/** 排序权重 */
|
|
28
|
+
sortOrder: number;
|
|
29
|
+
}
|
|
30
|
+
/** 后台管理列表 - 完整12个字段 */
|
|
31
|
+
interface AdminProductItem {
|
|
32
|
+
id: string;
|
|
33
|
+
sortOrder: number;
|
|
34
|
+
productName: string;
|
|
35
|
+
productId: string;
|
|
36
|
+
skuSpecs: string[];
|
|
37
|
+
salePrice: number;
|
|
38
|
+
online: boolean;
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
exchangeType: PROMOTION_ENUM.POINT_MALL.ExchangeType;
|
|
41
|
+
stock: number;
|
|
42
|
+
limitPerUser?: number;
|
|
43
|
+
pointsRequired: number;
|
|
44
|
+
couponRequired: number;
|
|
45
|
+
productImage: string;
|
|
46
|
+
}
|
|
47
|
+
/** C端积分商城列表 - 精确7个字段 */
|
|
48
|
+
interface ClientProductItem {
|
|
49
|
+
id: string;
|
|
50
|
+
sortOrder: number;
|
|
51
|
+
productName: string;
|
|
52
|
+
productId: string;
|
|
53
|
+
productImage: string;
|
|
54
|
+
exchangeType: PROMOTION_ENUM.POINT_MALL.ExchangeType;
|
|
55
|
+
pointsRequired: number;
|
|
56
|
+
couponRequired: number;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
namespace Request {
|
|
60
|
+
interface BaseParams {
|
|
61
|
+
productId: string;
|
|
62
|
+
pointsRequired?: number;
|
|
63
|
+
couponRequired?: number;
|
|
64
|
+
exchangeType: PROMOTION_ENUM.POINT_MALL.ExchangeType;
|
|
65
|
+
online?: boolean;
|
|
66
|
+
sortOrder?: number;
|
|
67
|
+
}
|
|
68
|
+
export interface CreateProduct extends BaseParams {
|
|
69
|
+
}
|
|
70
|
+
export interface UpdateProduct extends Partial<BaseParams> {
|
|
71
|
+
id: string;
|
|
72
|
+
}
|
|
73
|
+
/** 批量创建积分商城商品 */
|
|
74
|
+
export interface batchCreateProducts {
|
|
75
|
+
items: CreateProduct[];
|
|
76
|
+
}
|
|
77
|
+
/** 批量编辑积分商城商品 */
|
|
78
|
+
export interface batchUpdateProducts {
|
|
79
|
+
items: UpdateProduct[];
|
|
80
|
+
}
|
|
81
|
+
/** 批量是否开启 */
|
|
82
|
+
export interface batchToggleProductEnabled {
|
|
83
|
+
/** 主键ID列表 */
|
|
84
|
+
ids: string[];
|
|
85
|
+
/** 是否开启 */
|
|
86
|
+
enabled: boolean;
|
|
87
|
+
}
|
|
88
|
+
/** 批量是否上下架 */
|
|
89
|
+
export interface batchToggleProductOnline {
|
|
90
|
+
/** 主键ID列表 */
|
|
91
|
+
ids: string[];
|
|
92
|
+
/** 是否上架 */
|
|
93
|
+
online: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** 根据条件查询积分商城商品 */
|
|
96
|
+
export interface queryProducts {
|
|
97
|
+
/** 商品ID */
|
|
98
|
+
productIds?: string[];
|
|
99
|
+
/** 是否上架,传null/undefined表示不筛选 */
|
|
100
|
+
online?: boolean | null | undefined;
|
|
101
|
+
/** 是否开启,传null/undefined表示不筛选 */
|
|
102
|
+
enabled?: boolean | null | undefined;
|
|
103
|
+
/** 页码 */
|
|
104
|
+
page?: number;
|
|
105
|
+
/** 每页数量 */
|
|
106
|
+
pageSize?: number;
|
|
107
|
+
}
|
|
108
|
+
/** 查询开启且上架的积分商城列表 */
|
|
109
|
+
export interface queryEnabledAndOnlineProducts {
|
|
110
|
+
/** 页码 */
|
|
111
|
+
page?: number;
|
|
112
|
+
/** 每页数量 */
|
|
113
|
+
pageSize?: number;
|
|
114
|
+
}
|
|
115
|
+
/** 根据商品ID查询商品详情 */
|
|
116
|
+
export interface getProductDetail {
|
|
117
|
+
/** 商品ID */
|
|
118
|
+
productId: string;
|
|
119
|
+
}
|
|
120
|
+
export {};
|
|
121
|
+
}
|
|
122
|
+
namespace Response {
|
|
123
|
+
/** 创建积分商城商品响应 */
|
|
124
|
+
interface createProduct {
|
|
125
|
+
/** 主键ID */
|
|
126
|
+
id: string;
|
|
127
|
+
}
|
|
128
|
+
/** 批量创建积分商城商品响应 */
|
|
129
|
+
interface batchCreateProducts {
|
|
130
|
+
/** 创建成功的ID列表 */
|
|
131
|
+
ids: string[];
|
|
132
|
+
}
|
|
133
|
+
/** 查询积分商城商品响应 */
|
|
134
|
+
interface queryProducts {
|
|
135
|
+
/** 商品列表 */
|
|
136
|
+
items: Entity.AdminProductItem[];
|
|
137
|
+
/** 总数 */
|
|
138
|
+
total: number;
|
|
139
|
+
/** 当前页码 */
|
|
140
|
+
page: number;
|
|
141
|
+
/** 每页数量 */
|
|
142
|
+
pageSize: number;
|
|
143
|
+
}
|
|
144
|
+
/** 查询商品详情响应 */
|
|
145
|
+
interface getProductDetail {
|
|
146
|
+
/** 商品详情 */
|
|
147
|
+
data: Entity.ProductPointExchange;
|
|
148
|
+
}
|
|
149
|
+
/** 查询开启且上架的积分商城列表响应 */
|
|
150
|
+
interface queryEnabledAndOnlineProducts {
|
|
151
|
+
/** 商品列表 */
|
|
152
|
+
items: Entity.ClientProductItem[];
|
|
153
|
+
/** 总数 */
|
|
154
|
+
total: number;
|
|
155
|
+
/** 当前页码 */
|
|
156
|
+
page: number;
|
|
157
|
+
/** 每页数量 */
|
|
158
|
+
pageSize: number;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
namespace Controller {
|
|
162
|
+
interface PointsMallController {
|
|
163
|
+
/**
|
|
164
|
+
* 批量创建积分商城商品
|
|
165
|
+
*/
|
|
166
|
+
batchCreateProducts(request: Service.Request.batchCreateProducts): Promise<StandardResponse<Service.Response.batchCreateProducts>>;
|
|
167
|
+
/**
|
|
168
|
+
* 批量编辑积分商城商品
|
|
169
|
+
*/
|
|
170
|
+
batchUpdateProducts(request: Service.Request.batchUpdateProducts): Promise<StandardResponse<void>>;
|
|
171
|
+
/**
|
|
172
|
+
* 批量是否开启
|
|
173
|
+
*/
|
|
174
|
+
batchToggleProductEnabled(request: Service.Request.batchToggleProductEnabled): Promise<StandardResponse<void>>;
|
|
175
|
+
/**
|
|
176
|
+
* 批量是否上下架
|
|
177
|
+
*/
|
|
178
|
+
batchToggleProductOnline(request: Service.Request.batchToggleProductOnline): Promise<StandardResponse<void>>;
|
|
179
|
+
/**
|
|
180
|
+
* 根据条件查询积分商城商品
|
|
181
|
+
*/
|
|
182
|
+
queryProducts(request: Service.Request.queryProducts): Promise<StandardResponse<Service.Response.queryProducts>>;
|
|
183
|
+
/**
|
|
184
|
+
* 根据商品ID查询商品详情
|
|
185
|
+
*/
|
|
186
|
+
getProductDetail(request: Service.Request.getProductDetail): Promise<StandardResponse<Service.Response.getProductDetail>>;
|
|
187
|
+
/**
|
|
188
|
+
* 查询开启且上架的积分商城列表
|
|
189
|
+
*/
|
|
190
|
+
queryEnabledAndOnlineProducts(request: Service.Request.queryEnabledAndOnlineProducts): Promise<StandardResponse<Service.Response.queryEnabledAndOnlineProducts>>;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
package/cjs/enums.d.ts
CHANGED
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { ENUM as PRODUCT_SERVICE_ENUM } from '@be-link/ecommerce-product-service-node-sdk/enum';
|
|
6
6
|
export { ENUM as STORE_SERVICE_ENUM } from '@be-link/ecommerce-store-service-node-sdk/enums';
|
|
7
|
+
export { ENUM as PROMOTION_ENUM } from '@be-link/ecommerce-promotion-service-node-sdk/enum';
|
|
7
8
|
export { ENUM as ROOM_SERVICE_ENUM } from '@be-link/ecommerce-client-backend-service-node-sdk/enum';
|
|
8
9
|
export { ENUM as PROMOTION_SERVICE_ENUM } from '@be-link/ecommerce-promotion-service-node-sdk/enum';
|
package/cjs/enums.js
CHANGED
|
@@ -4,15 +4,17 @@
|
|
|
4
4
|
* 集中管理所有第三方服务 SDK 的枚举和常量
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.PROMOTION_SERVICE_ENUM = exports.ROOM_SERVICE_ENUM = exports.STORE_SERVICE_ENUM = exports.PRODUCT_SERVICE_ENUM = void 0;
|
|
7
|
+
exports.PROMOTION_SERVICE_ENUM = exports.ROOM_SERVICE_ENUM = exports.PROMOTION_ENUM = exports.STORE_SERVICE_ENUM = exports.PRODUCT_SERVICE_ENUM = void 0;
|
|
8
8
|
// 商品服务枚举
|
|
9
9
|
var enum_1 = require("@be-link/ecommerce-product-service-node-sdk/enum");
|
|
10
10
|
Object.defineProperty(exports, "PRODUCT_SERVICE_ENUM", { enumerable: true, get: function () { return enum_1.ENUM; } });
|
|
11
11
|
var enums_1 = require("@be-link/ecommerce-store-service-node-sdk/enums");
|
|
12
12
|
Object.defineProperty(exports, "STORE_SERVICE_ENUM", { enumerable: true, get: function () { return enums_1.ENUM; } });
|
|
13
|
+
var enum_2 = require("@be-link/ecommerce-promotion-service-node-sdk/enum");
|
|
14
|
+
Object.defineProperty(exports, "PROMOTION_ENUM", { enumerable: true, get: function () { return enum_2.ENUM; } });
|
|
13
15
|
// 直播间枚举
|
|
14
|
-
var
|
|
15
|
-
Object.defineProperty(exports, "ROOM_SERVICE_ENUM", { enumerable: true, get: function () { return
|
|
16
|
+
var enum_3 = require("@be-link/ecommerce-client-backend-service-node-sdk/enum");
|
|
17
|
+
Object.defineProperty(exports, "ROOM_SERVICE_ENUM", { enumerable: true, get: function () { return enum_3.ENUM; } });
|
|
16
18
|
// 优惠券服务枚举
|
|
17
|
-
var
|
|
18
|
-
Object.defineProperty(exports, "PROMOTION_SERVICE_ENUM", { enumerable: true, get: function () { return
|
|
19
|
+
var enum_4 = require("@be-link/ecommerce-promotion-service-node-sdk/enum");
|
|
20
|
+
Object.defineProperty(exports, "PROMOTION_SERVICE_ENUM", { enumerable: true, get: function () { return enum_4.ENUM; } });
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* PandoraPointsMallService - Pandora Points Mall 服务模块
|
|
6
|
+
* 提供积分商城管理相关的 API 方法
|
|
7
|
+
* 平台: pandora
|
|
8
|
+
*/
|
|
9
|
+
export declare class PandoraPointsMallService extends BaseService implements Service.Controller.PointsMallController {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
/**
|
|
12
|
+
* 批量创建积分商城商品
|
|
13
|
+
* @param request - 请求参数
|
|
14
|
+
* @returns Promise,解析为标准响应格式
|
|
15
|
+
*/
|
|
16
|
+
batchCreateProducts(request: Service.Request.batchCreateProducts): Promise<StandardResponse<Service.Response.batchCreateProducts>>;
|
|
17
|
+
/**
|
|
18
|
+
* 批量编辑积分商城商品
|
|
19
|
+
* @param request - 请求参数
|
|
20
|
+
* @returns Promise,解析为标准响应格式
|
|
21
|
+
*/
|
|
22
|
+
batchUpdateProducts(request: Service.Request.batchUpdateProducts): Promise<StandardResponse<void>>;
|
|
23
|
+
/**
|
|
24
|
+
* 批量是否开启
|
|
25
|
+
* @param request - 请求参数
|
|
26
|
+
* @returns Promise,解析为标准响应格式
|
|
27
|
+
*/
|
|
28
|
+
batchToggleProductEnabled(request: Service.Request.batchToggleProductEnabled): Promise<StandardResponse<void>>;
|
|
29
|
+
/**
|
|
30
|
+
* 批量是否上下架
|
|
31
|
+
* @param request - 请求参数
|
|
32
|
+
* @returns Promise,解析为标准响应格式
|
|
33
|
+
*/
|
|
34
|
+
batchToggleProductOnline(request: Service.Request.batchToggleProductOnline): Promise<StandardResponse<void>>;
|
|
35
|
+
/**
|
|
36
|
+
* 根据条件查询积分商城商品
|
|
37
|
+
* @param request - 请求参数
|
|
38
|
+
* @returns Promise,解析为标准响应格式
|
|
39
|
+
*/
|
|
40
|
+
queryProducts(request: Service.Request.queryProducts): Promise<StandardResponse<Service.Response.queryProducts>>;
|
|
41
|
+
/**
|
|
42
|
+
* 根据商品ID查询商品详情
|
|
43
|
+
* @param request - 请求参数
|
|
44
|
+
* @returns Promise,解析为标准响应格式
|
|
45
|
+
*/
|
|
46
|
+
getProductDetail(request: Service.Request.getProductDetail): Promise<StandardResponse<Service.Response.getProductDetail>>;
|
|
47
|
+
/**
|
|
48
|
+
* 查询开启且上架的积分商城列表
|
|
49
|
+
* @param request - 请求参数
|
|
50
|
+
* @returns Promise,解析为标准响应格式
|
|
51
|
+
*/
|
|
52
|
+
queryEnabledAndOnlineProducts(request: Service.Request.queryEnabledAndOnlineProducts): Promise<StandardResponse<Service.Response.queryEnabledAndOnlineProducts>>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import BaseService from '../../BaseService.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* PandoraPointsMallService - Pandora Points Mall 服务模块
|
|
4
|
+
* 提供积分商城管理相关的 API 方法
|
|
5
|
+
* 平台: pandora
|
|
6
|
+
*/
|
|
7
|
+
export class PandoraPointsMallService extends BaseService {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.prefixUrl = '/pandora/points-mall';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 批量创建积分商城商品
|
|
14
|
+
* @param request - 请求参数
|
|
15
|
+
* @returns Promise,解析为标准响应格式
|
|
16
|
+
*/
|
|
17
|
+
batchCreateProducts(request) {
|
|
18
|
+
return this.request(this.batchCreateProducts, request);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 批量编辑积分商城商品
|
|
22
|
+
* @param request - 请求参数
|
|
23
|
+
* @returns Promise,解析为标准响应格式
|
|
24
|
+
*/
|
|
25
|
+
batchUpdateProducts(request) {
|
|
26
|
+
return this.request(this.batchUpdateProducts, request);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 批量是否开启
|
|
30
|
+
* @param request - 请求参数
|
|
31
|
+
* @returns Promise,解析为标准响应格式
|
|
32
|
+
*/
|
|
33
|
+
batchToggleProductEnabled(request) {
|
|
34
|
+
return this.request(this.batchToggleProductEnabled, request);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 批量是否上下架
|
|
38
|
+
* @param request - 请求参数
|
|
39
|
+
* @returns Promise,解析为标准响应格式
|
|
40
|
+
*/
|
|
41
|
+
batchToggleProductOnline(request) {
|
|
42
|
+
return this.request(this.batchToggleProductOnline, request);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 根据条件查询积分商城商品
|
|
46
|
+
* @param request - 请求参数
|
|
47
|
+
* @returns Promise,解析为标准响应格式
|
|
48
|
+
*/
|
|
49
|
+
queryProducts(request) {
|
|
50
|
+
return this.request(this.queryProducts, request);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 根据商品ID查询商品详情
|
|
54
|
+
* @param request - 请求参数
|
|
55
|
+
* @returns Promise,解析为标准响应格式
|
|
56
|
+
*/
|
|
57
|
+
getProductDetail(request) {
|
|
58
|
+
return this.request(this.getProductDetail, request);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 查询开启且上架的积分商城列表
|
|
62
|
+
* @param request - 请求参数
|
|
63
|
+
* @returns Promise,解析为标准响应格式
|
|
64
|
+
*/
|
|
65
|
+
queryEnabledAndOnlineProducts(request) {
|
|
66
|
+
return this.request(this.queryEnabledAndOnlineProducts, request);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { PROMOTION_ENUM } from '../../../../enums';
|
|
2
|
+
import type { StandardResponse } from '../../../../types';
|
|
3
|
+
export declare namespace Service {
|
|
4
|
+
namespace Entity {
|
|
5
|
+
/** 商品积分兑换配置 */
|
|
6
|
+
interface ProductPointExchange {
|
|
7
|
+
/** 主键ID */
|
|
8
|
+
id: string;
|
|
9
|
+
/** 创建时间 */
|
|
10
|
+
createdAt: number;
|
|
11
|
+
/** 更新时间 */
|
|
12
|
+
updatedAt: number;
|
|
13
|
+
/** 删除时间 */
|
|
14
|
+
deletedAt: number;
|
|
15
|
+
/** 商品ID */
|
|
16
|
+
productId: string;
|
|
17
|
+
/** 所需券的数量 */
|
|
18
|
+
couponRequired: number;
|
|
19
|
+
/** 所需积分的数量 */
|
|
20
|
+
pointsRequired: number;
|
|
21
|
+
/** 兑换类型 */
|
|
22
|
+
exchangeType: PROMOTION_ENUM.POINT_MALL.ExchangeType;
|
|
23
|
+
/** 是否开启 */
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
/** 是否上架 */
|
|
26
|
+
online: boolean;
|
|
27
|
+
/** 排序权重 */
|
|
28
|
+
sortOrder: number;
|
|
29
|
+
}
|
|
30
|
+
/** 后台管理列表 - 完整12个字段 */
|
|
31
|
+
interface AdminProductItem {
|
|
32
|
+
id: string;
|
|
33
|
+
sortOrder: number;
|
|
34
|
+
productName: string;
|
|
35
|
+
productId: string;
|
|
36
|
+
skuSpecs: string[];
|
|
37
|
+
salePrice: number;
|
|
38
|
+
online: boolean;
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
exchangeType: PROMOTION_ENUM.POINT_MALL.ExchangeType;
|
|
41
|
+
stock: number;
|
|
42
|
+
limitPerUser?: number;
|
|
43
|
+
pointsRequired: number;
|
|
44
|
+
couponRequired: number;
|
|
45
|
+
productImage: string;
|
|
46
|
+
}
|
|
47
|
+
/** C端积分商城列表 - 精确7个字段 */
|
|
48
|
+
interface ClientProductItem {
|
|
49
|
+
id: string;
|
|
50
|
+
sortOrder: number;
|
|
51
|
+
productName: string;
|
|
52
|
+
productId: string;
|
|
53
|
+
productImage: string;
|
|
54
|
+
exchangeType: PROMOTION_ENUM.POINT_MALL.ExchangeType;
|
|
55
|
+
pointsRequired: number;
|
|
56
|
+
couponRequired: number;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
namespace Request {
|
|
60
|
+
interface BaseParams {
|
|
61
|
+
productId: string;
|
|
62
|
+
pointsRequired?: number;
|
|
63
|
+
couponRequired?: number;
|
|
64
|
+
exchangeType: PROMOTION_ENUM.POINT_MALL.ExchangeType;
|
|
65
|
+
online?: boolean;
|
|
66
|
+
sortOrder?: number;
|
|
67
|
+
}
|
|
68
|
+
export interface CreateProduct extends BaseParams {
|
|
69
|
+
}
|
|
70
|
+
export interface UpdateProduct extends Partial<BaseParams> {
|
|
71
|
+
id: string;
|
|
72
|
+
}
|
|
73
|
+
/** 批量创建积分商城商品 */
|
|
74
|
+
export interface batchCreateProducts {
|
|
75
|
+
items: CreateProduct[];
|
|
76
|
+
}
|
|
77
|
+
/** 批量编辑积分商城商品 */
|
|
78
|
+
export interface batchUpdateProducts {
|
|
79
|
+
items: UpdateProduct[];
|
|
80
|
+
}
|
|
81
|
+
/** 批量是否开启 */
|
|
82
|
+
export interface batchToggleProductEnabled {
|
|
83
|
+
/** 主键ID列表 */
|
|
84
|
+
ids: string[];
|
|
85
|
+
/** 是否开启 */
|
|
86
|
+
enabled: boolean;
|
|
87
|
+
}
|
|
88
|
+
/** 批量是否上下架 */
|
|
89
|
+
export interface batchToggleProductOnline {
|
|
90
|
+
/** 主键ID列表 */
|
|
91
|
+
ids: string[];
|
|
92
|
+
/** 是否上架 */
|
|
93
|
+
online: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** 根据条件查询积分商城商品 */
|
|
96
|
+
export interface queryProducts {
|
|
97
|
+
/** 商品ID */
|
|
98
|
+
productIds?: string[];
|
|
99
|
+
/** 是否上架,传null/undefined表示不筛选 */
|
|
100
|
+
online?: boolean | null | undefined;
|
|
101
|
+
/** 是否开启,传null/undefined表示不筛选 */
|
|
102
|
+
enabled?: boolean | null | undefined;
|
|
103
|
+
/** 页码 */
|
|
104
|
+
page?: number;
|
|
105
|
+
/** 每页数量 */
|
|
106
|
+
pageSize?: number;
|
|
107
|
+
}
|
|
108
|
+
/** 查询开启且上架的积分商城列表 */
|
|
109
|
+
export interface queryEnabledAndOnlineProducts {
|
|
110
|
+
/** 页码 */
|
|
111
|
+
page?: number;
|
|
112
|
+
/** 每页数量 */
|
|
113
|
+
pageSize?: number;
|
|
114
|
+
}
|
|
115
|
+
/** 根据商品ID查询商品详情 */
|
|
116
|
+
export interface getProductDetail {
|
|
117
|
+
/** 商品ID */
|
|
118
|
+
productId: string;
|
|
119
|
+
}
|
|
120
|
+
export {};
|
|
121
|
+
}
|
|
122
|
+
namespace Response {
|
|
123
|
+
/** 创建积分商城商品响应 */
|
|
124
|
+
interface createProduct {
|
|
125
|
+
/** 主键ID */
|
|
126
|
+
id: string;
|
|
127
|
+
}
|
|
128
|
+
/** 批量创建积分商城商品响应 */
|
|
129
|
+
interface batchCreateProducts {
|
|
130
|
+
/** 创建成功的ID列表 */
|
|
131
|
+
ids: string[];
|
|
132
|
+
}
|
|
133
|
+
/** 查询积分商城商品响应 */
|
|
134
|
+
interface queryProducts {
|
|
135
|
+
/** 商品列表 */
|
|
136
|
+
items: Entity.AdminProductItem[];
|
|
137
|
+
/** 总数 */
|
|
138
|
+
total: number;
|
|
139
|
+
/** 当前页码 */
|
|
140
|
+
page: number;
|
|
141
|
+
/** 每页数量 */
|
|
142
|
+
pageSize: number;
|
|
143
|
+
}
|
|
144
|
+
/** 查询商品详情响应 */
|
|
145
|
+
interface getProductDetail {
|
|
146
|
+
/** 商品详情 */
|
|
147
|
+
data: Entity.ProductPointExchange;
|
|
148
|
+
}
|
|
149
|
+
/** 查询开启且上架的积分商城列表响应 */
|
|
150
|
+
interface queryEnabledAndOnlineProducts {
|
|
151
|
+
/** 商品列表 */
|
|
152
|
+
items: Entity.ClientProductItem[];
|
|
153
|
+
/** 总数 */
|
|
154
|
+
total: number;
|
|
155
|
+
/** 当前页码 */
|
|
156
|
+
page: number;
|
|
157
|
+
/** 每页数量 */
|
|
158
|
+
pageSize: number;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
namespace Controller {
|
|
162
|
+
interface PointsMallController {
|
|
163
|
+
/**
|
|
164
|
+
* 批量创建积分商城商品
|
|
165
|
+
*/
|
|
166
|
+
batchCreateProducts(request: Service.Request.batchCreateProducts): Promise<StandardResponse<Service.Response.batchCreateProducts>>;
|
|
167
|
+
/**
|
|
168
|
+
* 批量编辑积分商城商品
|
|
169
|
+
*/
|
|
170
|
+
batchUpdateProducts(request: Service.Request.batchUpdateProducts): Promise<StandardResponse<void>>;
|
|
171
|
+
/**
|
|
172
|
+
* 批量是否开启
|
|
173
|
+
*/
|
|
174
|
+
batchToggleProductEnabled(request: Service.Request.batchToggleProductEnabled): Promise<StandardResponse<void>>;
|
|
175
|
+
/**
|
|
176
|
+
* 批量是否上下架
|
|
177
|
+
*/
|
|
178
|
+
batchToggleProductOnline(request: Service.Request.batchToggleProductOnline): Promise<StandardResponse<void>>;
|
|
179
|
+
/**
|
|
180
|
+
* 根据条件查询积分商城商品
|
|
181
|
+
*/
|
|
182
|
+
queryProducts(request: Service.Request.queryProducts): Promise<StandardResponse<Service.Response.queryProducts>>;
|
|
183
|
+
/**
|
|
184
|
+
* 根据商品ID查询商品详情
|
|
185
|
+
*/
|
|
186
|
+
getProductDetail(request: Service.Request.getProductDetail): Promise<StandardResponse<Service.Response.getProductDetail>>;
|
|
187
|
+
/**
|
|
188
|
+
* 查询开启且上架的积分商城列表
|
|
189
|
+
*/
|
|
190
|
+
queryEnabledAndOnlineProducts(request: Service.Request.queryEnabledAndOnlineProducts): Promise<StandardResponse<Service.Response.queryEnabledAndOnlineProducts>>;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/enums.d.ts
CHANGED
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { ENUM as PRODUCT_SERVICE_ENUM } from '@be-link/ecommerce-product-service-node-sdk/enum';
|
|
6
6
|
export { ENUM as STORE_SERVICE_ENUM } from '@be-link/ecommerce-store-service-node-sdk/enums';
|
|
7
|
+
export { ENUM as PROMOTION_ENUM } from '@be-link/ecommerce-promotion-service-node-sdk/enum';
|
|
7
8
|
export { ENUM as ROOM_SERVICE_ENUM } from '@be-link/ecommerce-client-backend-service-node-sdk/enum';
|
|
8
9
|
export { ENUM as PROMOTION_SERVICE_ENUM } from '@be-link/ecommerce-promotion-service-node-sdk/enum';
|
package/esm/enums.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// 商品服务枚举
|
|
6
6
|
export { ENUM as PRODUCT_SERVICE_ENUM } from '@be-link/ecommerce-product-service-node-sdk/enum';
|
|
7
7
|
export { ENUM as STORE_SERVICE_ENUM } from '@be-link/ecommerce-store-service-node-sdk/enums';
|
|
8
|
+
export { ENUM as PROMOTION_ENUM } from '@be-link/ecommerce-promotion-service-node-sdk/enum';
|
|
8
9
|
// 直播间枚举
|
|
9
10
|
export { ENUM as ROOM_SERVICE_ENUM } from '@be-link/ecommerce-client-backend-service-node-sdk/enum';
|
|
10
11
|
// 优惠券服务枚举
|
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.
|
|
3
|
+
"version": "0.0.64",
|
|
4
4
|
"description": "EcommerceBackendBffService Node.js SDK",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./cjs/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@be-link/ecommerce-client-backend-service-node-sdk": "^0.0.10",
|
|
29
29
|
"@be-link/ecommerce-tag-service-node-sdk": "^0.0.11",
|
|
30
30
|
"@be-link/ecommerce-store-service-node-sdk": "^0.0.13",
|
|
31
|
-
"@be-link/ecommerce-promotion-service-node-sdk": "^0.0.
|
|
31
|
+
"@be-link/ecommerce-promotion-service-node-sdk": "^0.0.19",
|
|
32
32
|
"axios": "1.13.2",
|
|
33
33
|
"@be-link/ecommerce-product-service-node-sdk": "0.0.21"
|
|
34
34
|
},
|