|  | @@ -2,12 +2,15 @@ package com.ruoyi.sim.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import com.ruoyi.common.core.domain.entity.SysRole;
 | 
	
		
			
				|  |  |  import com.ruoyi.common.core.domain.entity.SysUser;
 | 
	
		
			
				|  |  | +import com.ruoyi.common.utils.PageUtils;
 | 
	
		
			
				|  |  | +import com.ruoyi.sim.constant.Consts;
 | 
	
		
			
				|  |  |  import com.ruoyi.sim.domain.AddOnDept;
 | 
	
		
			
				|  |  |  import com.ruoyi.sim.domain.Major;
 | 
	
		
			
				|  |  |  import com.ruoyi.sim.domain.Student;
 | 
	
		
			
				|  |  |  import com.ruoyi.system.mapper.*;
 | 
	
		
			
				|  |  |  import com.ruoyi.system.service.ISysConfigService;
 | 
	
		
			
				|  |  |  import com.ruoyi.system.service.ISysDeptService;
 | 
	
		
			
				|  |  | +import com.ruoyi.system.service.ISysUserService;
 | 
	
		
			
				|  |  |  import org.slf4j.Logger;
 | 
	
		
			
				|  |  |  import org.slf4j.LoggerFactory;
 | 
	
		
			
				|  |  |  import org.springframework.beans.BeanUtils;
 | 
	
	
		
			
				|  | @@ -22,7 +25,7 @@ import java.util.Objects;
 | 
	
		
			
				|  |  |  @Service
 | 
	
		
			
				|  |  |  public class StudentService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    private static final Logger log = LoggerFactory.getLogger(StudentService.class);
 | 
	
		
			
				|  |  | +    private static final Logger l = LoggerFactory.getLogger(StudentService.class);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private SysUserMapper userMapper;
 | 
	
	
		
			
				|  | @@ -31,21 +34,6 @@ public class StudentService {
 | 
	
		
			
				|  |  |      private SysRoleMapper roleMapper;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | -    private SysPostMapper postMapper;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private SysUserRoleMapper userRoleMapper;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private SysUserPostMapper userPostMapper;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private ISysConfigService configService;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private ISysDeptService deptService;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  |      private AddOnDeptService addOnDeptService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
	
		
			
				|  | @@ -54,6 +42,9 @@ public class StudentService {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      protected Validator validator;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private ISysUserService sysUserService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      // @DataScope(deptAlias = "d", userAlias = "u")
 | 
	
		
			
				|  |  |      public List<Student> selectStudentList() {
 | 
	
		
			
				|  |  |          SysUser su = new SysUser();
 | 
	
	
		
			
				|  | @@ -79,6 +70,55 @@ public class StudentService {
 | 
	
		
			
				|  |  |          return list2;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    public void letTry(int code) {
 | 
	
		
			
				|  |  | +        List<SysUser> list = null;
 | 
	
		
			
				|  |  | +        switch (code) {
 | 
	
		
			
				|  |  | +            case 1: {
 | 
	
		
			
				|  |  | +                SysUser su = new SysUser();
 | 
	
		
			
				|  |  | +                list = userMapper.selectUserList(su);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +            case 2: {
 | 
	
		
			
				|  |  | +                PageUtils.startPage();
 | 
	
		
			
				|  |  | +                SysUser su = new SysUser();
 | 
	
		
			
				|  |  | +                list = userMapper.selectUserList(su);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +            case 3: {
 | 
	
		
			
				|  |  | +                list = sysUserService.selectUserList(new SysUser());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +            case 4: {
 | 
	
		
			
				|  |  | +                PageUtils.startPage();
 | 
	
		
			
				|  |  | +                list = sysUserService.selectUserList(new SysUser());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +            case 5: {
 | 
	
		
			
				|  |  | +                list = sysUserService.selectAllocatedList(new SysUser());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +            case 6: {
 | 
	
		
			
				|  |  | +                PageUtils.startPage();
 | 
	
		
			
				|  |  | +                SysUser su = new SysUser();
 | 
	
		
			
				|  |  | +                su.setRoleId(Consts.ROLE_ID_STUDENT);
 | 
	
		
			
				|  |  | +                list = sysUserService.selectAllocatedList(su);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +            case 7: {
 | 
	
		
			
				|  |  | +                list = sysUserService.selectUnallocatedList(new SysUser());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +            case 8: {
 | 
	
		
			
				|  |  | +                PageUtils.startPage();
 | 
	
		
			
				|  |  | +                list = sysUserService.selectUnallocatedList(new SysUser());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        for (SysUser o : list) {
 | 
	
		
			
				|  |  | +            l.info(o.toString());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      public Student selectStudentByUserId(Long userId) {
 | 
	
		
			
				|  |  |          SysUser sysUser = userMapper.selectUserById(userId);
 |