刘光辉
15 小时以前 34981c30a78e8bbd7791131059a9210f9928b62c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package jnpf.limsService.impl;
 
import jnpf.base.service.SuperServiceImpl;
import jnpf.limsEntity.BaogaoShenheJibie;
import jnpf.limsEntity.LimsBaogaoShouquanEntity;
import jnpf.limsMapper.LimsBaogaoShouquanMapper;
import jnpf.limsService.LimsBaogaoShouquanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
@Service
public class LimsBaogaoShouquanServiceImpl
        extends SuperServiceImpl<LimsBaogaoShouquanMapper, LimsBaogaoShouquanEntity>
        implements LimsBaogaoShouquanService {
 
    @Autowired
    private LimsBaogaoShouquanMapper limsBaogaoShouquanMapper;
 
    @Override
    public boolean hasAuthority(String userId, BaogaoShenheJibie jibie, String bizType) {
        if (userId == null || userId.isEmpty()
                || jibie == null
                || bizType == null || bizType.isEmpty()) {
            return false;
        }
        return limsBaogaoShouquanMapper.countAuthority(userId, jibie.getCode(), bizType) > 0;
    }
}