@yolo-croket-dev/amqp-access 0.7.363 → 0.7.365
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/payment-service/dto/ad-center-settle/command/update-ad-center-coupon-rates.dto.d.ts +5 -2
- package/payment-service/dto/ad-center-settle/command/update-ad-center-coupon-rates.dto.js +4 -2
- package/payment-service/services/amqp.ad-center-settle.service.d.ts +1 -1
- package/payment-service/services/amqp.ad-center-settle.service.js +1 -1
- package/user-service/services/amqp.signup-certification.service.d.ts +14 -0
- package/user-service/services/amqp.signup-certification.service.js +38 -0
package/package.json
CHANGED
|
@@ -2,10 +2,11 @@ import { EditAdCenterSettleBizMemoManageUserInfo } from './edit-ad-center-settle
|
|
|
2
2
|
export declare const MAX_AD_CENTER_COUPON_RATE_UPDATES = 100;
|
|
3
3
|
/**
|
|
4
4
|
* @author 홍준
|
|
5
|
-
* @description
|
|
5
|
+
* @description purchasedInfo.publicId 목록의 판매자 부담 할인율 변경 계약
|
|
6
6
|
* @process 전체 할인율을 유지하고 입력한 두 부담 할인율을 저장하고 판매자 부담금을 재계산한다.
|
|
7
7
|
*/
|
|
8
8
|
export declare class UpdateAdCenterCouponRatesPayload {
|
|
9
|
+
/** 주문의 purchasedInfo.publicId. 광고센터 정산 publicId나 MongoDB _id가 아니다. */
|
|
9
10
|
publicIds: string[];
|
|
10
11
|
/** 전체 할인율 중 판매자가 부담하는 할인율. 전체 할인율 10, 판매자 3이면 할인금액의 30%를 부담한다. */
|
|
11
12
|
sellerRate: number;
|
|
@@ -16,6 +17,7 @@ export declare class UpdateAdCenterCouponRatesPayload {
|
|
|
16
17
|
}
|
|
17
18
|
/** @author 홍준 @description 주문과 광고센터 정산의 변경 전후 정보 @process 검증·재계산 결과를 반환한다. */
|
|
18
19
|
export declare class UpdateAdCenterCouponRatesItemResult {
|
|
20
|
+
/** 조회에 사용한 purchasedInfo.publicId */
|
|
19
21
|
publicId: string;
|
|
20
22
|
pInfoId: string;
|
|
21
23
|
allRate: number;
|
|
@@ -23,7 +25,8 @@ export declare class UpdateAdCenterCouponRatesItemResult {
|
|
|
23
25
|
sellerRate: number;
|
|
24
26
|
croketRate: number;
|
|
25
27
|
previousExpectedAmount: number;
|
|
26
|
-
|
|
28
|
+
/** 연결된 광고센터 쿠폰 정산이 없으면 null */
|
|
29
|
+
previousSettleAmount: number | null;
|
|
27
30
|
expectedAmount: number;
|
|
28
31
|
}
|
|
29
32
|
/** @author 홍준 @description 일괄 분담율 변경 결과 @process 미리보기 또는 전체 반영 결과를 반환한다. */
|
|
@@ -16,7 +16,7 @@ const edit_ad_center_settle_biz_memo_dto_1 = require("./edit-ad-center-settle-bi
|
|
|
16
16
|
exports.MAX_AD_CENTER_COUPON_RATE_UPDATES = 100;
|
|
17
17
|
/**
|
|
18
18
|
* @author 홍준
|
|
19
|
-
* @description
|
|
19
|
+
* @description purchasedInfo.publicId 목록의 판매자 부담 할인율 변경 계약
|
|
20
20
|
* @process 전체 할인율을 유지하고 입력한 두 부담 할인율을 저장하고 판매자 부담금을 재계산한다.
|
|
21
21
|
*/
|
|
22
22
|
class UpdateAdCenterCouponRatesPayload {
|
|
@@ -28,7 +28,9 @@ __decorate([
|
|
|
28
28
|
(0, class_validator_1.ArrayMaxSize)(exports.MAX_AD_CENTER_COUPON_RATE_UPDATES),
|
|
29
29
|
(0, class_validator_1.ArrayUnique)(),
|
|
30
30
|
(0, class_validator_1.IsString)({ each: true }),
|
|
31
|
-
(0, class_validator_1.Matches)(
|
|
31
|
+
(0, class_validator_1.Matches)(/^\S+$/, { each: true })
|
|
32
|
+
/** 주문의 purchasedInfo.publicId. 광고센터 정산 publicId나 MongoDB _id가 아니다. */
|
|
33
|
+
,
|
|
32
34
|
__metadata("design:type", Array)
|
|
33
35
|
], UpdateAdCenterCouponRatesPayload.prototype, "publicIds", void 0);
|
|
34
36
|
__decorate([
|
|
@@ -6,7 +6,7 @@ export declare class AmqpAdCenterSettleService {
|
|
|
6
6
|
private readonly client;
|
|
7
7
|
private readonly amqpManager;
|
|
8
8
|
constructor(client: ClientProxy);
|
|
9
|
-
/** @author 홍준 @description publicId 목록의 쿠폰 분담율을 변경한다. @process 결제 서비스의 일괄 변경 RPC를 호출한다. */
|
|
9
|
+
/** @author 홍준 @description purchasedInfo.publicId 목록의 쿠폰 분담율을 변경한다. @process 결제 서비스의 일괄 변경 RPC를 호출한다. */
|
|
10
10
|
updateAdCenterCouponRates(payload: UpdateAdCenterCouponRatesPayload, param: AbstractParam): Promise<UpdateAdCenterCouponRatesResult>;
|
|
11
11
|
createAdCenterSettles(payload: CreateAdCenterSettlePayload, param: AbstractParam): Promise<CreateAdCenterSettleResult>;
|
|
12
12
|
editAdCenterSettle(payload: EditAdCenterSettlePayload, param: AbstractParam): Promise<void>;
|
|
@@ -21,7 +21,7 @@ let AmqpAdCenterSettleService = class AmqpAdCenterSettleService {
|
|
|
21
21
|
this.client = client;
|
|
22
22
|
this.amqpManager = new functions_1.AmqpManagement(this.client);
|
|
23
23
|
}
|
|
24
|
-
/** @author 홍준 @description publicId 목록의 쿠폰 분담율을 변경한다. @process 결제 서비스의 일괄 변경 RPC를 호출한다. */
|
|
24
|
+
/** @author 홍준 @description purchasedInfo.publicId 목록의 쿠폰 분담율을 변경한다. @process 결제 서비스의 일괄 변경 RPC를 호출한다. */
|
|
25
25
|
async updateAdCenterCouponRates(payload, param) {
|
|
26
26
|
return this.amqpManager.call('광고센터 쿠폰 분담율 일괄 변경', 'ad-center-settle.update.coupon-rates', payload, param, { isErrorThrowing: true });
|
|
27
27
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ClientProxy } from '@nestjs/microservices';
|
|
2
|
+
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
+
import { ClaimSignupCertificationPayload, ClaimSignupCertificationResult } from '../dto/signup-certification';
|
|
4
|
+
/**
|
|
5
|
+
* @author 홍준
|
|
6
|
+
* @description 가입 전 본인인증 귀속 AMQP client
|
|
7
|
+
* @process 가입 완료 후 로그인된 사용자에게 일회성 인증 결과를 연결한다.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AmqpSignupCertificationService {
|
|
10
|
+
private readonly client;
|
|
11
|
+
private readonly amqpManager;
|
|
12
|
+
constructor(client: ClientProxy);
|
|
13
|
+
claim(payload: ClaimSignupCertificationPayload, param: AbstractParam): Promise<ClaimSignupCertificationResult>;
|
|
14
|
+
}
|
|
@@ -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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AmqpSignupCertificationService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
18
|
+
const functions_1 = require("@yolo-croket-dev/core/functions");
|
|
19
|
+
/**
|
|
20
|
+
* @author 홍준
|
|
21
|
+
* @description 가입 전 본인인증 귀속 AMQP client
|
|
22
|
+
* @process 가입 완료 후 로그인된 사용자에게 일회성 인증 결과를 연결한다.
|
|
23
|
+
*/
|
|
24
|
+
let AmqpSignupCertificationService = class AmqpSignupCertificationService {
|
|
25
|
+
constructor(client) {
|
|
26
|
+
this.client = client;
|
|
27
|
+
this.amqpManager = new functions_1.AmqpManagement(this.client);
|
|
28
|
+
}
|
|
29
|
+
async claim(payload, param) {
|
|
30
|
+
return this.amqpManager.call('가입 전 본인인증 사용자 귀속', 'signup-certification.claim', payload, param, { isErrorThrowing: true });
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.AmqpSignupCertificationService = AmqpSignupCertificationService;
|
|
34
|
+
exports.AmqpSignupCertificationService = AmqpSignupCertificationService = __decorate([
|
|
35
|
+
(0, common_1.Injectable)(),
|
|
36
|
+
__param(0, (0, common_1.Inject)('USER_SERVICE_PROVIDER')),
|
|
37
|
+
__metadata("design:paramtypes", [microservices_1.ClientProxy])
|
|
38
|
+
], AmqpSignupCertificationService);
|