Skip to content

Commit

Permalink
fix: Answer Service notifying code
Browse files Browse the repository at this point in the history
  • Loading branch information
comolove committed Oct 30, 2023
1 parent 5e3fe9b commit 6cf940a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ CREATE TABLE employer.to_employee(
employer_id int8 not null,
employee_id int8 not null,
primary key(employer_id,employee_id)
)
);

create table post.comment(
id serial primary key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private void saveNotification(Long userId, EmployerProfile senderProfile) {
.senderId(senderProfile.getEmployerId())
.senderName(senderProfile.getCompanyName())
.senderImagePath(senderProfile.getImagePath())
.senderRank("EMPLOYER")
.notificationType(NEW_EMPLOYER)
.build()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,15 @@ private void sendNotificationToQuestionAuthor(Long questionId, Answer createdAns
notificationRepository.save(
Notification.builder()
.receiverId(profileRepository.findAuthorId(QUESTION, questionId))
.postTypeToShow(null)
.postTypeToShow(QUESTION)
.postIdToShow(questionId)
.senderId(createdAnswer.getAuthorId())
.senderName(createdAnswer.getAuthorName())
.senderImagePath(createdAnswer.getAuthorImagePath())
.senderRank(createdAnswer.getRank())
.senderPostType(null)
.senderPostType(ANSWER)
.senderPostId(createdAnswer.getId())
.notificationType(NEW_ANSWER)
.created(LocalDateTime.now())
.build()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import Funssion.Inforum.domain.member.repository.MemberRepository;
import Funssion.Inforum.domain.member.service.AuthService;
import Funssion.Inforum.domain.notification.repository.NotificationRepository;
import Funssion.Inforum.domain.professionalprofile.dto.request.CreateProfessionalProfileDto;
import Funssion.Inforum.domain.professionalprofile.dto.request.SaveProfessionalProfileDto;
import Funssion.Inforum.domain.professionalprofile.repository.ProfessionalProfileRepository;
import com.jayway.jsonpath.JsonPath;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -53,7 +53,7 @@ public class EmployerIntegrationTestV2 {
SaveMemberResponseDto saveEmployeeDto;
SaveMemberResponseDto saveEmployerDto;

CreateProfessionalProfileDto createdProfessionalProfileDto = CreateProfessionalProfileDto.builder()
SaveProfessionalProfileDto createdProfessionalProfileDto = SaveProfessionalProfileDto.builder()
.introduce("hi")
.techStack("{\"java\": 5}")
.description("java gosu")
Expand Down

0 comments on commit 6cf940a

Please sign in to comment.