Skip to content

Commit

Permalink
[chore] coffeeBean 소수점 3자리까지 잘라서 저장 #130
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeesw committed May 17, 2024
1 parent d98b026 commit 069c50b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public Review saveReview(ReviewDto dto) {
double newCoffeeBean = oldCoffeeBean + (dto.getRating() - standard) * randomRatio;
double newCoffeeBeanDouble = Double.parseDouble(String.format("%.3f", newCoffeeBean)); // 소수점 3자리까지

receiver.setCoffeeBean(newCoffeeBean);
receiver.setCoffeeBean(newCoffeeBeanDouble);
userRepository.save(receiver);

Review review = new Review();
Expand Down

0 comments on commit 069c50b

Please sign in to comment.