Skip to content

Commit

Permalink
feat: 게시글 생성 알림 보내기 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
minsu20 committed Dec 10, 2023
1 parent bb65125 commit 6d68870
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void sendNewUploadAlarm(BaseServiceResponse baseServiceResponse, Board bo
Optional<List<MemberIdAndToken>> memberIdAndTokensByPush = teamMemberGetService.getNewUploadPushInfo(team.getTeamId(), member.getMemberId());
Optional<List<MemberIdAndToken>> memberIdAndTokensBySave = teamMemberGetService.getNewUploadSaveInfo(team.getTeamId(), member.getMemberId());
// 알림 보내기
eventPublisher.publishEvent(new MultiFcmEvent(title, body, memberIdAndTokensByPush, createIdInfo(team.getTeamId(), board.getBoardId()), team.getName(), AlarmType.NEW_UPLOAD, PagePath.NOTICE_PATH.getValue()));
eventPublisher.publishEvent(new MultiFcmEvent(title, body, memberIdAndTokensByPush, memberIdAndTokensBySave, createIdInfo(team.getTeamId(), board.getBoardId()), team.getName(), AlarmType.NEW_UPLOAD, PagePath.NOTICE_PATH.getValue()));
}
}

Expand Down
86 changes: 43 additions & 43 deletions src/main/java/com/moing/backend/global/utils/StartupRunner.java
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
package com.moing.backend.global.utils;

import com.moing.backend.domain.member.domain.constant.Gender;
import com.moing.backend.domain.member.domain.constant.RegistrationStatus;
import com.moing.backend.domain.member.domain.constant.Role;
import com.moing.backend.domain.member.domain.constant.SocialProvider;
import com.moing.backend.domain.member.domain.entity.Member;
import com.moing.backend.domain.member.domain.service.MemberSaveService;
import com.moing.backend.global.annotation.Util;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import java.time.LocalDate;

@Util
@RequiredArgsConstructor
public class StartupRunner implements CommandLineRunner {

/**
* 테스트용 insert
*/

private final MemberSaveService memberSaveService;
@Override
public void run(String... args) throws Exception {
Member test01 = new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester1", "undef", SocialProvider.KAKAO, RegistrationStatus.COMPLETED, Role.USER, "KAKAO@tester01");
memberSaveService.saveMember(test01);

Member test02=new Member(LocalDate.now(), "[email protected]", "undef", Gender.MAN, null, "modagbul_tester2", null, SocialProvider.KAKAO, RegistrationStatus.COMPLETED, Role.USER, "KAKAO@tester02");
memberSaveService.saveMember(test02);

Member test03=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester3", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester03");
memberSaveService.saveMember(test03);

Member test04=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester4", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester04");
memberSaveService.saveMember(test04);

Member test05=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester5", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester05");
memberSaveService.saveMember(test05);
}
}
//package com.moing.backend.global.utils;
//
//import com.moing.backend.domain.member.domain.constant.Gender;
//import com.moing.backend.domain.member.domain.constant.RegistrationStatus;
//import com.moing.backend.domain.member.domain.constant.Role;
//import com.moing.backend.domain.member.domain.constant.SocialProvider;
//import com.moing.backend.domain.member.domain.entity.Member;
//import com.moing.backend.domain.member.domain.service.MemberSaveService;
//import com.moing.backend.global.annotation.Util;
//import lombok.RequiredArgsConstructor;
//import org.springframework.boot.CommandLineRunner;
//import org.springframework.stereotype.Component;
//
//import java.time.LocalDate;
//
//@Util
//@RequiredArgsConstructor
//public class StartupRunner implements CommandLineRunner {
//
// /**
// * 테스트용 insert
// */
//
// private final MemberSaveService memberSaveService;
// @Override
// public void run(String... args) throws Exception {
// Member test01 = new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester1", "undef", SocialProvider.KAKAO, RegistrationStatus.COMPLETED, Role.USER, "KAKAO@tester01");
// memberSaveService.saveMember(test01);
//
// Member test02=new Member(LocalDate.now(), "[email protected]", "undef", Gender.MAN, null, "modagbul_tester2", null, SocialProvider.KAKAO, RegistrationStatus.COMPLETED, Role.USER, "KAKAO@tester02");
// memberSaveService.saveMember(test02);
//
// Member test03=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester3", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester03");
// memberSaveService.saveMember(test03);
//
// Member test04=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester4", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester04");
// memberSaveService.saveMember(test04);
//
// Member test05=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester5", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester05");
// memberSaveService.saveMember(test05);
//
// }
//}

0 comments on commit 6d68870

Please sign in to comment.