@be-link/ecommerce-product-service-node-sdk 0.1.28 → 0.1.29
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 +30 -1
- package/modules/product/service.js +8 -0
- package/modules/product/types.d.ts +51 -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
|
@@ -78,6 +78,14 @@ export declare namespace ENUM {
|
|
|
78
78
|
VISIBLE = "\u53EF\u89C1",
|
|
79
79
|
INVISIBLE = "\u4E0D\u53EF\u89C1"
|
|
80
80
|
}
|
|
81
|
+
enum SKU_STATUS {
|
|
82
|
+
ACTIVE = "ACTIVE",
|
|
83
|
+
INACTIVE = "INACTIVE"
|
|
84
|
+
}
|
|
85
|
+
enum SKU_STATUS_CHINESE {
|
|
86
|
+
ACTIVE = "\u4E0A\u67B6",
|
|
87
|
+
INACTIVE = "\u4E0B\u67B6"
|
|
88
|
+
}
|
|
81
89
|
}
|
|
82
90
|
namespace TASK_ENUM {
|
|
83
91
|
enum STATUS {
|
|
@@ -113,6 +121,19 @@ export declare namespace ENUM {
|
|
|
113
121
|
YES = "\u662F"
|
|
114
122
|
}
|
|
115
123
|
}
|
|
124
|
+
namespace PRODUCT_EXP_ENUM {
|
|
125
|
+
/**
|
|
126
|
+
* 圈选类型枚举
|
|
127
|
+
*/
|
|
128
|
+
enum SCOPE_TYPE {
|
|
129
|
+
/** 所有门店 */
|
|
130
|
+
ALL = "ALL",
|
|
131
|
+
/** 按门店 ID 圈选 */
|
|
132
|
+
STORE = "STORE",
|
|
133
|
+
/** 按标签圈选 */
|
|
134
|
+
TAG = "TAG"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
116
137
|
}
|
|
117
138
|
export declare const PRODUCT_TYPE_MAP: Record<string, string>;
|
|
118
139
|
export declare const PRODUCT_STATUS_MAP: Record<string, string>;
|
|
@@ -122,6 +143,7 @@ export declare const PRODUCT_STORAGE_METHOD_MAP: Record<string, string>;
|
|
|
122
143
|
export declare const PRODUCT_CLASSIFICATION_MAP: Record<string, string>;
|
|
123
144
|
export declare const PRODUCT_FREIGHT_TYPE_MAP: Record<string, string>;
|
|
124
145
|
export declare const PRODUCT_STORE_SCOPE_TYPE_MAP: Record<string, string>;
|
|
146
|
+
export declare const SKU_STATUS_MAP: Record<string, string>;
|
|
125
147
|
export declare const TASK_STATUS_MAP: Record<string, string>;
|
|
126
148
|
export declare const TASK_STEP_MAP: Record<string, string>;
|
|
127
149
|
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) {
|
|
@@ -100,6 +100,16 @@ var ENUM;
|
|
|
100
100
|
STORE_SCOPE_TYPE_CHINESE["VISIBLE"] = "\u53EF\u89C1";
|
|
101
101
|
STORE_SCOPE_TYPE_CHINESE["INVISIBLE"] = "\u4E0D\u53EF\u89C1";
|
|
102
102
|
})(STORE_SCOPE_TYPE_CHINESE = PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE || (PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE = {}));
|
|
103
|
+
let SKU_STATUS;
|
|
104
|
+
(function (SKU_STATUS) {
|
|
105
|
+
SKU_STATUS["ACTIVE"] = "ACTIVE";
|
|
106
|
+
SKU_STATUS["INACTIVE"] = "INACTIVE";
|
|
107
|
+
})(SKU_STATUS = PRODUCT_ENUM.SKU_STATUS || (PRODUCT_ENUM.SKU_STATUS = {}));
|
|
108
|
+
let SKU_STATUS_CHINESE;
|
|
109
|
+
(function (SKU_STATUS_CHINESE) {
|
|
110
|
+
SKU_STATUS_CHINESE["ACTIVE"] = "\u4E0A\u67B6";
|
|
111
|
+
SKU_STATUS_CHINESE["INACTIVE"] = "\u4E0B\u67B6";
|
|
112
|
+
})(SKU_STATUS_CHINESE = PRODUCT_ENUM.SKU_STATUS_CHINESE || (PRODUCT_ENUM.SKU_STATUS_CHINESE = {}));
|
|
103
113
|
})(PRODUCT_ENUM = ENUM.PRODUCT_ENUM || (ENUM.PRODUCT_ENUM = {}));
|
|
104
114
|
let TASK_ENUM;
|
|
105
115
|
(function (TASK_ENUM) {
|
|
@@ -143,6 +153,21 @@ var ENUM;
|
|
|
143
153
|
BOOLEAN_CHINESE["YES"] = "\u662F";
|
|
144
154
|
})(BOOLEAN_CHINESE = COMMON_ENUM.BOOLEAN_CHINESE || (COMMON_ENUM.BOOLEAN_CHINESE = {}));
|
|
145
155
|
})(COMMON_ENUM = ENUM.COMMON_ENUM || (ENUM.COMMON_ENUM = {}));
|
|
156
|
+
let PRODUCT_EXP_ENUM;
|
|
157
|
+
(function (PRODUCT_EXP_ENUM) {
|
|
158
|
+
/**
|
|
159
|
+
* 圈选类型枚举
|
|
160
|
+
*/
|
|
161
|
+
let SCOPE_TYPE;
|
|
162
|
+
(function (SCOPE_TYPE) {
|
|
163
|
+
/** 所有门店 */
|
|
164
|
+
SCOPE_TYPE["ALL"] = "ALL";
|
|
165
|
+
/** 按门店 ID 圈选 */
|
|
166
|
+
SCOPE_TYPE["STORE"] = "STORE";
|
|
167
|
+
/** 按标签圈选 */
|
|
168
|
+
SCOPE_TYPE["TAG"] = "TAG";
|
|
169
|
+
})(SCOPE_TYPE = PRODUCT_EXP_ENUM.SCOPE_TYPE || (PRODUCT_EXP_ENUM.SCOPE_TYPE = {}));
|
|
170
|
+
})(PRODUCT_EXP_ENUM = ENUM.PRODUCT_EXP_ENUM || (ENUM.PRODUCT_EXP_ENUM = {}));
|
|
146
171
|
})(ENUM || (exports.ENUM = ENUM = {}));
|
|
147
172
|
// 中英文映射 Record
|
|
148
173
|
exports.PRODUCT_TYPE_MAP = {
|
|
@@ -184,6 +209,10 @@ exports.PRODUCT_STORE_SCOPE_TYPE_MAP = {
|
|
|
184
209
|
[ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE.VISIBLE]: ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE.VISIBLE,
|
|
185
210
|
[ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE.INVISIBLE]: ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE.INVISIBLE,
|
|
186
211
|
};
|
|
212
|
+
exports.SKU_STATUS_MAP = {
|
|
213
|
+
[ENUM.PRODUCT_ENUM.SKU_STATUS.ACTIVE]: ENUM.PRODUCT_ENUM.SKU_STATUS_CHINESE.ACTIVE,
|
|
214
|
+
[ENUM.PRODUCT_ENUM.SKU_STATUS.INACTIVE]: ENUM.PRODUCT_ENUM.SKU_STATUS_CHINESE.INACTIVE,
|
|
215
|
+
};
|
|
187
216
|
exports.TASK_STATUS_MAP = {
|
|
188
217
|
[ENUM.TASK_ENUM.STATUS.ACTIVE]: ENUM.TASK_ENUM.STATUS_CHINESE.ACTIVE,
|
|
189
218
|
[ENUM.TASK_ENUM.STATUS.INACTIVE]: ENUM.TASK_ENUM.STATUS_CHINESE.INACTIVE,
|
|
@@ -101,6 +101,7 @@ __decorate([
|
|
|
101
101
|
], ProductService.prototype, "list", null);
|
|
102
102
|
__decorate([
|
|
103
103
|
(0, tsoa_1.OperationId)('创建商品'),
|
|
104
|
+
(0, tsoa_1.Tags)('163'),
|
|
104
105
|
(0, tsoa_1.Post)('create'),
|
|
105
106
|
__param(0, (0, tsoa_1.Body)())
|
|
106
107
|
], ProductService.prototype, "create", null);
|
|
@@ -111,11 +112,13 @@ __decorate([
|
|
|
111
112
|
], ProductService.prototype, "detail", null);
|
|
112
113
|
__decorate([
|
|
113
114
|
(0, tsoa_1.OperationId)('商品更新'),
|
|
115
|
+
(0, tsoa_1.Tags)('163'),
|
|
114
116
|
(0, tsoa_1.Post)('update'),
|
|
115
117
|
__param(0, (0, tsoa_1.Body)())
|
|
116
118
|
], ProductService.prototype, "update", null);
|
|
117
119
|
__decorate([
|
|
118
120
|
(0, tsoa_1.OperationId)('批量更新'),
|
|
121
|
+
(0, tsoa_1.Tags)('163'),
|
|
119
122
|
(0, tsoa_1.Post)('batch-update'),
|
|
120
123
|
__param(0, (0, tsoa_1.Body)())
|
|
121
124
|
], ProductService.prototype, "batchUpdate", null);
|
|
@@ -131,16 +134,19 @@ __decorate([
|
|
|
131
134
|
], ProductService.prototype, "checkSkuCode", null);
|
|
132
135
|
__decorate([
|
|
133
136
|
(0, tsoa_1.OperationId)('商品导出'),
|
|
137
|
+
(0, tsoa_1.Tags)('163'),
|
|
134
138
|
(0, tsoa_1.Post)('export'),
|
|
135
139
|
__param(0, (0, tsoa_1.Body)())
|
|
136
140
|
], ProductService.prototype, "export", null);
|
|
137
141
|
__decorate([
|
|
138
142
|
(0, tsoa_1.OperationId)('获取商品信息(不含规格信息)'),
|
|
143
|
+
(0, tsoa_1.Tags)('163'),
|
|
139
144
|
(0, tsoa_1.Post)('query-product-list'),
|
|
140
145
|
__param(0, (0, tsoa_1.Body)())
|
|
141
146
|
], ProductService.prototype, "queryProductList", null);
|
|
142
147
|
__decorate([
|
|
143
148
|
(0, tsoa_1.OperationId)('获取商品+规格信息'),
|
|
149
|
+
(0, tsoa_1.Tags)('163'),
|
|
144
150
|
(0, tsoa_1.Post)('query-product-sku-list'),
|
|
145
151
|
__param(0, (0, tsoa_1.Body)())
|
|
146
152
|
], ProductService.prototype, "queryProductSkuList", null);
|
|
@@ -151,11 +157,13 @@ __decorate([
|
|
|
151
157
|
], ProductService.prototype, "querySkuBaseInfo", null);
|
|
152
158
|
__decorate([
|
|
153
159
|
(0, tsoa_1.OperationId)('获取商品详情-C端'),
|
|
160
|
+
(0, tsoa_1.Tags)('163'),
|
|
154
161
|
(0, tsoa_1.Post)('get-product-detail'),
|
|
155
162
|
__param(0, (0, tsoa_1.Body)())
|
|
156
163
|
], ProductService.prototype, "getProductDetail", null);
|
|
157
164
|
__decorate([
|
|
158
165
|
(0, tsoa_1.OperationId)('获取商品详情-C端-含下架'),
|
|
166
|
+
(0, tsoa_1.Tags)('163'),
|
|
159
167
|
(0, tsoa_1.Post)('get-product-info'),
|
|
160
168
|
__param(0, (0, tsoa_1.Body)())
|
|
161
169
|
], ProductService.prototype, "getProductInfo", null);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProductExpServiceTypes } from '../..';
|
|
1
2
|
export declare namespace ProductService {
|
|
2
3
|
/** 商品明细项 */
|
|
3
4
|
interface ProductDetailItem {
|
|
@@ -19,6 +20,8 @@ export declare namespace ProductService {
|
|
|
19
20
|
商品类型: string;
|
|
20
21
|
售卖类型: string;
|
|
21
22
|
规格明细: string;
|
|
23
|
+
/** SKU ID(需求 163 新增) */
|
|
24
|
+
'SKU ID': string;
|
|
22
25
|
规格编码: string;
|
|
23
26
|
库存: number;
|
|
24
27
|
划线价: number;
|
|
@@ -43,6 +46,8 @@ export declare namespace ProductService {
|
|
|
43
46
|
multiSkuCodes: string[];
|
|
44
47
|
/** 是否展示绑定子商品 1展示,0不展示 */
|
|
45
48
|
showBindSkus: number;
|
|
49
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
50
|
+
status: string;
|
|
46
51
|
}
|
|
47
52
|
/**
|
|
48
53
|
* 核销期限接口
|
|
@@ -114,6 +119,12 @@ export declare namespace ProductService {
|
|
|
114
119
|
stock: number;
|
|
115
120
|
/** 是否展示绑定子商品 1展示,0不展示 */
|
|
116
121
|
showBindSkus?: number;
|
|
122
|
+
/** SKU排序(可选,后端将按 skuList 顺序自动生成) */
|
|
123
|
+
sortOrder?: number;
|
|
124
|
+
/** SKU上下架状态:ACTIVE-上架,INACTIVE-下架(需求 163 新增) */
|
|
125
|
+
status: string;
|
|
126
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
127
|
+
imageUrls?: string[];
|
|
117
128
|
}
|
|
118
129
|
/**
|
|
119
130
|
* 产品信息接口
|
|
@@ -167,6 +178,10 @@ export declare namespace ProductService {
|
|
|
167
178
|
purchaseLimit?: number;
|
|
168
179
|
/** 运费模板版本类型 */
|
|
169
180
|
freightType?: string;
|
|
181
|
+
/** 是否启用规格图片 0:否 1:是(需求 163 新增) */
|
|
182
|
+
enableSkuImage?: number;
|
|
183
|
+
/** 是否需要自动抓取订单量发货 0:否 1:是(需求 163 新增) */
|
|
184
|
+
autoFetchOrderQuantity?: number;
|
|
170
185
|
}
|
|
171
186
|
interface ProductData {
|
|
172
187
|
/** 产品信息 */
|
|
@@ -228,8 +243,6 @@ export declare namespace ProductService {
|
|
|
228
243
|
dispatchType?: string;
|
|
229
244
|
/** 直播分组ID */
|
|
230
245
|
liveGroupId?: string;
|
|
231
|
-
/** 是否删除 */
|
|
232
|
-
isDelete?: boolean;
|
|
233
246
|
}
|
|
234
247
|
interface queryScheduledTask {
|
|
235
248
|
/** 商品Id */
|
|
@@ -459,6 +472,12 @@ export declare namespace ProductService {
|
|
|
459
472
|
invisibleStores: string[];
|
|
460
473
|
/** 删除时间 */
|
|
461
474
|
deletedAt: number;
|
|
475
|
+
/** 是否启用规格图片 0:否 1:是(需求 163 新增) */
|
|
476
|
+
enableSkuImage?: number;
|
|
477
|
+
/** 是否需要自动抓取订单量发货 0:否 1:是(需求 163 新增) */
|
|
478
|
+
autoFetchOrderQuantity?: number;
|
|
479
|
+
/** 提货方式 */
|
|
480
|
+
pickType?: string;
|
|
462
481
|
}[];
|
|
463
482
|
}
|
|
464
483
|
interface queryProductSkuList {
|
|
@@ -484,7 +503,7 @@ export declare namespace ProductService {
|
|
|
484
503
|
memberPrice: number;
|
|
485
504
|
/** 库存 */
|
|
486
505
|
stock: number;
|
|
487
|
-
/**
|
|
506
|
+
/** 商品上下架状态 */
|
|
488
507
|
status: string;
|
|
489
508
|
/** SKU ID */
|
|
490
509
|
skuId: string;
|
|
@@ -492,6 +511,10 @@ export declare namespace ProductService {
|
|
|
492
511
|
attrs: Attr[];
|
|
493
512
|
/** SKU编码 */
|
|
494
513
|
skuCode: string;
|
|
514
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
515
|
+
skuStatus: string;
|
|
516
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
517
|
+
imageUrls: string[];
|
|
495
518
|
}[];
|
|
496
519
|
}
|
|
497
520
|
interface querySkuBaseInfo extends Partial<SkuField> {
|
|
@@ -539,8 +562,14 @@ export declare namespace ProductService {
|
|
|
539
562
|
visibleStores: string[] | null;
|
|
540
563
|
/** 门店不可见范围和可见互斥 */
|
|
541
564
|
invisibleStores: string[] | null;
|
|
565
|
+
/** 门店范围配置 V2(需求 163 新增) */
|
|
566
|
+
storeScopeConfig?: ProductExpServiceTypes.Entity.StoreScopeConfig;
|
|
542
567
|
/** 是否会员商品 */
|
|
543
568
|
isMember?: boolean;
|
|
569
|
+
/** 是否启用规格图片 0:否 1:是(需求 163 新增) */
|
|
570
|
+
enableSkuImage?: number;
|
|
571
|
+
/** 是否需要自动抓取订单量发货 0:否 1:是(需求 163 新增) */
|
|
572
|
+
autoFetchOrderQuantity?: number;
|
|
544
573
|
};
|
|
545
574
|
/** SKU列表 */
|
|
546
575
|
skuList: {
|
|
@@ -556,6 +585,12 @@ export declare namespace ProductService {
|
|
|
556
585
|
memberPrice: number;
|
|
557
586
|
/** SKU编码 */
|
|
558
587
|
skuCode: string;
|
|
588
|
+
/** SKU排序(需求 163 新增) */
|
|
589
|
+
sortOrder: number;
|
|
590
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
591
|
+
status: string;
|
|
592
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
593
|
+
imageUrls?: string[];
|
|
559
594
|
}[];
|
|
560
595
|
}
|
|
561
596
|
interface isSoldOut {
|
|
@@ -619,6 +654,10 @@ export declare namespace ProductService {
|
|
|
619
654
|
isMember?: boolean;
|
|
620
655
|
/** 是否一元购商品 */
|
|
621
656
|
isOneYuan?: boolean;
|
|
657
|
+
/** 是否启用规格图片 0:否 1:是(需求 163 新增) */
|
|
658
|
+
enableSkuImage?: number;
|
|
659
|
+
/** 是否需要自动抓取订单量发货 0:否 1:是(需求 163 新增) */
|
|
660
|
+
autoFetchOrderQuantity?: number;
|
|
622
661
|
};
|
|
623
662
|
/** SKU列表 */
|
|
624
663
|
skuList: {
|
|
@@ -642,12 +681,16 @@ export declare namespace ProductService {
|
|
|
642
681
|
bindSkus: BindSku[];
|
|
643
682
|
/** 是否展示绑定子商品 1展示,0不展示 */
|
|
644
683
|
showBindSkus: number;
|
|
684
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
685
|
+
status: string;
|
|
645
686
|
/** 是否有绑定子商品 1有,0无 */
|
|
646
687
|
hasBindSkus: number;
|
|
647
688
|
/** 是否有多码 1有,0无 */
|
|
648
689
|
hasMultiSkuCodes: number;
|
|
649
690
|
/** 是否有会员价 1有,0无 */
|
|
650
691
|
hasMemberPrice: number;
|
|
692
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
693
|
+
imageUrls: string[];
|
|
651
694
|
}[];
|
|
652
695
|
}
|
|
653
696
|
interface searchProductByName {
|
|
@@ -675,8 +718,12 @@ export declare namespace ProductService {
|
|
|
675
718
|
attrs: Attr[];
|
|
676
719
|
/** 价格 */
|
|
677
720
|
price: number;
|
|
678
|
-
/**
|
|
721
|
+
/** 商品上下架状态 */
|
|
679
722
|
status: string;
|
|
723
|
+
/** SKU上下架状态(需求 163 新增) */
|
|
724
|
+
skuStatus: string;
|
|
725
|
+
/** 规格图片URL数组(需求 163 新增) */
|
|
726
|
+
imageUrls?: string[];
|
|
680
727
|
}
|
|
681
728
|
interface productQrCode {
|
|
682
729
|
/** 二维码URL */
|
|
@@ -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: number[];
|
|
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
|
}
|