Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX]1차 스프린트 클라QA요청 사항 반영 #95

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class SeedCreateRequestDto {
@Size(max = 300)
private String memo;

@NotBlank
@Size(max = 20)
private String source;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class SeedUpdateRequestDto {
@Size(max = 300)
private String memo;

@NotBlank
@Size(max = 20)
private String source;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import java.time.Clock;
import java.util.List;
import java.util.stream.Collectors;

import com.example.growthookserver.common.exception.BadRequestException;
import com.example.growthookserver.common.response.ErrorStatus;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down Expand Up @@ -125,10 +128,12 @@ public SeedAlarmGetResponseDto getSeedAlarm(Long memberId) {
@Transactional
public void unlockSeed(Long seedId) {
Seed seed = seedRepository.findSeedByIdOrThrow(seedId);
seed.unlockSeed();
Member member = memberRepository.findMemberByIdOrThrow(seed.getMemberId());

Long memberId = seed.getMemberId();
Member member = memberRepository.findMemberByIdOrThrow(memberId);
if(member.getGatheredSsuk()==0)
throw new BadRequestException(ErrorStatus.USER_GATHEREDSSUK_ZERO.getMessage());

seed.unlockSeed();
member.useSsuck();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public enum ErrorStatus {
INVALID_MEMBER("유효하지 않은 유저입니다."),
ANOTHER_ACCESS_TOKEN("지원하지 않는 소셜 플랫폼입니다."),
ALREADY_COMPLETE_ACTIONPLAN("이미 완료된 액션 플랜입니다."),
USER_GATHEREDSSUK_ZERO("해당 유저의 쑥이 0개입니다."),

/**
* 401 UNAUTHORIZED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class SlackService {
String slackToken;

public void sendSlackMessage(String userName, Long totalMember, String channel) {
String message = userName +"님은 " + totalMember.toString() + "번째 쑥쑥이에어 곰이 됐어요.";
String message = userName +"님은 " + totalMember.toString() + "번째 쑥쑥이에서 곰이 됐어요.";
try {
MethodsClient methods = Slack.getInstance().methods(slackToken);

Expand Down
Loading