|
@@ -1,32 +1,22 @@
|
|
|
package com.rtrh.projects.web.controller;
|
|
|
|
|
|
-import java.io.PrintWriter;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
-import com.rtrh.projects.modules.rolemeun.dao.SecUserAuthDao;
|
|
|
-import com.rtrh.projects.modules.rolemeun.mapper.SecUserAuthMapper;
|
|
|
-import com.rtrh.projects.modules.rolemeun.po.SecUserAuth;
|
|
|
+import com.rtrh.projects.modules.projects.service.SecUserAuthService;
|
|
|
+import com.team.security.TeamShiroUser;
|
|
|
import org.apache.log4j.LogManager;
|
|
|
import org.apache.log4j.Logger;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.apache.shiro.session.Session;
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
|
|
-import com.team.security.TeamShiroUser;
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.io.PrintWriter;
|
|
|
+import java.util.List;
|
|
|
|
|
|
public abstract class BaseController {
|
|
|
@Resource
|
|
|
- private SecUserAuthDao userAuthDao;
|
|
|
-
|
|
|
- @Resource
|
|
|
- private SecUserAuthMapper userAuthMapper;
|
|
|
+ private SecUserAuthService secUserAuthService;
|
|
|
|
|
|
|
|
|
* 当前用户的session
|
|
@@ -58,13 +48,7 @@ public abstract class BaseController {
|
|
|
|
|
|
public List<String> getSubjectIds() {
|
|
|
TeamShiroUser principal = (TeamShiroUser)SecurityUtils.getSubject().getPrincipal();
|
|
|
- if ("1".equals(principal.getStatusSubject())){
|
|
|
-
|
|
|
-
|
|
|
- return userAuthMapper.findSubjectAuthIdsByUserId(principal.getId());
|
|
|
- }else {
|
|
|
- return new ArrayList<>();
|
|
|
- }
|
|
|
+ return "1".equals(principal.getStatusSubject()) ? secUserAuthService.findSubjectAuthIdsByUserId(principal.getId()) : null;
|
|
|
}
|
|
|
|
|
|
@ModelAttribute
|