Commit 16a7be87 by zhangkb

修改获取用户关联机构方法

parent 4c70c783
......@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.keymobile.auth.common.security.GrantedAuthHelper;
import com.keymobile.tagmanager.exception.TagNotExistException;
import com.keymobile.tagmanager.model.Page;
import com.keymobile.tagmanager.model.SysTag;
......@@ -39,7 +40,7 @@ public class TagCtrl {
String userName = UserInfoUtils.getUserName();
String userId = UserInfoUtils.getUserId();
//获取当前登录用户所属机构
String org = UserInfoUtils.getDataRoleOrg();
String org = /**UserInfoUtils.getDataRoleOrg()*/String.valueOf(GrantedAuthHelper.getUserOrg());
tag.setCreator(userName);
tag.setTagUser(userId);
tag.setDept(org);
......@@ -73,6 +74,7 @@ public class TagCtrl {
@RequestParam(required = false) String deptIdPath) throws TagNotExistException {
//获取当前登录用户机构
deptIdPath = UserInfoUtils.getDataRoleOrg();
//考虑一个用户对应多个机构的情况
List<String> orgIds = new ArrayList<>();
orgIds.add(deptIdPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment