| | |
| | | @Transactional |
| | | public Response addUser(UserInf uinf) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | //判断是否存在普通用户(uid>100),若无,初始为101 |
| | | //判断是否存在普通用户(uid>100),若无,初始为10001 |
| | | int judgecount=mapper.judgeUname(); |
| | | if(judgecount==0){ |
| | | uinf.setUid(101); |
| | | uinf.setUid(10001); |
| | | } |
| | | String pwd= RSAUtil.encrypt("123456", RSAUtil.getPublicKey()); |
| | | uinf.setUsnid(pwd); |
| | |
| | | Subject subject = SecurityUtils.getSubject(); |
| | | subject.logout(); |
| | | } |
| | | //将用户添加至100~1000管理员 |
| | | //将用户添加至100~10000管理员 |
| | | public Response improveRole(int uid) { |
| | | //判断表是否存在 |
| | | String tableName = mapper.existTable(); |