Skip to content

Commit

Permalink
Merge pull request #91 from Arios67/feat/#89
Browse files Browse the repository at this point in the history
금액 변경 수정
  • Loading branch information
Arios67 committed Mar 30, 2022
2 parents 8ca8c58 + d044e23 commit 89870b4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ars/src/apis/payment/payment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,24 @@ export class PaymentServie {
art: soldoutArt,
});

// 유저 누적 포인트 업데이트
const updated = await queryRunner.manager.save(User, {
...bidder,
point: bidder.point - price,
});

// 히스토리 테이블(낙찰자) 저장
await queryRunner.manager.save(History, {
point: price,
balance: bidder.point,
user: bidder,
balance: updated.point,
user: updated,
payment: payment,
});

// 유저 누적 포인트 업데이트
await queryRunner.manager.save(User, {
...bidder,
point: -price,
});

// 작가 누적 포인트 업데이트
await queryRunner.manager.save(User, {
...artist,
point: +price,
point: artist.point + price,
});

await queryRunner.commitTransaction();
Expand Down

0 comments on commit 89870b4

Please sign in to comment.