Skip to content

Commit

Permalink
FIX : dto sku 변수명 통일
Browse files Browse the repository at this point in the history
  • Loading branch information
saewoo1 committed Oct 25, 2024
1 parent 307f533 commit 100e180
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
public class AdminCoinAssignRequestDto {

private List<Long> userIds;
private Sku sku;
private Sku itemSku;
private Long amount;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ public void assignItem(List<Long> userIds, Sku sku) {
@Transactional
public void assignCoin(List<Long> userIds, Sku sku, Long amount) {
Item item = itemQueryService.getBySku(sku);
LocalDateTime now = LocalDateTime.now();
userCommandService.addBulkCoin(userIds, amount);
itemHistoryCommandService.createCoinAssignHistory(userIds, item.getId(), now, amount);
LocalDateTime now = null;
Long coinAmount = item.getPrice();
if (sku.equals(Sku.ADMIN_REWARD_COIN)) {
coinAmount = amount;
}
if (coinAmount > 0) {
now = LocalDateTime.now();
userCommandService.addBulkCoin(userIds, coinAmount);
}
itemHistoryCommandService.createItemHistories(userIds, item.getId(), now, coinAmount);
}

@Transactional(readOnly = true)
Expand Down

0 comments on commit 100e180

Please sign in to comment.