医院废弃物信息化管理平台
“mitao”
2026-04-21 2f18b3a28054c3917010f95ba84f7425280a2622
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package cn.besteam.modules.system.biz;
 
import cn.besteam.modules.system.entity.SysRole;
import cn.besteam.modules.system.entity.SysUser;
import cn.besteam.modules.system.entity.SysUserRole;
import cn.besteam.modules.system.service.ISysRoleService;
import cn.besteam.modules.system.service.ISysUserRoleService;
import cn.besteam.modules.system.service.ISysUserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
 
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
 
 
 
@RunWith(SpringRunner.class)
@SpringBootTest
public class SysPermissionBizTest {
 
    @Autowired
    private SysPermissionBiz sysPermissionBiz;
 
    @Autowired
    private ISysUserService sysUserService;
 
    @Autowired
    private ISysRoleService sysRoleService;
 
    @Autowired
    private ISysUserRoleService sysUserRoleService;
 
    @Autowired
 
 
    @Test
    public void queryRolePermission() throws Exception {
 
        sysPermissionBiz.queryRolePermission("8");
    }
 
    /**
     * 配置超级管理员
     *
     * @throws Exception
     */
    @Test
    public void add() throws Exception {
 
//        //先写固定值
//        SysUser sysUser = sysUserService.getById(2);
//        List<SysRole> sysRoleList = sysRoleService.list();
//        Set<SysUserRole> sysUserRoleList = sysRoleList.stream().map(sysRole -> {
//            SysUserRole sysUserRole = new SysUserRole();
//            sysUserRole.setUserId(2);
//            sysUserRole.setRoleId(sysRole.getId());
//            return sysUserRole;
//        }).collect(Collectors.toSet());
//        sysUserRoleService.saveBatch(sysUserRoleList);
 
    }
}