| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import doumeemes.config.shiro.ShiroToken; |
| | | import doumeemes.core.constants.ResponseStatus; |
| | | import doumeemes.core.exception.BusinessException; |
| | | import doumeemes.core.model.LoginUserInfo; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | |
| | | @Override |
| | | public Department findOne(Department Department) { |
| | | Wrapper<Department> wrapper = new QueryWrapper<>(Department); |
| | | return departmentExtMapper.selectOne(wrapper); |
| | | QueryWrapper<Department> wrapper = new QueryWrapper<>(Department); |
| | | return departmentExtMapper.selectOne(wrapper.last("limit 1")); |
| | | } |
| | | |
| | | @Override |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起!只能切换到公司级部门!"); |
| | | } |
| | | user.setCurComDepartment(d); |
| | | //更新会话数据信息 |
| | | SecurityUtils.getSubject().login(new ShiroToken(user,1)); |
| | | } |
| | | } |
| | | |