| | |
| | | @Service |
| | | @Transactional |
| | | public class PersonalNotificationService { |
| | | |
| | | |
| | | @Autowired |
| | | PersonalNotificationRepository personalNotificationRepository; |
| | | |
| | | |
| | | @Autowired |
| | | ConsultantService consultantService; |
| | | |
| | | |
| | | @Autowired |
| | | AppointmentService appointmentService; |
| | | |
| | | |
| | | @Autowired |
| | | CustomerService customerService; |
| | | |
| | | |
| | | @Autowired |
| | | CustomerRepository customerRepository; |
| | | |
| | | |
| | | @Autowired |
| | | SatisfactionService satisfactionService; |
| | | |
| | |
| | | personalNotificationRepository.save(entity); |
| | | } |
| | | |
| | | public void createNotFillSatisfactionSumToCustomer(Long customerId, int notFillSatisfactionSum) { |
| | | PersonalNotification entity = new PersonalNotification(); |
| | | |
| | | String content = "您有 "+notFillSatisfactionSum+" 筆顧問的滿意度需要填寫"; |
| | | entity.setContent(content); |
| | | entity.setNotificationType(NotificationTypeEnum.ACTIVITY); |
| | | entity.setOwnerId(customerId); |
| | | entity.setOwnerRole(PersonalNotificationRoleEnum.CUSTOMER); |
| | | entity.setTitle("客戶滿意度"); |
| | | personalNotificationRepository.save(entity); |
| | | } |
| | | |
| | | public void createEditConsultantToConsultant(Consultant consultant) { |
| | | PersonalNotification entity = new PersonalNotification(); |
| | | String content = "您的個人帳號設定已進行更新"; |