@be-link/ecommerce-product-service-node-sdk 0.1.33 → 0.1.35
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/enum.d.ts +22 -0
- package/enum.js +32 -1
- package/modules/product/service.js +8 -0
- package/modules/product/types.d.ts +58 -4
- package/modules/productExp/service.d.ts +4 -0
- package/modules/productExp/service.js +36 -0
- package/modules/productExp/types.d.ts +95 -0
- package/package.json +1 -1
package/enum.d.ts
CHANGED
|
@@ -82,6 +82,14 @@ export declare namespace ENUM {
|
|
|
82
82
|
VISIBLE = "\u53EF\u89C1",
|
|
83
83
|
INVISIBLE = "\u4E0D\u53EF\u89C1"
|
|
84
84
|
}
|
|
85
|
+
enum SKU_STATUS {
|
|
86
|
+
ACTIVE = "ACTIVE",
|
|
87
|
+
INACTIVE = "INACTIVE"
|
|
88
|
+
}
|
|
89
|
+
enum SKU_STATUS_CHINESE {
|
|
90
|
+
ACTIVE = "\u4E0A\u67B6",
|
|
91
|
+
INACTIVE = "\u4E0B\u67B6"
|
|
92
|
+
}
|
|
85
93
|
}
|
|
86
94
|
namespace TASK_ENUM {
|
|
87
95
|
enum STATUS {
|
|
@@ -117,6 +125,19 @@ export declare namespace ENUM {
|
|
|
117
125
|
YES = "\u662F"
|
|
118
126
|
}
|
|
119
127
|
}
|
|
128
|
+
namespace PRODUCT_EXP_ENUM {
|
|
129
|
+
/**
|
|
130
|
+
* 圈选类型枚举
|
|
131
|
+
*/
|
|
132
|
+
enum SCOPE_TYPE {
|
|
133
|
+
/** 所有门店 */
|
|
134
|
+
ALL = "ALL",
|
|
135
|
+
/** 按门店 ID 圈选 */
|
|
136
|
+
STORE = "STORE",
|
|
137
|
+
/** 按标签圈选 */
|
|
138
|
+
TAG = "TAG"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
120
141
|
}
|
|
121
142
|
export declare const PRODUCT_TYPE_MAP: Record<string, string>;
|
|
122
143
|
export declare const PRODUCT_STATUS_MAP: Record<string, string>;
|
|
@@ -126,6 +147,7 @@ export declare const PRODUCT_STORAGE_METHOD_MAP: Record<string, string>;
|
|
|
126
147
|
export declare const PRODUCT_CLASSIFICATION_MAP: Record<string, string>;
|
|
127
148
|
export declare const PRODUCT_FREIGHT_TYPE_MAP: Record<string, string>;
|
|
128
149
|
export declare const PRODUCT_STORE_SCOPE_TYPE_MAP: Record<string, string>;
|
|
150
|
+
export declare const SKU_STATUS_MAP: Record<string, string>;
|
|
129
151
|
export declare const TASK_STATUS_MAP: Record<string, string>;
|
|
130
152
|
export declare const TASK_STEP_MAP: Record<string, string>;
|
|
131
153
|
export declare const COMMON_BOOLEAN_MAP: Record<string, string>;
|
package/enum.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COMMON_BOOLEAN_MAP = exports.TASK_STEP_MAP = exports.TASK_STATUS_MAP = exports.PRODUCT_STORE_SCOPE_TYPE_MAP = exports.PRODUCT_FREIGHT_TYPE_MAP = exports.PRODUCT_CLASSIFICATION_MAP = exports.PRODUCT_STORAGE_METHOD_MAP = exports.PRODUCT_DISPATCH_TYPE_MAP = exports.PRODUCT_PICK_TYPE_MAP = exports.PRODUCT_STATUS_MAP = exports.PRODUCT_TYPE_MAP = exports.ENUM = void 0;
|
|
3
|
+
exports.COMMON_BOOLEAN_MAP = exports.TASK_STEP_MAP = exports.TASK_STATUS_MAP = exports.SKU_STATUS_MAP = exports.PRODUCT_STORE_SCOPE_TYPE_MAP = exports.PRODUCT_FREIGHT_TYPE_MAP = exports.PRODUCT_CLASSIFICATION_MAP = exports.PRODUCT_STORAGE_METHOD_MAP = exports.PRODUCT_DISPATCH_TYPE_MAP = exports.PRODUCT_PICK_TYPE_MAP = exports.PRODUCT_STATUS_MAP = exports.PRODUCT_TYPE_MAP = exports.ENUM = void 0;
|
|
4
4
|
// 服务.模块.枚举名称.枚举值 示例: DEMO_ENUM.ORDER_ENUM.STATUS.PENDING
|
|
5
5
|
var ENUM;
|
|
6
6
|
(function (ENUM) {
|
|
@@ -104,6 +104,16 @@ var ENUM;
|
|
|
104
104
|
STORE_SCOPE_TYPE_CHINESE["VISIBLE"] = "\u53EF\u89C1";
|
|
105
105
|
STORE_SCOPE_TYPE_CHINESE["INVISIBLE"] = "\u4E0D\u53EF\u89C1";
|
|
106
106
|
})(STORE_SCOPE_TYPE_CHINESE = PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE || (PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE = {}));
|
|
107
|
+
let SKU_STATUS;
|
|
108
|
+
(function (SKU_STATUS) {
|
|
109
|
+
SKU_STATUS["ACTIVE"] = "ACTIVE";
|
|
110
|
+
SKU_STATUS["INACTIVE"] = "INACTIVE";
|
|
111
|
+
})(SKU_STATUS = PRODUCT_ENUM.SKU_STATUS || (PRODUCT_ENUM.SKU_STATUS = {}));
|
|
112
|
+
let SKU_STATUS_CHINESE;
|
|
113
|
+
(function (SKU_STATUS_CHINESE) {
|
|
114
|
+
SKU_STATUS_CHINESE["ACTIVE"] = "\u4E0A\u67B6";
|
|
115
|
+
SKU_STATUS_CHINESE["INACTIVE"] = "\u4E0B\u67B6";
|
|
116
|
+
})(SKU_STATUS_CHINESE = PRODUCT_ENUM.SKU_STATUS_CHINESE || (PRODUCT_ENUM.SKU_STATUS_CHINESE = {}));
|
|
107
117
|
})(PRODUCT_ENUM = ENUM.PRODUCT_ENUM || (ENUM.PRODUCT_ENUM = {}));
|
|
108
118
|
let TASK_ENUM;
|
|
109
119
|
(function (TASK_ENUM) {
|
|
@@ -147,6 +157,21 @@ var ENUM;
|
|
|
147
157
|
BOOLEAN_CHINESE["YES"] = "\u662F";
|
|
148
158
|
})(BOOLEAN_CHINESE = COMMON_ENUM.BOOLEAN_CHINESE || (COMMON_ENUM.BOOLEAN_CHINESE = {}));
|
|
149
159
|
})(COMMON_ENUM = ENUM.COMMON_ENUM || (ENUM.COMMON_ENUM = {}));
|
|
160
|
+
let PRODUCT_EXP_ENUM;
|
|
161
|
+
(function (PRODUCT_EXP_ENUM) {
|
|
162
|
+
/**
|
|
163
|
+
* 圈选类型枚举
|
|
164
|
+
*/
|
|
165
|
+
let SCOPE_TYPE;
|
|
166
|
+
(function (SCOPE_TYPE) {
|
|
167
|
+
/** 所有门店 */
|
|
168
|
+
SCOPE_TYPE["ALL"] = "ALL";
|
|
169
|
+
/** 按门店 ID 圈选 */
|
|
170
|
+
SCOPE_TYPE["STORE"] = "STORE";
|
|
171
|
+
/** 按标签圈选 */
|
|
172
|
+
SCOPE_TYPE["TAG"] = "TAG";
|
|
173
|
+
})(SCOPE_TYPE = PRODUCT_EXP_ENUM.SCOPE_TYPE || (PRODUCT_EXP_ENUM.SCOPE_TYPE = {}));
|
|
174
|
+
})(PRODUCT_EXP_ENUM = ENUM.PRODUCT_EXP_ENUM || (ENUM.PRODUCT_EXP_ENUM = {}));
|
|
150
175
|
})(ENUM || (exports.ENUM = ENUM = {}));
|
|
151
176
|
// 中英文映射 Record
|
|
152
177
|
exports.PRODUCT_TYPE_MAP = {
|
|
@@ -179,6 +204,8 @@ exports.PRODUCT_CLASSIFICATION_MAP = {
|
|
|
179
204
|
[ENUM.PRODUCT_ENUM.CLASSIFICATION.TOURISM]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.TOURISM,
|
|
180
205
|
[ENUM.PRODUCT_ENUM.CLASSIFICATION.WELFARE]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.WELFARE,
|
|
181
206
|
[ENUM.PRODUCT_ENUM.CLASSIFICATION.MEMBERSHIP_PRODUCT]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.MEMBERSHIP_PRODUCT,
|
|
207
|
+
[ENUM.PRODUCT_ENUM.CLASSIFICATION.TOURISM_FULL_HIGH]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.TOURISM_FULL_HIGH,
|
|
208
|
+
[ENUM.PRODUCT_ENUM.CLASSIFICATION.TOURISM_FULL_LOW]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.TOURISM_FULL_LOW,
|
|
182
209
|
};
|
|
183
210
|
exports.PRODUCT_FREIGHT_TYPE_MAP = {
|
|
184
211
|
[ENUM.PRODUCT_ENUM.FREIGHT_TYPE.JZH]: ENUM.PRODUCT_ENUM.FREIGHT_TYPE_CHINESE.JZH,
|
|
@@ -188,6 +215,10 @@ exports.PRODUCT_STORE_SCOPE_TYPE_MAP = {
|
|
|
188
215
|
[ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE.VISIBLE]: ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE.VISIBLE,
|
|
189
216
|
[ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE.INVISIBLE]: ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE.INVISIBLE,
|
|
190
217
|
};
|
|
218
|
+
exports.SKU_STATUS_MAP = {
|
|
219
|
+
[ENUM.PRODUCT_ENUM.SKU_STATUS.ACTIVE]: ENUM.PRODUCT_ENUM.SKU_STATUS_CHINESE.ACTIVE,
|
|
220
|
+
[ENUM.PRODUCT_ENUM.SKU_STATUS.INACTIVE]: ENUM.PRODUCT_ENUM.SKU_STATUS_CHINESE.INACTIVE,
|
|
221
|
+
};
|
|
191
222
|
exports.TASK_STATUS_MAP = {
|
|
192
223
|
[ENUM.TASK_ENUM.STATUS.ACTIVE]: ENUM.TASK_ENUM.STATUS_CHINESE.ACTIVE,
|
|
193
224
|
[ENUM.TASK_ENUM.STATUS.INACTIVE]: ENUM.TASK_ENUM.STATUS_CHINESE.INACTIVE,
|
|
@@ -107,6 +107,7 @@ __decorate([
|
|
|
107
107
|
], ProductService.prototype, "list", null);
|
|
108
108
|
__decorate([
|
|
109
109
|
(0, tsoa_1.OperationId)('创建商品'),
|
|
110
|
+
(0, tsoa_1.Tags)('163'),
|
|
110
111
|
(0, tsoa_1.Post)('create'),
|
|
111
112
|
__param(0, (0, tsoa_1.Body)())
|
|
112
113
|
], ProductService.prototype, "create", null);
|
|
@@ -117,11 +118,13 @@ __decorate([
|
|
|
117
118
|
], ProductService.prototype, "detail", null);
|
|
118
119
|
__decorate([
|
|
119
120
|
(0, tsoa_1.OperationId)('商品更新'),
|
|
121
|
+
(0, tsoa_1.Tags)('163'),
|
|
120
122
|
(0, tsoa_1.Post)('update'),
|
|
121
123
|
__param(0, (0, tsoa_1.Body)())
|
|
122
124
|
], ProductService.prototype, "update", null);
|
|
123
125
|
__decorate([
|
|
124
126
|
(0, tsoa_1.OperationId)('批量更新'),
|
|
127
|
+
(0, tsoa_1.Tags)('163'),
|
|
125
128
|
(0, tsoa_1.Post)('batch-update'),
|
|
126
129
|
__param(0, (0, tsoa_1.Body)())
|
|
127
130
|
], ProductService.prototype, "batchUpdate", null);
|
|
@@ -137,16 +140,19 @@ __decorate([
|
|
|
137
140
|
], ProductService.prototype, "checkSkuCode", null);
|
|
138
141
|
__decorate([
|
|
139
142
|
(0, tsoa_1.OperationId)('商品导出'),
|
|
143
|
+
(0, tsoa_1.Tags)('163'),
|
|
140
144
|
(0, tsoa_1.Post)('export'),
|
|
141
145
|
__param(0, (0, tsoa_1.Body)())
|
|
142
146
|
], ProductService.prototype, "export", null);
|
|
143
147
|
__decorate([
|
|
144
148
|
(0, tsoa_1.OperationId)('获取商品信息(不含规格信息)'),
|
|
149
|
+
(0, tsoa_1.Tags)('163'),
|
|
145
150
|
(0, tsoa_1.Post)('query-product-list'),
|
|
146
151
|
__param(0, (0, tsoa_1.Body)())
|
|
147
152
|
], ProductService.prototype, "queryProductList", null);
|
|
148
153
|
__decorate([
|
|
149
154
|
(0, tsoa_1.OperationId)('获取商品+规格信息'),
|
|
155
|
+
(0, tsoa_1.Tags)('163'),
|
|
150
156
|
(0, tsoa_1.Post)('query-product-sku-list'),
|
|
151
157
|
__param(0, (0, tsoa_1.Body)())
|
|
152
158
|
], ProductService.prototype, "queryProductSkuList", null);
|
|
@@ -157,11 +163,13 @@ __decorate([
|
|
|
157
163
|
], ProductService.prototype, "querySkuBaseInfo", null);
|
|
158
164
|
__decorate([
|
|
159
165
|
(0, tsoa_1.OperationId)('获取商品详情-C端'),
|
|
166
|
+
(0, tsoa_1.Tags)('163'),
|
|
160
167
|
(0, tsoa_1.Post)('get-product-detail'),
|
|
161
168
|
__param(0, (0, tsoa_1.Body)())
|
|
162
169
|
], ProductService.prototype, "getProductDetail", null);
|
|
163
170
|
__decorate([
|
|
164
171
|
(0, tsoa_1.OperationId)('获取商品详情-C端-含下架'),
|
|
172
|
+
(0, tsoa_1.Tags)('163'),
|
|
165
173
|
(0, tsoa_1.Post)('get-product-info'),
|
|
166
174
|
__param(0, (0, tsoa_1.Body)())
|
|
167
175
|
], ProductService.prototype, "getProductInfo", null);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ProductExpServiceTypes } from '../..';
|
|
2
|
+
import type { ENUM } from '../../enum';
|
|
1
3
|
export declare namespace ProductService {
|
|
2
4
|
/** 商品明细项 */
|
|
3
5
|
interface ProductDetailItem {
|
|
@@ -19,6 +21,8 @@ export declare namespace ProductService {
|
|
|
19
21
|
商品类型: string;
|
|
20
22
|
售卖类型: string;
|
|
21
23
|
规格明细: string;
|
|
24
|
+
/** SKU ID(需求 163 新增) */
|
|
25
|
+
'SKU ID': string;
|
|
22
26
|
规格编码: string;
|
|
23
27
|
库存: number;
|
|
24
28
|
划线价: number;
|
|
@@ -43,6 +47,8 @@ export declare namespace ProductService {
|
|
|
43
47
|
multiSkuCodes: string[];
|
|
44
48
|
/** 是否展示绑定子商品 1展示,0不展示 */
|
|
45
49
|
showBindSkus: number;
|
|
50
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
51
|
+
status: string;
|
|
46
52
|
}
|
|
47
53
|
/**
|
|
48
54
|
* 核销期限接口
|
|
@@ -114,6 +120,12 @@ export declare namespace ProductService {
|
|
|
114
120
|
stock: number;
|
|
115
121
|
/** 是否展示绑定子商品 1展示,0不展示 */
|
|
116
122
|
showBindSkus?: number;
|
|
123
|
+
/** SKU排序(可选,后端将按 skuList 顺序自动生成) */
|
|
124
|
+
sortOrder?: number;
|
|
125
|
+
/** SKU上下架状态:ACTIVE-上架,INACTIVE-下架(需求 163 新增) */
|
|
126
|
+
status: string;
|
|
127
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
128
|
+
imageUrls?: string[];
|
|
117
129
|
}
|
|
118
130
|
/**
|
|
119
131
|
* 产品信息接口
|
|
@@ -167,6 +179,12 @@ export declare namespace ProductService {
|
|
|
167
179
|
purchaseLimit?: number;
|
|
168
180
|
/** 运费模板版本类型 */
|
|
169
181
|
freightType?: string;
|
|
182
|
+
/** 是否启用规格图片 0:否 1:是(需求 163 新增) */
|
|
183
|
+
enableSkuImage?: number;
|
|
184
|
+
/** 是否需要自动抓取订单量发货 0:否 1:是(需求 163 新增) */
|
|
185
|
+
autoFetchOrderQuantity?: number;
|
|
186
|
+
/** 门店范围配置(需求 163 新增) */
|
|
187
|
+
storeScopeConfig?: ProductExpServiceTypes.Entity.StoreScopeConfig;
|
|
170
188
|
}
|
|
171
189
|
interface ProductData {
|
|
172
190
|
/** 产品信息 */
|
|
@@ -228,8 +246,6 @@ export declare namespace ProductService {
|
|
|
228
246
|
dispatchType?: string;
|
|
229
247
|
/** 直播分组ID */
|
|
230
248
|
liveGroupId?: string;
|
|
231
|
-
/** 是否删除 */
|
|
232
|
-
isDelete?: boolean;
|
|
233
249
|
}
|
|
234
250
|
interface queryScheduledTask {
|
|
235
251
|
/** 商品Id */
|
|
@@ -464,6 +480,12 @@ export declare namespace ProductService {
|
|
|
464
480
|
invisibleStores: string[];
|
|
465
481
|
/** 删除时间 */
|
|
466
482
|
deletedAt: number;
|
|
483
|
+
/** 是否启用规格图片 0:否 1:是(需求 163 新增) */
|
|
484
|
+
enableSkuImage?: number;
|
|
485
|
+
/** 是否需要自动抓取订单量发货 0:否 1:是(需求 163 新增) */
|
|
486
|
+
autoFetchOrderQuantity?: number;
|
|
487
|
+
/** 提货方式 */
|
|
488
|
+
pickType?: string;
|
|
467
489
|
}[];
|
|
468
490
|
}
|
|
469
491
|
interface queryProductSkuList {
|
|
@@ -489,7 +511,7 @@ export declare namespace ProductService {
|
|
|
489
511
|
memberPrice: number;
|
|
490
512
|
/** 库存 */
|
|
491
513
|
stock: number;
|
|
492
|
-
/**
|
|
514
|
+
/** 商品上下架状态 */
|
|
493
515
|
status: string;
|
|
494
516
|
/** SKU ID */
|
|
495
517
|
skuId: string;
|
|
@@ -497,6 +519,12 @@ export declare namespace ProductService {
|
|
|
497
519
|
attrs: Attr[];
|
|
498
520
|
/** SKU编码 */
|
|
499
521
|
skuCode: string;
|
|
522
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
523
|
+
skuStatus: string;
|
|
524
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
525
|
+
imageUrls: string[];
|
|
526
|
+
/** 提货方式 */
|
|
527
|
+
pickType?: string;
|
|
500
528
|
}[];
|
|
501
529
|
}
|
|
502
530
|
interface querySkuBaseInfo extends Partial<SkuField> {
|
|
@@ -544,8 +572,14 @@ export declare namespace ProductService {
|
|
|
544
572
|
visibleStores: string[] | null;
|
|
545
573
|
/** 门店不可见范围和可见互斥 */
|
|
546
574
|
invisibleStores: string[] | null;
|
|
575
|
+
/** 门店范围配置 V2(需求 163 新增) */
|
|
576
|
+
storeScopeConfig?: ProductExpServiceTypes.Entity.StoreScopeConfig;
|
|
547
577
|
/** 是否会员商品 */
|
|
548
578
|
isMember?: boolean;
|
|
579
|
+
/** 是否启用规格图片 0:否 1:是(需求 163 新增) */
|
|
580
|
+
enableSkuImage?: number;
|
|
581
|
+
/** 是否需要自动抓取订单量发货 0:否 1:是(需求 163 新增) */
|
|
582
|
+
autoFetchOrderQuantity?: number;
|
|
549
583
|
};
|
|
550
584
|
/** SKU列表 */
|
|
551
585
|
skuList: {
|
|
@@ -561,6 +595,12 @@ export declare namespace ProductService {
|
|
|
561
595
|
memberPrice: number;
|
|
562
596
|
/** SKU编码 */
|
|
563
597
|
skuCode: string;
|
|
598
|
+
/** SKU排序(需求 163 新增) */
|
|
599
|
+
sortOrder: number;
|
|
600
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
601
|
+
status: string;
|
|
602
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
603
|
+
imageUrls?: string[];
|
|
564
604
|
}[];
|
|
565
605
|
}
|
|
566
606
|
interface isSoldOut {
|
|
@@ -624,6 +664,10 @@ export declare namespace ProductService {
|
|
|
624
664
|
isMember?: boolean;
|
|
625
665
|
/** 是否一元购商品 */
|
|
626
666
|
isOneYuan?: boolean;
|
|
667
|
+
/** 是否启用规格图片 0:否 1:是(需求 163 新增) */
|
|
668
|
+
enableSkuImage?: number;
|
|
669
|
+
/** 是否需要自动抓取订单量发货 0:否 1:是(需求 163 新增) */
|
|
670
|
+
autoFetchOrderQuantity?: number;
|
|
627
671
|
};
|
|
628
672
|
/** SKU列表 */
|
|
629
673
|
skuList: {
|
|
@@ -647,12 +691,16 @@ export declare namespace ProductService {
|
|
|
647
691
|
bindSkus: BindSku[];
|
|
648
692
|
/** 是否展示绑定子商品 1展示,0不展示 */
|
|
649
693
|
showBindSkus: number;
|
|
694
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
695
|
+
status: string;
|
|
650
696
|
/** 是否有绑定子商品 1有,0无 */
|
|
651
697
|
hasBindSkus: number;
|
|
652
698
|
/** 是否有多码 1有,0无 */
|
|
653
699
|
hasMultiSkuCodes: number;
|
|
654
700
|
/** 是否有会员价 1有,0无 */
|
|
655
701
|
hasMemberPrice: number;
|
|
702
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
703
|
+
imageUrls: string[];
|
|
656
704
|
}[];
|
|
657
705
|
}
|
|
658
706
|
interface searchProductByName {
|
|
@@ -680,8 +728,12 @@ export declare namespace ProductService {
|
|
|
680
728
|
attrs: Attr[];
|
|
681
729
|
/** 价格 */
|
|
682
730
|
price: number;
|
|
683
|
-
/**
|
|
731
|
+
/** 商品上下架状态 */
|
|
684
732
|
status: string;
|
|
733
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
734
|
+
skuStatus: string;
|
|
735
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
736
|
+
imageUrls?: string[];
|
|
685
737
|
}
|
|
686
738
|
interface productQrCode {
|
|
687
739
|
/** 二维码URL */
|
|
@@ -690,6 +742,8 @@ export declare namespace ProductService {
|
|
|
690
742
|
interface getClassification {
|
|
691
743
|
/** 商品分类 */
|
|
692
744
|
classification: string;
|
|
745
|
+
/** 商品类型:ENTITY-实体商品 VIRTUAL-虚拟商品 */
|
|
746
|
+
type: ENUM.PRODUCT_ENUM.TYPE;
|
|
693
747
|
}
|
|
694
748
|
interface classificationItem {
|
|
695
749
|
/** 分类枚举值 */
|
|
@@ -9,6 +9,10 @@ declare class ProductExpService extends BaseService implements Service.ProductEx
|
|
|
9
9
|
productCategoryList(request: Service.Request.productCategoryList): Promise<Service.ProductCategory[]>;
|
|
10
10
|
setStoreScope(request: Service.Request.setStoreScope): Promise<void>;
|
|
11
11
|
queryStoreScope(request: Service.Request.queryStoreScope): Promise<Service.Response.queryStoreScope>;
|
|
12
|
+
setStoreScopeV2(request: Service.Request.setStoreScopeV2): Promise<void>;
|
|
13
|
+
queryStoreScopeV2(request: Service.Request.queryStoreScopeV2): Promise<Service.Response.queryStoreScopeV2>;
|
|
14
|
+
checkStoreVisible(request: Service.Request.checkStoreVisible): Promise<Service.Response.checkStoreVisible>;
|
|
15
|
+
batchQueryProductStatus(request: Service.Request.batchQueryProductStatus): Promise<Service.Response.batchQueryProductStatus>;
|
|
12
16
|
}
|
|
13
17
|
export declare const productExpService: ProductExpService;
|
|
14
18
|
export default productExpService;
|
|
@@ -42,6 +42,18 @@ let ProductExpService = class ProductExpService extends BaseService_1.default {
|
|
|
42
42
|
queryStoreScope(request) {
|
|
43
43
|
return (0, http_1.callApi)(this.getApiUrl(this.queryStoreScope), request);
|
|
44
44
|
}
|
|
45
|
+
setStoreScopeV2(request) {
|
|
46
|
+
return (0, http_1.callApi)(this.getApiUrl(this.setStoreScopeV2), request);
|
|
47
|
+
}
|
|
48
|
+
queryStoreScopeV2(request) {
|
|
49
|
+
return (0, http_1.callApi)(this.getApiUrl(this.queryStoreScopeV2), request);
|
|
50
|
+
}
|
|
51
|
+
checkStoreVisible(request) {
|
|
52
|
+
return (0, http_1.callApi)(this.getApiUrl(this.checkStoreVisible), request);
|
|
53
|
+
}
|
|
54
|
+
batchQueryProductStatus(request) {
|
|
55
|
+
return (0, http_1.callApi)(this.getApiUrl(this.batchQueryProductStatus), request);
|
|
56
|
+
}
|
|
45
57
|
};
|
|
46
58
|
__decorate([
|
|
47
59
|
(0, tsoa_1.OperationId)('获取供应商列表'),
|
|
@@ -78,6 +90,30 @@ __decorate([
|
|
|
78
90
|
(0, tsoa_1.Post)('query-store-scope'),
|
|
79
91
|
__param(0, (0, tsoa_1.Body)())
|
|
80
92
|
], ProductExpService.prototype, "queryStoreScope", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, tsoa_1.OperationId)('设置门店范围 V2'),
|
|
95
|
+
(0, tsoa_1.Tags)('163'),
|
|
96
|
+
(0, tsoa_1.Post)('set-store-scope-v2'),
|
|
97
|
+
__param(0, (0, tsoa_1.Body)())
|
|
98
|
+
], ProductExpService.prototype, "setStoreScopeV2", null);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, tsoa_1.OperationId)('获取门店范围 V2'),
|
|
101
|
+
(0, tsoa_1.Tags)('163'),
|
|
102
|
+
(0, tsoa_1.Post)('query-store-scope-v2'),
|
|
103
|
+
__param(0, (0, tsoa_1.Body)())
|
|
104
|
+
], ProductExpService.prototype, "queryStoreScopeV2", null);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, tsoa_1.OperationId)('判断门店可见性'),
|
|
107
|
+
(0, tsoa_1.Tags)('163'),
|
|
108
|
+
(0, tsoa_1.Post)('check-store-visible'),
|
|
109
|
+
__param(0, (0, tsoa_1.Body)())
|
|
110
|
+
], ProductExpService.prototype, "checkStoreVisible", null);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, tsoa_1.OperationId)('批量查询商品状态(积分商城专用)'),
|
|
113
|
+
(0, tsoa_1.Tags)('163'),
|
|
114
|
+
(0, tsoa_1.Post)('batch-query-product-status'),
|
|
115
|
+
__param(0, (0, tsoa_1.Body)())
|
|
116
|
+
], ProductExpService.prototype, "batchQueryProductStatus", null);
|
|
81
117
|
ProductExpService = __decorate([
|
|
82
118
|
(0, tsoa_1.Route)('product-exp'),
|
|
83
119
|
(0, tsoa_1.Tags)('Product-exp')
|
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
export declare namespace ProductExpService {
|
|
2
|
+
/**
|
|
3
|
+
* Entity 命名空间
|
|
4
|
+
* 存放实体类型定义(需求 163 新增)
|
|
5
|
+
*/
|
|
6
|
+
namespace Entity {
|
|
7
|
+
/**
|
|
8
|
+
* 门店范围配置项(按门店 ID + 门店分组圈选)(需求 163 新增)
|
|
9
|
+
*/
|
|
10
|
+
interface StoreScopeItem {
|
|
11
|
+
/** 门店 ID 列表 */
|
|
12
|
+
storeIds: string[];
|
|
13
|
+
/** 门店分组 ID 列表 */
|
|
14
|
+
storeGroupIds: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 门店范围配置类型(V2)(需求 163 新增)
|
|
18
|
+
* 用于商品门店范围设置 V2 功能
|
|
19
|
+
*/
|
|
20
|
+
interface StoreScopeConfig {
|
|
21
|
+
/** 白名单配置 */
|
|
22
|
+
whitelist: StoreScopeItem;
|
|
23
|
+
/** 黑名单配置 */
|
|
24
|
+
blacklist: StoreScopeItem;
|
|
25
|
+
/** 更新时间戳(毫秒) */
|
|
26
|
+
updatedAt: number;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
2
29
|
interface ProductCategory {
|
|
3
30
|
/** 分类ID */
|
|
4
31
|
id: string;
|
|
@@ -52,6 +79,34 @@ export declare namespace ProductExpService {
|
|
|
52
79
|
/** 商品Id */
|
|
53
80
|
productId: string;
|
|
54
81
|
}
|
|
82
|
+
/** 设置门店范围 V2(需求 163 新增) */
|
|
83
|
+
interface setStoreScopeV2 {
|
|
84
|
+
/** 商品 ID */
|
|
85
|
+
productId: string;
|
|
86
|
+
/** 白名单配置(必传,两个数组都为空表示无白名单) */
|
|
87
|
+
whitelist: Entity.StoreScopeItem;
|
|
88
|
+
/** 黑名单配置(必传,两个数组都为空表示无黑名单) */
|
|
89
|
+
blacklist: Entity.StoreScopeItem;
|
|
90
|
+
}
|
|
91
|
+
/** 获取门店范围 V2(需求 163 新增) */
|
|
92
|
+
interface queryStoreScopeV2 {
|
|
93
|
+
/** 商品 ID */
|
|
94
|
+
productId: string;
|
|
95
|
+
}
|
|
96
|
+
/** 判断门店可见性(缓存优先,需求 163 新增) */
|
|
97
|
+
interface checkStoreVisible {
|
|
98
|
+
/** 商品 ID */
|
|
99
|
+
productId: string;
|
|
100
|
+
/** 门店 ID */
|
|
101
|
+
storeId: string;
|
|
102
|
+
}
|
|
103
|
+
/** 批量查询商品状态(积分商城专用,复用门店可见性缓存,需求 163 新增) */
|
|
104
|
+
interface batchQueryProductStatus {
|
|
105
|
+
/** 门店 ID */
|
|
106
|
+
storeId: string;
|
|
107
|
+
/** 商品 ID 列表(最多 100 个) */
|
|
108
|
+
productIds: string[];
|
|
109
|
+
}
|
|
55
110
|
}
|
|
56
111
|
namespace Response {
|
|
57
112
|
interface addSupplier {
|
|
@@ -101,6 +156,30 @@ export declare namespace ProductExpService {
|
|
|
101
156
|
/** 门店Id列表 */
|
|
102
157
|
storeIds: string[];
|
|
103
158
|
}
|
|
159
|
+
/** 获取门店范围 V2 响应(需求 163 新增) */
|
|
160
|
+
interface queryStoreScopeV2 {
|
|
161
|
+
/** 白名单配置(可选) */
|
|
162
|
+
whitelist: Entity.StoreScopeItem;
|
|
163
|
+
/** 黑名单配置(可选) */
|
|
164
|
+
blacklist: Entity.StoreScopeItem;
|
|
165
|
+
/** 更新时间戳(毫秒) */
|
|
166
|
+
updatedAt: number;
|
|
167
|
+
}
|
|
168
|
+
/** 判断门店可见性响应(缓存优先,需求 163 新增) */
|
|
169
|
+
interface checkStoreVisible {
|
|
170
|
+
/** 是否可见 */
|
|
171
|
+
visible: boolean;
|
|
172
|
+
}
|
|
173
|
+
/** 批量查询商品状态响应(含商品上下架状态)(需求 163 新增) */
|
|
174
|
+
interface batchQueryProductStatus {
|
|
175
|
+
/** 商品状态映射表 */
|
|
176
|
+
[productId: string]: {
|
|
177
|
+
/** 商品上架状态 */
|
|
178
|
+
onShelf: boolean;
|
|
179
|
+
/** 门店是否可见 */
|
|
180
|
+
visible: boolean;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
104
183
|
}
|
|
105
184
|
/**
|
|
106
185
|
* ProductLive Controller 接口定义
|
|
@@ -134,5 +213,21 @@ export declare namespace ProductExpService {
|
|
|
134
213
|
* 获取门店范围
|
|
135
214
|
*/
|
|
136
215
|
queryStoreScope(request: ProductExpService.Request.queryStoreScope): Promise<ProductExpService.Response.queryStoreScope>;
|
|
216
|
+
/**
|
|
217
|
+
* 设置门店范围 V2(需求 163 新增)
|
|
218
|
+
*/
|
|
219
|
+
setStoreScopeV2(request: ProductExpService.Request.setStoreScopeV2): Promise<void>;
|
|
220
|
+
/**
|
|
221
|
+
* 获取门店范围 V2(需求 163 新增)
|
|
222
|
+
*/
|
|
223
|
+
queryStoreScopeV2(request: ProductExpService.Request.queryStoreScopeV2): Promise<ProductExpService.Response.queryStoreScopeV2>;
|
|
224
|
+
/**
|
|
225
|
+
* 判断门店可见性(缓存优先,需求 163 新增)
|
|
226
|
+
*/
|
|
227
|
+
checkStoreVisible(request: ProductExpService.Request.checkStoreVisible): Promise<ProductExpService.Response.checkStoreVisible>;
|
|
228
|
+
/**
|
|
229
|
+
* 批量查询商品状态(积分商城专用)(需求 163 新增)
|
|
230
|
+
*/
|
|
231
|
+
batchQueryProductStatus(request: ProductExpService.Request.batchQueryProductStatus): Promise<ProductExpService.Response.batchQueryProductStatus>;
|
|
137
232
|
}
|
|
138
233
|
}
|