@yolo-croket-dev/amqp-access 0.4.29-slowquery.0 → 0.4.29-slowquery.2
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/package.json +1 -1
- package/store-item-server/dto/store-item-price-fluctuation/command/index.d.ts +2 -0
- package/store-item-server/dto/store-item-price-fluctuation/command/index.js +2 -0
- package/store-item-server/dto/store-item-price-fluctuation/command/store-item-price-fluctuation-notification-trigger-create-bulk.dto.d.ts +18 -0
- package/store-item-server/dto/store-item-price-fluctuation/command/store-item-price-fluctuation-notification-trigger-create-bulk.dto.js +50 -0
- package/store-item-server/dto/store-item-price-fluctuation/command/store-item-price-fluctuation-notification-trigger-update-bulk.dto.d.ts +12 -0
- package/store-item-server/dto/store-item-price-fluctuation/command/store-item-price-fluctuation-notification-trigger-update-bulk.dto.js +38 -0
- package/store-item-server/dto/store-item-price-fluctuation/query/get-store-item-price-fluctuation-notification-triggers.dto.d.ts +13 -0
- package/store-item-server/dto/store-item-price-fluctuation/query/get-store-item-price-fluctuation-notification-triggers.dto.js +31 -0
- package/store-item-server/dto/store-item-price-fluctuation/query/index.d.ts +1 -0
- package/store-item-server/dto/store-item-price-fluctuation/query/index.js +1 -0
- package/store-item-server/services/amqp.store-item-price-fluctuation.service.d.ts +5 -1
- package/store-item-server/services/amqp.store-item-price-fluctuation.service.js +10 -1
package/package.json
CHANGED
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./store-item-price-fluctuation-update-bulk.dto"), exports);
|
|
18
|
+
__exportStar(require("./store-item-price-fluctuation-notification-trigger-create-bulk.dto"), exports);
|
|
19
|
+
__exportStar(require("./store-item-price-fluctuation-notification-trigger-update-bulk.dto"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class StoreItemPriceFluctuationNotificationTriggerCreate {
|
|
2
|
+
/** 상품 아이디 */
|
|
3
|
+
storeItemId: string;
|
|
4
|
+
/** 기준 가격 (쿠폰가가 있다면 쿠폰가, 없다면 상품가격) */
|
|
5
|
+
calculatedItemPrice?: number;
|
|
6
|
+
/** 상품 가격 */
|
|
7
|
+
itemPriceForBuyer: number;
|
|
8
|
+
/** 기준 가격 */
|
|
9
|
+
basePrice: number;
|
|
10
|
+
/** 기준 가격 변동폭 */
|
|
11
|
+
basePriceFluctuation: number;
|
|
12
|
+
/** 트리거 타입 */
|
|
13
|
+
triggerType: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class StoreItemPriceFluctuationNotificationTriggerCreateBulkPayload {
|
|
16
|
+
/** 알림 트리거 업데이트 목록 */
|
|
17
|
+
triggerItems: StoreItemPriceFluctuationNotificationTriggerCreate[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StoreItemPriceFluctuationNotificationTriggerCreateBulkPayload = exports.StoreItemPriceFluctuationNotificationTriggerCreate = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
class StoreItemPriceFluctuationNotificationTriggerCreate {
|
|
16
|
+
}
|
|
17
|
+
exports.StoreItemPriceFluctuationNotificationTriggerCreate = StoreItemPriceFluctuationNotificationTriggerCreate;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsMongoId)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], StoreItemPriceFluctuationNotificationTriggerCreate.prototype, "storeItemId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
(0, class_validator_1.IsNumber)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], StoreItemPriceFluctuationNotificationTriggerCreate.prototype, "calculatedItemPrice", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsNumber)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], StoreItemPriceFluctuationNotificationTriggerCreate.prototype, "itemPriceForBuyer", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsNumber)(),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], StoreItemPriceFluctuationNotificationTriggerCreate.prototype, "basePrice", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsNumber)(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], StoreItemPriceFluctuationNotificationTriggerCreate.prototype, "basePriceFluctuation", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], StoreItemPriceFluctuationNotificationTriggerCreate.prototype, "triggerType", void 0);
|
|
43
|
+
class StoreItemPriceFluctuationNotificationTriggerCreateBulkPayload {
|
|
44
|
+
}
|
|
45
|
+
exports.StoreItemPriceFluctuationNotificationTriggerCreateBulkPayload = StoreItemPriceFluctuationNotificationTriggerCreateBulkPayload;
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
48
|
+
(0, class_transformer_1.Type)(() => StoreItemPriceFluctuationNotificationTriggerCreate),
|
|
49
|
+
__metadata("design:type", Array)
|
|
50
|
+
], StoreItemPriceFluctuationNotificationTriggerCreateBulkPayload.prototype, "triggerItems", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class StoreItemPriceFluctuationNotificationTriggerUpdate {
|
|
2
|
+
/** 상품 변동 가격 알림 트리거 아이디 */
|
|
3
|
+
storeItemPriceFluctuationNotificationTriggerId: string;
|
|
4
|
+
/** 해당 트리거로 영향받은 유저수 */
|
|
5
|
+
triggerUsersCount?: number;
|
|
6
|
+
/** 트리거 조건 만족 여부 (가격이 발송시와 동일한 상태에 있는지에 대한 여부) */
|
|
7
|
+
isTriggerConditionMatch: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class StoreItemPriceFluctuationNotificationTriggerUpdateBulkPayload {
|
|
10
|
+
/** 알림 트리거 업데이트 목록 */
|
|
11
|
+
triggerItems: StoreItemPriceFluctuationNotificationTriggerUpdate[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StoreItemPriceFluctuationNotificationTriggerUpdateBulkPayload = exports.StoreItemPriceFluctuationNotificationTriggerUpdate = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
class StoreItemPriceFluctuationNotificationTriggerUpdate {
|
|
16
|
+
}
|
|
17
|
+
exports.StoreItemPriceFluctuationNotificationTriggerUpdate = StoreItemPriceFluctuationNotificationTriggerUpdate;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsMongoId)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], StoreItemPriceFluctuationNotificationTriggerUpdate.prototype, "storeItemPriceFluctuationNotificationTriggerId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
(0, class_validator_1.IsNumber)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], StoreItemPriceFluctuationNotificationTriggerUpdate.prototype, "triggerUsersCount", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsBoolean)(),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], StoreItemPriceFluctuationNotificationTriggerUpdate.prototype, "isTriggerConditionMatch", void 0);
|
|
31
|
+
class StoreItemPriceFluctuationNotificationTriggerUpdateBulkPayload {
|
|
32
|
+
}
|
|
33
|
+
exports.StoreItemPriceFluctuationNotificationTriggerUpdateBulkPayload = StoreItemPriceFluctuationNotificationTriggerUpdateBulkPayload;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
36
|
+
(0, class_transformer_1.Type)(() => StoreItemPriceFluctuationNotificationTriggerUpdate),
|
|
37
|
+
__metadata("design:type", Array)
|
|
38
|
+
], StoreItemPriceFluctuationNotificationTriggerUpdateBulkPayload.prototype, "triggerItems", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoreItemPriceFluctuationNotificationTrigger } from '@yolo-croket-dev/entity-v2/store-item-price-fluctuation-log';
|
|
2
|
+
/** 상품 변동가 알림 트리거 목록 가져오기 */
|
|
3
|
+
export declare class GetStoreItemPriceFluctuationNotificationTriggersPayload {
|
|
4
|
+
/** 이전 페이지중 마지막 아이디 (StoreItemPriceFluctuationNotificationTriggerId) */
|
|
5
|
+
lastId?: string;
|
|
6
|
+
/** 가져올 개수 */
|
|
7
|
+
limit: number;
|
|
8
|
+
/** 트리거 완료 여부 필터 (true면 완료된것만, false면 완료되지 않은 것만), undefined라면 전부 */
|
|
9
|
+
isTriggerCompleted?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface GetStoreItemPriceFluctuationNotificationTriggersResult {
|
|
12
|
+
storeItemPriceFluctuationNotificationTriggers: StoreItemPriceFluctuationNotificationTrigger[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GetStoreItemPriceFluctuationNotificationTriggersPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/** 상품 변동가 알림 트리거 목록 가져오기 */
|
|
15
|
+
class GetStoreItemPriceFluctuationNotificationTriggersPayload {
|
|
16
|
+
}
|
|
17
|
+
exports.GetStoreItemPriceFluctuationNotificationTriggersPayload = GetStoreItemPriceFluctuationNotificationTriggersPayload;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsOptional)(),
|
|
20
|
+
(0, class_validator_1.IsMongoId)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], GetStoreItemPriceFluctuationNotificationTriggersPayload.prototype, "lastId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsNumber)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], GetStoreItemPriceFluctuationNotificationTriggersPayload.prototype, "limit", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_validator_1.IsBoolean)(),
|
|
30
|
+
__metadata("design:type", Boolean)
|
|
31
|
+
], GetStoreItemPriceFluctuationNotificationTriggersPayload.prototype, "isTriggerCompleted", void 0);
|
|
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./get-compare-per-day-store-item-price-fluctuation.dto"), exports);
|
|
18
|
+
__exportStar(require("./get-store-item-price-fluctuation-notification-triggers.dto"), exports);
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { ClientProxy } from '@nestjs/microservices';
|
|
2
2
|
import { AbstractParam } from '@yolo-croket-dev/core/interfaces';
|
|
3
|
-
import { GetStoreItemPriceFluctuationCompareBetweenTimesPayload, GetStoreItemPriceFluctuationCompareBetweenTimesResult } from '../dto/store-item-price-fluctuation/query';
|
|
3
|
+
import { GetStoreItemPriceFluctuationCompareBetweenTimesPayload, GetStoreItemPriceFluctuationCompareBetweenTimesResult, GetStoreItemPriceFluctuationNotificationTriggersPayload, GetStoreItemPriceFluctuationNotificationTriggersResult } from '../dto/store-item-price-fluctuation/query';
|
|
4
|
+
import { StoreItemPriceFluctuationNotificationTriggerCreateBulkPayload, StoreItemPriceFluctuationNotificationTriggerUpdateBulkPayload } from '../dto/store-item-price-fluctuation/command';
|
|
4
5
|
export declare class AmqpStoreItemPriceFluctuationService {
|
|
5
6
|
private readonly client;
|
|
6
7
|
private readonly amqpManager;
|
|
7
8
|
constructor(client: ClientProxy);
|
|
8
9
|
getStoreItemPriceFluctuationCompareBetweenTimes(payload: GetStoreItemPriceFluctuationCompareBetweenTimesPayload, param: AbstractParam): Promise<GetStoreItemPriceFluctuationCompareBetweenTimesResult>;
|
|
10
|
+
createStoreItemPriceFluctuationNotificationTriggerBulk(payload: StoreItemPriceFluctuationNotificationTriggerCreateBulkPayload, param: AbstractParam): Promise<boolean>;
|
|
11
|
+
updateStoreItemPriceFluctuationNotificationTriggerBulk(payload: StoreItemPriceFluctuationNotificationTriggerUpdateBulkPayload, param: AbstractParam): Promise<boolean>;
|
|
12
|
+
getStoreItemPriceFluctuationNotificationTriggers(payload: GetStoreItemPriceFluctuationNotificationTriggersPayload, param: AbstractParam): Promise<GetStoreItemPriceFluctuationNotificationTriggersResult>;
|
|
9
13
|
}
|
|
@@ -19,7 +19,16 @@ let AmqpStoreItemPriceFluctuationService = class AmqpStoreItemPriceFluctuationSe
|
|
|
19
19
|
this.amqpManager = new functions_1.AmqpManagement(this.client);
|
|
20
20
|
}
|
|
21
21
|
async getStoreItemPriceFluctuationCompareBetweenTimes(payload, param) {
|
|
22
|
-
return this.amqpManager.call('스토어 상품 가격 변동 비교', 'store-item-price-fluctuation.get
|
|
22
|
+
return this.amqpManager.call('스토어 상품 가격 변동 비교', 'store-item-price-fluctuation.get.compare-between-times', payload, param, { isErrorThrowing: true });
|
|
23
|
+
}
|
|
24
|
+
async createStoreItemPriceFluctuationNotificationTriggerBulk(payload, param) {
|
|
25
|
+
return this.amqpManager.call('스토어 상품 가격 변동 알림 트리거 일괄 생성', 'store-item-price-fluctuation.create.notification-trigger.bulk', payload, param, { isErrorThrowing: true });
|
|
26
|
+
}
|
|
27
|
+
async updateStoreItemPriceFluctuationNotificationTriggerBulk(payload, param) {
|
|
28
|
+
return this.amqpManager.call('스토어 상품 가격 변동 알림 트리거 일괄 수정', 'store-item-price-fluctuation.update.notification-trigger.bulk', payload, param, { isErrorThrowing: true });
|
|
29
|
+
}
|
|
30
|
+
async getStoreItemPriceFluctuationNotificationTriggers(payload, param) {
|
|
31
|
+
return this.amqpManager.call('스토어 상품 가격 변동 알림 트리거 목록', 'store-item-price-fluctuation.get.notification-triggers', payload, param, { isErrorThrowing: true });
|
|
23
32
|
}
|
|
24
33
|
};
|
|
25
34
|
exports.AmqpStoreItemPriceFluctuationService = AmqpStoreItemPriceFluctuationService;
|