Skip to content

Commit

Permalink
[#109] comment: 로그 확인용 코드 (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
sae2say authored Jan 21, 2025
1 parent f528f00 commit f5788b0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public class InterestController {
public ResponseEntity<SuccessResponse<Void>> postInterest(
@PathVariable("productId") Long productId,
@CurrentMember final Long storeId) {

log.info("productId: {}, currentUserId: {}", productId, storeId);

interestService.postInterest(productId, storeId);
interestProductFacade.incrementInterestCount(productId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import com.napzak.global.common.exception.NapzakException;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Service
@Slf4j
@RequiredArgsConstructor
public class InterestService {

Expand All @@ -20,6 +22,8 @@ public class InterestService {

public void postInterest(Long productId, Long storeId) {

log.info("now in interestServce. productId : {}, storeId : {}");

if (interestRetriever.getIsInterested(productId, storeId)) {//이미 좋아요가 눌러져 있음
throw new NapzakException(InterestErrorCode.INTEREST_ALREADY_POSTED);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package com.napzak.domain.interest.core.entity;

import jakarta.persistence.*;
import static com.napzak.domain.interest.core.entity.InterestTableConstants.*;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import static com.napzak.domain.interest.core.entity.InterestTableConstants.*;

@Table(name = TABLE_INTEREST)
@Entity
@Getter
Expand Down

0 comments on commit f5788b0

Please sign in to comment.