Helius
2021-06-16 5728be2af515b2200e782aa201ca5d4d67d9ea47
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.ibeetl.admin.core.service;
 
import java.util.List;
 
import com.ibeetl.admin.core.entity.CoreUserRole;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import com.ibeetl.admin.core.dao.CoreRoleDao;
import com.ibeetl.admin.core.entity.CoreRole;
 
/**
 * 描述: 字典 service,包含常规字典和级联字典的操作。
 * @author : xiandafu
 */
@Service
@Transactional
public class CoreRoleService extends CoreBaseService<CoreRole> {
 
    private static final Logger LOGGER = LoggerFactory.getLogger(CoreRoleService.class);
 
    @Autowired
    private CoreRoleDao roleDao;
    
    
    public List<CoreRole> getAllRoles(String type){
        CoreRole template = new CoreRole();
        template.setType(type);
        return roleDao.template(template);
    }
 
    public CoreUserRole getRoleByUserId(Long userId, Long orgId){
        return roleDao.getRoleByUserId(userId,orgId);
    }
 
 
    
    
  
}