保誠-保戶業務員媒合平台
wayne
2022-01-22 602c6a536fa1448e3f9f2d4c89b27f7aa0503295
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.pollex.pam.service;
 
import java.util.List;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import com.pollex.pam.domain.PersonalNotification;
import com.pollex.pam.enums.PersonalNotificationRoleEnum;
import com.pollex.pam.repository.PersonalNotificationRepository;
 
@Service
@Transactional
public class PersonalNotificationService {
    
    @Autowired
    PersonalNotificationRepository personalNotificationRepository;
 
    public List<PersonalNotification> getMyPersonalNotification(Long ownerId, PersonalNotificationRoleEnum role) {
        return personalNotificationRepository.findAllByOwnerRoleAndOwnerId(role, ownerId);
    }
 
}