@be-link/ecommerce-promotion-service-node-sdk 0.1.33 → 0.1.34
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/modules/job/service.d.ts +2 -0
- package/modules/job/service.js +14 -0
- package/modules/job/types.d.ts +30 -2
- package/package.json +1 -1
package/modules/job/service.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ declare class JobService extends BaseService implements Service.JobController {
|
|
|
5
5
|
expireCouponTemplateTask(): Promise<void>;
|
|
6
6
|
cleanupCouponCacheTask(): Promise<void>;
|
|
7
7
|
syncLiveRoomLotteryWhiteList(): Promise<void>;
|
|
8
|
+
getMissingRewards(params: Service.Request.GetMissingRewards): Promise<Service.Response.GetMissingRewards>;
|
|
9
|
+
processReplayRoomMissingRewards(): Promise<void>;
|
|
8
10
|
}
|
|
9
11
|
export declare const jobService: JobService;
|
|
10
12
|
export default jobService;
|
package/modules/job/service.js
CHANGED
|
@@ -27,6 +27,12 @@ let JobService = class JobService extends BaseService_1.default {
|
|
|
27
27
|
syncLiveRoomLotteryWhiteList() {
|
|
28
28
|
return (0, http_1.callApi)(this.getApiUrl(this.syncLiveRoomLotteryWhiteList));
|
|
29
29
|
}
|
|
30
|
+
getMissingRewards(params) {
|
|
31
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getMissingRewards), params);
|
|
32
|
+
}
|
|
33
|
+
processReplayRoomMissingRewards() {
|
|
34
|
+
return (0, http_1.callApi)(this.getApiUrl(this.processReplayRoomMissingRewards));
|
|
35
|
+
}
|
|
30
36
|
};
|
|
31
37
|
__decorate([
|
|
32
38
|
(0, tsoa_1.OperationId)('过期券模版清理任务'),
|
|
@@ -40,6 +46,14 @@ __decorate([
|
|
|
40
46
|
(0, tsoa_1.OperationId)('开播直播间同步抽奖白名单'),
|
|
41
47
|
(0, tsoa_1.Post)('sync-live-room-lottery-white-list')
|
|
42
48
|
], JobService.prototype, "syncLiveRoomLotteryWhiteList", null);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, tsoa_1.OperationId)('计算指定直播间中,所有观看任务的「应发未发」奖励(补发清单)'),
|
|
51
|
+
(0, tsoa_1.Post)('get-missing-rewards')
|
|
52
|
+
], JobService.prototype, "getMissingRewards", null);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, tsoa_1.OperationId)('处理回放直播间的缺失奖励计算任务'),
|
|
55
|
+
(0, tsoa_1.Post)('process-replay-room-missing-rewards')
|
|
56
|
+
], JobService.prototype, "processReplayRoomMissingRewards", null);
|
|
43
57
|
JobService = __decorate([
|
|
44
58
|
(0, tsoa_1.Route)('job'),
|
|
45
59
|
(0, tsoa_1.Tags)('Job')
|
package/modules/job/types.d.ts
CHANGED
|
@@ -13,9 +13,33 @@ export declare namespace Service {
|
|
|
13
13
|
AwardId: number;
|
|
14
14
|
AwardItemCount: number;
|
|
15
15
|
}
|
|
16
|
+
/** 缺失奖励信息 */
|
|
17
|
+
interface MissingReward {
|
|
18
|
+
userId: string;
|
|
19
|
+
cumulativeViewDuration: number;
|
|
20
|
+
taskName: string;
|
|
21
|
+
taskContent: string;
|
|
22
|
+
couponId: string;
|
|
23
|
+
rewardType: string;
|
|
24
|
+
rewardContent: string;
|
|
25
|
+
rewardId: string;
|
|
26
|
+
missingQuantity: number;
|
|
27
|
+
expectedQuantity: number;
|
|
28
|
+
taskStartTime: number;
|
|
29
|
+
taskEndTime: number;
|
|
30
|
+
enterTime: number;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
namespace Request {
|
|
34
|
+
/** 获取缺失奖励请求 */
|
|
35
|
+
interface GetMissingRewards {
|
|
36
|
+
liveRoomId: string;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
namespace Response {
|
|
40
|
+
/** 获取缺失奖励响应 */
|
|
41
|
+
type GetMissingRewards = void;
|
|
16
42
|
}
|
|
17
|
-
namespace Request { }
|
|
18
|
-
namespace Response { }
|
|
19
43
|
interface JobController {
|
|
20
44
|
/** 过期券模版清理任务 */
|
|
21
45
|
expireCouponTemplateTask(): Promise<void>;
|
|
@@ -23,5 +47,9 @@ export declare namespace Service {
|
|
|
23
47
|
cleanupCouponCacheTask(): Promise<void>;
|
|
24
48
|
/** 开播直播间同步抽奖白名单 */
|
|
25
49
|
syncLiveRoomLotteryWhiteList(): Promise<void>;
|
|
50
|
+
/** 计算指定直播间中,所有观看任务的「应发未发」奖励(补发清单) */
|
|
51
|
+
getMissingRewards(params: Request.GetMissingRewards): Promise<Response.GetMissingRewards>;
|
|
52
|
+
/** 处理回放直播间的缺失奖励计算任务 */
|
|
53
|
+
processReplayRoomMissingRewards(): Promise<void>;
|
|
26
54
|
}
|
|
27
55
|
}
|