@be-link/ecommerce-backend-bff-service-node-sdk 0.0.93 → 0.0.95
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/miniprogram/auth/service.d.ts +46 -0
- package/cjs/bff/modules/miniprogram/auth/service.js +66 -0
- package/cjs/bff/modules/miniprogram/auth/types.d.ts +133 -0
- package/cjs/bff/modules/miniprogram/auth/types.js +2 -0
- package/cjs/bff/modules/miniprogram/franchisee/service.d.ts +12 -0
- package/cjs/bff/modules/miniprogram/franchisee/service.js +22 -0
- package/cjs/bff/modules/miniprogram/franchisee/types.d.ts +25 -0
- package/cjs/bff/modules/miniprogram/franchisee/types.js +2 -0
- package/cjs/bff/modules/pandora/auth/service.d.ts +6 -0
- package/cjs/bff/modules/pandora/auth/service.js +8 -0
- package/cjs/bff/modules/pandora/auth/types.d.ts +30 -0
- package/cjs/bff/modules/pandora/coupon/types.d.ts +1 -1
- package/cjs/bff/modules/pandora/franchisee/service.d.ts +19 -0
- package/cjs/bff/modules/pandora/franchisee/service.js +43 -0
- package/cjs/bff/modules/pandora/franchisee/types.d.ts +204 -0
- package/cjs/bff/modules/pandora/franchisee/types.js +2 -0
- package/cjs/bff/modules/pandora/store/service.d.ts +0 -60
- package/cjs/bff/modules/pandora/store/service.js +0 -80
- package/cjs/bff/modules/pandora/store/types.d.ts +10 -85
- package/cjs/bff/modules/pandora/store/types.js +11 -0
- package/cjs/bff/modules/pandora/user/service.d.ts +0 -1
- package/cjs/bff/modules/pandora/user/service.js +0 -3
- package/cjs/bff/modules/pandora/user/types.d.ts +0 -27
- package/cjs/index.d.ts +18 -0
- package/cjs/index.js +45 -37
- package/esm/bff/modules/miniprogram/auth/service.d.ts +46 -0
- package/esm/bff/modules/miniprogram/auth/service.mjs +59 -0
- package/esm/bff/modules/miniprogram/auth/types.d.ts +133 -0
- package/esm/bff/modules/miniprogram/auth/types.mjs +1 -0
- package/esm/bff/modules/miniprogram/franchisee/service.d.ts +12 -0
- package/esm/bff/modules/miniprogram/franchisee/service.mjs +15 -0
- package/esm/bff/modules/miniprogram/franchisee/types.d.ts +25 -0
- package/esm/bff/modules/miniprogram/franchisee/types.mjs +1 -0
- package/esm/bff/modules/pandora/auth/service.d.ts +6 -0
- package/esm/bff/modules/pandora/auth/service.mjs +8 -0
- package/esm/bff/modules/pandora/auth/types.d.ts +30 -0
- package/esm/bff/modules/pandora/coupon/types.d.ts +1 -1
- package/esm/bff/modules/pandora/franchisee/service.d.ts +19 -0
- package/esm/bff/modules/pandora/franchisee/service.mjs +36 -0
- package/esm/bff/modules/pandora/franchisee/types.d.ts +204 -0
- package/esm/bff/modules/pandora/franchisee/types.mjs +1 -0
- package/esm/bff/modules/pandora/store/service.d.ts +0 -60
- package/esm/bff/modules/pandora/store/service.mjs +0 -80
- package/esm/bff/modules/pandora/store/types.d.ts +10 -85
- package/esm/bff/modules/pandora/store/types.mjs +10 -1
- package/esm/bff/modules/pandora/user/service.d.ts +0 -1
- package/esm/bff/modules/pandora/user/service.mjs +0 -3
- package/esm/bff/modules/pandora/user/types.d.ts +0 -27
- package/esm/index.d.ts +18 -0
- package/esm/index.mjs +7 -0
- package/package.json +4 -4
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { MiniprogramAuthService as Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* MiniprogramAuthService - 小程序认证服务模块
|
|
6
|
+
* 提供小程序认证相关的 API 方法
|
|
7
|
+
* 平台: miniprogram
|
|
8
|
+
*/
|
|
9
|
+
export declare class MiniprogramAuthServiceClass extends BaseService implements Service.AuthController {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
/**
|
|
12
|
+
* 小程序端获取用户菜单权限
|
|
13
|
+
* @returns Promise,解析为标准响应格式
|
|
14
|
+
*/
|
|
15
|
+
getUserMenuPermissions(): Promise<StandardResponse<Service.Response.getUserMenuPermissions>>;
|
|
16
|
+
/**
|
|
17
|
+
* 获取微信UnionId
|
|
18
|
+
* @param request - 请求参数
|
|
19
|
+
* @returns Promise,解析为标准响应格式
|
|
20
|
+
*/
|
|
21
|
+
getUnionId(request: Service.Request.getUnionId): Promise<StandardResponse<Service.Response.getUnionId>>;
|
|
22
|
+
/**
|
|
23
|
+
* UnionId登录
|
|
24
|
+
* @param request - 请求参数
|
|
25
|
+
* @returns Promise,解析为标准响应格式
|
|
26
|
+
*/
|
|
27
|
+
unionIdLogin(request: Service.Request.unionIdLogin): Promise<StandardResponse<Service.Response.unionIdLogin>>;
|
|
28
|
+
/**
|
|
29
|
+
* 获取微信绑定手机号
|
|
30
|
+
* @param request - 请求参数
|
|
31
|
+
* @returns Promise,解析为标准响应格式
|
|
32
|
+
*/
|
|
33
|
+
getBindPhone(request: Service.Request.getBindPhone): Promise<StandardResponse<Service.Response.getBindPhone>>;
|
|
34
|
+
/**
|
|
35
|
+
* 绑定手机号到UnionId
|
|
36
|
+
* @param request - 请求参数
|
|
37
|
+
* @returns Promise,解析为标准响应格式
|
|
38
|
+
*/
|
|
39
|
+
unionIdBindPhone(request: Service.Request.bindPhoneToUnionId): Promise<StandardResponse<Service.Response.bindPhoneToUnionId>>;
|
|
40
|
+
/**
|
|
41
|
+
* 账号密码登录(新格式)
|
|
42
|
+
* @param request - 请求参数
|
|
43
|
+
* @returns Promise,解析为标准响应格式
|
|
44
|
+
*/
|
|
45
|
+
accountLogin(request: Service.Request.accountLogin): Promise<StandardResponse<Service.Response.accountLogin>>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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.MiniprogramAuthServiceClass = void 0;
|
|
7
|
+
const BaseService_1 = __importDefault(require("../../BaseService"));
|
|
8
|
+
/**
|
|
9
|
+
* MiniprogramAuthService - 小程序认证服务模块
|
|
10
|
+
* 提供小程序认证相关的 API 方法
|
|
11
|
+
* 平台: miniprogram
|
|
12
|
+
*/
|
|
13
|
+
class MiniprogramAuthServiceClass extends BaseService_1.default {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.prefixUrl = '/miniprogram/auth';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 小程序端获取用户菜单权限
|
|
20
|
+
* @returns Promise,解析为标准响应格式
|
|
21
|
+
*/
|
|
22
|
+
getUserMenuPermissions() {
|
|
23
|
+
return this.request(this.getUserMenuPermissions, {});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 获取微信UnionId
|
|
27
|
+
* @param request - 请求参数
|
|
28
|
+
* @returns Promise,解析为标准响应格式
|
|
29
|
+
*/
|
|
30
|
+
getUnionId(request) {
|
|
31
|
+
return this.request(this.getUnionId, request);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* UnionId登录
|
|
35
|
+
* @param request - 请求参数
|
|
36
|
+
* @returns Promise,解析为标准响应格式
|
|
37
|
+
*/
|
|
38
|
+
unionIdLogin(request) {
|
|
39
|
+
return this.request(this.unionIdLogin, request);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 获取微信绑定手机号
|
|
43
|
+
* @param request - 请求参数
|
|
44
|
+
* @returns Promise,解析为标准响应格式
|
|
45
|
+
*/
|
|
46
|
+
getBindPhone(request) {
|
|
47
|
+
return this.request(this.getBindPhone, request);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 绑定手机号到UnionId
|
|
51
|
+
* @param request - 请求参数
|
|
52
|
+
* @returns Promise,解析为标准响应格式
|
|
53
|
+
*/
|
|
54
|
+
unionIdBindPhone(request) {
|
|
55
|
+
return this.request(this.unionIdBindPhone, request);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 账号密码登录(新格式)
|
|
59
|
+
* @param request - 请求参数
|
|
60
|
+
* @returns Promise,解析为标准响应格式
|
|
61
|
+
*/
|
|
62
|
+
accountLogin(request) {
|
|
63
|
+
return this.request(this.accountLogin, request);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.MiniprogramAuthServiceClass = MiniprogramAuthServiceClass;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { StandardResponse } from '../../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Miniprogram Auth Module Type Definitions
|
|
4
|
+
* 小程序认证模块类型定义
|
|
5
|
+
*/
|
|
6
|
+
export declare namespace MiniprogramAuthService {
|
|
7
|
+
interface RoleItem {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
namespace Request {
|
|
12
|
+
/**
|
|
13
|
+
* 获取微信UnionId请求
|
|
14
|
+
*/
|
|
15
|
+
interface getUnionId {
|
|
16
|
+
code: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* UnionId登录请求
|
|
20
|
+
*/
|
|
21
|
+
interface unionIdLogin {
|
|
22
|
+
unionId: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 获取微信绑定手机号请求
|
|
26
|
+
*/
|
|
27
|
+
interface getBindPhone {
|
|
28
|
+
code: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 绑定手机号到UnionId请求
|
|
32
|
+
*/
|
|
33
|
+
interface bindPhoneToUnionId {
|
|
34
|
+
openId: string;
|
|
35
|
+
unionId: string;
|
|
36
|
+
phone: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 账号密码登录请求(新格式)
|
|
40
|
+
*/
|
|
41
|
+
interface accountLogin {
|
|
42
|
+
account: string;
|
|
43
|
+
password: string;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
namespace Response {
|
|
47
|
+
/**
|
|
48
|
+
* 获取用户菜单权限响应
|
|
49
|
+
*/
|
|
50
|
+
interface getUserMenuPermissions {
|
|
51
|
+
rules: Array<{
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
path: string;
|
|
55
|
+
isShow: number;
|
|
56
|
+
sort: number;
|
|
57
|
+
pid: string;
|
|
58
|
+
type: string;
|
|
59
|
+
icon: string;
|
|
60
|
+
status: string;
|
|
61
|
+
platform: string;
|
|
62
|
+
background: string;
|
|
63
|
+
ruleKey: string;
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 获取微信UnionId响应
|
|
68
|
+
*/
|
|
69
|
+
interface getUnionId {
|
|
70
|
+
openId: string;
|
|
71
|
+
unionId: string;
|
|
72
|
+
token: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* UnionId登录响应
|
|
76
|
+
*/
|
|
77
|
+
interface unionIdLogin {
|
|
78
|
+
code: 0 | 1;
|
|
79
|
+
msg: string;
|
|
80
|
+
token: string;
|
|
81
|
+
roles: RoleItem[];
|
|
82
|
+
}
|
|
83
|
+
type getBindPhone = string;
|
|
84
|
+
/**
|
|
85
|
+
* 绑定手机号到UnionId响应
|
|
86
|
+
*/
|
|
87
|
+
interface bindPhoneToUnionId {
|
|
88
|
+
code: 0;
|
|
89
|
+
msg: string;
|
|
90
|
+
token: string;
|
|
91
|
+
roles: RoleItem[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 账号密码登录响应(新格式)
|
|
95
|
+
*/
|
|
96
|
+
interface accountLogin {
|
|
97
|
+
code: 0;
|
|
98
|
+
msg: string;
|
|
99
|
+
token: string;
|
|
100
|
+
roles: RoleItem[];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Miniprogram Auth Controller 接口定义
|
|
105
|
+
* 由 packages/server/src/api/controller/miniprogram/auth.ts 实现
|
|
106
|
+
*/
|
|
107
|
+
interface AuthController {
|
|
108
|
+
/**
|
|
109
|
+
* 小程序端获取用户菜单权限
|
|
110
|
+
*/
|
|
111
|
+
getUserMenuPermissions(): Promise<StandardResponse<Response.getUserMenuPermissions>>;
|
|
112
|
+
/**
|
|
113
|
+
* 获取微信UnionId
|
|
114
|
+
*/
|
|
115
|
+
getUnionId(request: Request.getUnionId): Promise<StandardResponse<Response.getUnionId>>;
|
|
116
|
+
/**
|
|
117
|
+
* UnionId登录
|
|
118
|
+
*/
|
|
119
|
+
unionIdLogin(request: Request.unionIdLogin): Promise<StandardResponse<Response.unionIdLogin>>;
|
|
120
|
+
/**
|
|
121
|
+
* 获取微信绑定手机号
|
|
122
|
+
*/
|
|
123
|
+
getBindPhone(request: Request.getBindPhone): Promise<StandardResponse<Response.getBindPhone>>;
|
|
124
|
+
/**
|
|
125
|
+
* 绑定手机号到UnionId
|
|
126
|
+
*/
|
|
127
|
+
unionIdBindPhone(request: Request.bindPhoneToUnionId): Promise<StandardResponse<Response.bindPhoneToUnionId>>;
|
|
128
|
+
/**
|
|
129
|
+
* 账号密码登录(新格式)
|
|
130
|
+
*/
|
|
131
|
+
accountLogin(request: Request.accountLogin): Promise<StandardResponse<Response.accountLogin>>;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MiniprogramFranchiseeService as Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* MiniprogramFranchiseeService - Miniprogram Franchisee 服务模块
|
|
6
|
+
* 提供 Miniprogram Franchisee 相关的 API 方法
|
|
7
|
+
* 平台: miniprogram
|
|
8
|
+
*/
|
|
9
|
+
export declare class MiniprogramFranchiseeService extends BaseService implements Service.FranchiseeController {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
getFranchiseeIdByUserId(request: Service.Request.getFranchiseeIdByUserId): Promise<StandardResponse<Service.Response.getFranchiseeIdByUserId>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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.MiniprogramFranchiseeService = void 0;
|
|
7
|
+
const BaseService_1 = __importDefault(require("../../BaseService"));
|
|
8
|
+
/**
|
|
9
|
+
* MiniprogramFranchiseeService - Miniprogram Franchisee 服务模块
|
|
10
|
+
* 提供 Miniprogram Franchisee 相关的 API 方法
|
|
11
|
+
* 平台: miniprogram
|
|
12
|
+
*/
|
|
13
|
+
class MiniprogramFranchiseeService extends BaseService_1.default {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.prefixUrl = '/miniprogram/franchisee';
|
|
17
|
+
}
|
|
18
|
+
getFranchiseeIdByUserId(request) {
|
|
19
|
+
return this.request(this.getFranchiseeIdByUserId, request);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.MiniprogramFranchiseeService = MiniprogramFranchiseeService;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StandardResponse } from '../../../../types';
|
|
2
|
+
export declare namespace MiniprogramFranchiseeService {
|
|
3
|
+
namespace Request {
|
|
4
|
+
/**
|
|
5
|
+
* 根据用户ID获取加盟商ID
|
|
6
|
+
*/
|
|
7
|
+
interface getFranchiseeIdByUserId {
|
|
8
|
+
userId: string;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
namespace Response {
|
|
12
|
+
/**
|
|
13
|
+
* 根据用户ID获取加盟商ID响应
|
|
14
|
+
*/
|
|
15
|
+
interface getFranchiseeIdByUserId {
|
|
16
|
+
id: string;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Franchisee Controller 接口定义
|
|
21
|
+
*/
|
|
22
|
+
interface FranchiseeController {
|
|
23
|
+
getFranchiseeIdByUserId(request: Request.getFranchiseeIdByUserId): Promise<StandardResponse<Response.getFranchiseeIdByUserId>>;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -19,4 +19,10 @@ export declare class PandoraAuthService extends BaseService implements Service.A
|
|
|
19
19
|
* @returns Promise,解析为标准响应格式
|
|
20
20
|
*/
|
|
21
21
|
getPermissionTree(): Promise<StandardResponse<Service.Response.permissionTree>>;
|
|
22
|
+
/**
|
|
23
|
+
* 获取用户菜单权限
|
|
24
|
+
* @param request - 请求参数
|
|
25
|
+
* @returns Promise,解析为标准响应格式
|
|
26
|
+
*/
|
|
27
|
+
getUserMenuPermissions(request: Service.Request.getUserMenuPermissions): Promise<StandardResponse<Service.Response.getUserMenuPermissions>>;
|
|
22
28
|
}
|
|
@@ -30,5 +30,13 @@ class PandoraAuthService extends BaseService_1.default {
|
|
|
30
30
|
getPermissionTree() {
|
|
31
31
|
return this.request(this.getPermissionTree, {});
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* 获取用户菜单权限
|
|
35
|
+
* @param request - 请求参数
|
|
36
|
+
* @returns Promise,解析为标准响应格式
|
|
37
|
+
*/
|
|
38
|
+
getUserMenuPermissions(request) {
|
|
39
|
+
return this.request(this.getUserMenuPermissions, request);
|
|
40
|
+
}
|
|
33
41
|
}
|
|
34
42
|
exports.PandoraAuthService = PandoraAuthService;
|
|
@@ -20,6 +20,13 @@ export declare namespace PandoraAuthService {
|
|
|
20
20
|
redirectUrl?: string;
|
|
21
21
|
organizationType?: 'BeLink' | 'SnowMountain';
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* 获取用户菜单权限
|
|
25
|
+
*/
|
|
26
|
+
interface getUserMenuPermissions {
|
|
27
|
+
id: string;
|
|
28
|
+
roleId: string;
|
|
29
|
+
}
|
|
23
30
|
}
|
|
24
31
|
namespace Response {
|
|
25
32
|
/**
|
|
@@ -47,6 +54,25 @@ export declare namespace PandoraAuthService {
|
|
|
47
54
|
children?: any[];
|
|
48
55
|
}>;
|
|
49
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* 获取用户菜单权限响应
|
|
59
|
+
*/
|
|
60
|
+
interface getUserMenuPermissions {
|
|
61
|
+
rules: Array<{
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
path: string;
|
|
65
|
+
isShow: number;
|
|
66
|
+
sort: number;
|
|
67
|
+
pid: string;
|
|
68
|
+
type: string;
|
|
69
|
+
icon: string;
|
|
70
|
+
status: string;
|
|
71
|
+
platform: string;
|
|
72
|
+
background: string;
|
|
73
|
+
ruleKey: string;
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
50
76
|
}
|
|
51
77
|
/**
|
|
52
78
|
* Auth Controller 接口定义
|
|
@@ -60,5 +86,9 @@ export declare namespace PandoraAuthService {
|
|
|
60
86
|
* 获取权限树(从请求上下文获取 userId 和 roleId)
|
|
61
87
|
*/
|
|
62
88
|
getPermissionTree(): Promise<StandardResponse<Response.permissionTree>>;
|
|
89
|
+
/**
|
|
90
|
+
* 获取用户菜单权限
|
|
91
|
+
*/
|
|
92
|
+
getUserMenuPermissions(request: Request.getUserMenuPermissions): Promise<StandardResponse<Response.getUserMenuPermissions>>;
|
|
63
93
|
}
|
|
64
94
|
}
|
|
@@ -191,7 +191,7 @@ export declare namespace CouponService {
|
|
|
191
191
|
limitValue: number;
|
|
192
192
|
}>;
|
|
193
193
|
/** 优惠规则列表 */
|
|
194
|
-
|
|
194
|
+
discountRules?: Array<{
|
|
195
195
|
/** 优惠类型 */
|
|
196
196
|
type: PROMOTION_SERVICE_ENUM.COUPON_ENUM.DISCOUNT_RULE_TYPE;
|
|
197
197
|
/** 优惠值(金额:分,折扣:0-100) */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PandoraFranchiseeService as Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* PandoraFranchiseeService - Pandora Franchisee 服务模块
|
|
6
|
+
* 提供 Pandora Franchisee 相关的 API 方法
|
|
7
|
+
* 平台: pandora
|
|
8
|
+
*/
|
|
9
|
+
export declare class PandoraFranchiseeService extends BaseService implements Service.FranchiseeController {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
createFranchisee(request: Service.Request.createFranchisee): Promise<StandardResponse<Service.Response.createFranchisee>>;
|
|
12
|
+
updateFranchisee(request: Service.Request.updateFranchisee): Promise<StandardResponse<Service.Response.updateFranchisee>>;
|
|
13
|
+
listFranchisees(request: Service.Request.listFranchisees): Promise<StandardResponse<Service.Response.listFranchisees>>;
|
|
14
|
+
getFranchiseeDetail(request: Service.Request.getFranchiseeDetail): Promise<StandardResponse<Service.Response.getFranchiseeDetail>>;
|
|
15
|
+
getFranchiseeEditHistory(request: Service.Request.getFranchiseeEditHistory): Promise<StandardResponse<Service.Response.getFranchiseeEditHistory>>;
|
|
16
|
+
checkAndUpdateAccountInfo(request: Service.Request.checkAndUpdateAccountInfo): Promise<StandardResponse<Service.Response.checkAndUpdateAccountInfo>>;
|
|
17
|
+
getFranchiseeIdByUserId(request: Service.Request.getFranchiseeIdByUserId): Promise<StandardResponse<Service.Response.getFranchiseeIdByUserId>>;
|
|
18
|
+
updateStatus(request: Service.Request.updateStatus): Promise<StandardResponse<Service.Response.updateStatus>>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.PandoraFranchiseeService = void 0;
|
|
7
|
+
const BaseService_1 = __importDefault(require("../../BaseService"));
|
|
8
|
+
/**
|
|
9
|
+
* PandoraFranchiseeService - Pandora Franchisee 服务模块
|
|
10
|
+
* 提供 Pandora Franchisee 相关的 API 方法
|
|
11
|
+
* 平台: pandora
|
|
12
|
+
*/
|
|
13
|
+
class PandoraFranchiseeService extends BaseService_1.default {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.prefixUrl = '/pandora/franchisee';
|
|
17
|
+
}
|
|
18
|
+
createFranchisee(request) {
|
|
19
|
+
return this.request(this.createFranchisee, request);
|
|
20
|
+
}
|
|
21
|
+
updateFranchisee(request) {
|
|
22
|
+
return this.request(this.updateFranchisee, request);
|
|
23
|
+
}
|
|
24
|
+
listFranchisees(request) {
|
|
25
|
+
return this.request(this.listFranchisees, request);
|
|
26
|
+
}
|
|
27
|
+
getFranchiseeDetail(request) {
|
|
28
|
+
return this.request(this.getFranchiseeDetail, request);
|
|
29
|
+
}
|
|
30
|
+
getFranchiseeEditHistory(request) {
|
|
31
|
+
return this.request(this.getFranchiseeEditHistory, request);
|
|
32
|
+
}
|
|
33
|
+
checkAndUpdateAccountInfo(request) {
|
|
34
|
+
return this.request(this.checkAndUpdateAccountInfo, request);
|
|
35
|
+
}
|
|
36
|
+
getFranchiseeIdByUserId(request) {
|
|
37
|
+
return this.request(this.getFranchiseeIdByUserId, request);
|
|
38
|
+
}
|
|
39
|
+
updateStatus(request) {
|
|
40
|
+
return this.request(this.updateStatus, request);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.PandoraFranchiseeService = PandoraFranchiseeService;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { StandardResponse } from '../../../../types';
|
|
2
|
+
export declare namespace PandoraFranchiseeService {
|
|
3
|
+
namespace Request {
|
|
4
|
+
/**
|
|
5
|
+
* 创建加盟商
|
|
6
|
+
*/
|
|
7
|
+
interface createFranchisee {
|
|
8
|
+
name: string;
|
|
9
|
+
directorName: string;
|
|
10
|
+
directorPhone: string;
|
|
11
|
+
bdDirector?: string;
|
|
12
|
+
stores: string[];
|
|
13
|
+
settleCycle: string;
|
|
14
|
+
financeGroup?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 查询加盟商列表
|
|
18
|
+
*/
|
|
19
|
+
interface listFranchisees {
|
|
20
|
+
pageIndex?: number;
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
name?: string;
|
|
23
|
+
directorName?: string;
|
|
24
|
+
directorPhone?: string;
|
|
25
|
+
bdDirector?: string;
|
|
26
|
+
status?: 'VALID' | 'INVALID';
|
|
27
|
+
approvalStatus?: string;
|
|
28
|
+
financeGroup?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 查询加盟商详情
|
|
32
|
+
*/
|
|
33
|
+
interface getFranchiseeDetail {
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 查询加盟商编辑历史
|
|
38
|
+
*/
|
|
39
|
+
interface getFranchiseeEditHistory {
|
|
40
|
+
id: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 更新加盟商(基础信息)
|
|
44
|
+
*/
|
|
45
|
+
interface updateFranchisee {
|
|
46
|
+
id: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
directorName?: string;
|
|
49
|
+
directorPhone?: string;
|
|
50
|
+
bdDirector?: string;
|
|
51
|
+
stores?: string[];
|
|
52
|
+
type?: 'STORE_BIND_FRANCHISEE';
|
|
53
|
+
settleCycle?: string;
|
|
54
|
+
lastEditor: string;
|
|
55
|
+
financeGroup?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 校验并更新加盟商账户信息
|
|
59
|
+
*/
|
|
60
|
+
interface checkAndUpdateAccountInfo {
|
|
61
|
+
id: string;
|
|
62
|
+
userId: string;
|
|
63
|
+
enterpriseName?: string;
|
|
64
|
+
enterpriseType?: string;
|
|
65
|
+
legalRepresentative?: string;
|
|
66
|
+
businessLicense?: string;
|
|
67
|
+
supplementalAgreement?: string[];
|
|
68
|
+
accountName?: string;
|
|
69
|
+
accountNumber?: string;
|
|
70
|
+
bankName?: string;
|
|
71
|
+
bankBranchName?: string;
|
|
72
|
+
contactMobile?: string;
|
|
73
|
+
lastEditor?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* 根据用户ID获取加盟商ID
|
|
77
|
+
*/
|
|
78
|
+
interface getFranchiseeIdByUserId {
|
|
79
|
+
userId: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 更新加盟商状态
|
|
83
|
+
*/
|
|
84
|
+
interface updateStatus {
|
|
85
|
+
id: string;
|
|
86
|
+
status: 'VALID' | 'INVALID';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
namespace Response {
|
|
90
|
+
/**
|
|
91
|
+
* 创建加盟商响应
|
|
92
|
+
*/
|
|
93
|
+
interface createFranchisee {
|
|
94
|
+
id: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 更新加盟商响应
|
|
98
|
+
*/
|
|
99
|
+
interface updateFranchisee {
|
|
100
|
+
success: boolean;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 加盟商列表项
|
|
104
|
+
*/
|
|
105
|
+
interface franchiseeListItem {
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
directorName: string;
|
|
109
|
+
directorPhone: string;
|
|
110
|
+
bdDirector: string;
|
|
111
|
+
status: string;
|
|
112
|
+
stores: Array<{
|
|
113
|
+
storeId: string;
|
|
114
|
+
storeName: string;
|
|
115
|
+
}>;
|
|
116
|
+
settleCycle: string;
|
|
117
|
+
updatedAt: number;
|
|
118
|
+
lastEditor: string;
|
|
119
|
+
username: string;
|
|
120
|
+
approvalStatus: string;
|
|
121
|
+
financeGroup: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* 加盟商列表响应
|
|
125
|
+
*/
|
|
126
|
+
interface listFranchisees {
|
|
127
|
+
list: franchiseeListItem[];
|
|
128
|
+
total: number;
|
|
129
|
+
pageIndex: number;
|
|
130
|
+
pageSize: number;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* 加盟商详情响应
|
|
134
|
+
*/
|
|
135
|
+
interface getFranchiseeDetail {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
directorName: string;
|
|
139
|
+
directorPhone: string;
|
|
140
|
+
bdDirector: string;
|
|
141
|
+
userId: string;
|
|
142
|
+
status: string;
|
|
143
|
+
createdAt: number;
|
|
144
|
+
updatedAt: number;
|
|
145
|
+
enterpriseName: string;
|
|
146
|
+
enterpriseType: string;
|
|
147
|
+
legalRepresentative: string;
|
|
148
|
+
businessLicense: string;
|
|
149
|
+
supplementalAgreement: string[];
|
|
150
|
+
accountName: string;
|
|
151
|
+
accountNumber: string;
|
|
152
|
+
bankName: string;
|
|
153
|
+
bankBranchName: string;
|
|
154
|
+
contactMobile: string;
|
|
155
|
+
approvalStatus: string;
|
|
156
|
+
lastEditor: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* 编辑历史项
|
|
160
|
+
*/
|
|
161
|
+
interface editHistoryItem {
|
|
162
|
+
relatedType: string;
|
|
163
|
+
operator: string;
|
|
164
|
+
createdAt: number;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* 加盟商编辑历史响应
|
|
168
|
+
*/
|
|
169
|
+
interface getFranchiseeEditHistory {
|
|
170
|
+
list: editHistoryItem[];
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* 校验并更新加盟商账户信息响应
|
|
174
|
+
*/
|
|
175
|
+
interface checkAndUpdateAccountInfo {
|
|
176
|
+
success: boolean;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* 根据用户ID获取加盟商ID响应
|
|
180
|
+
*/
|
|
181
|
+
interface getFranchiseeIdByUserId {
|
|
182
|
+
id: string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* 更新加盟商状态响应
|
|
186
|
+
*/
|
|
187
|
+
interface updateStatus {
|
|
188
|
+
success: boolean;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Franchisee Controller 接口定义
|
|
193
|
+
*/
|
|
194
|
+
interface FranchiseeController {
|
|
195
|
+
createFranchisee(request: Request.createFranchisee): Promise<StandardResponse<Response.createFranchisee>>;
|
|
196
|
+
updateFranchisee(request: Request.updateFranchisee): Promise<StandardResponse<Response.updateFranchisee>>;
|
|
197
|
+
listFranchisees(request: Request.listFranchisees): Promise<StandardResponse<Response.listFranchisees>>;
|
|
198
|
+
getFranchiseeDetail(request: Request.getFranchiseeDetail): Promise<StandardResponse<Response.getFranchiseeDetail>>;
|
|
199
|
+
getFranchiseeEditHistory(request: Request.getFranchiseeEditHistory): Promise<StandardResponse<Response.getFranchiseeEditHistory>>;
|
|
200
|
+
checkAndUpdateAccountInfo(request: Request.checkAndUpdateAccountInfo): Promise<StandardResponse<Response.checkAndUpdateAccountInfo>>;
|
|
201
|
+
getFranchiseeIdByUserId(request: Request.getFranchiseeIdByUserId): Promise<StandardResponse<Response.getFranchiseeIdByUserId>>;
|
|
202
|
+
updateStatus(request: Request.updateStatus): Promise<StandardResponse<Response.updateStatus>>;
|
|
203
|
+
}
|
|
204
|
+
}
|