|
@@ -626,8 +626,13 @@ public class RoleManageAction implements IMINAction {
|
|
|
public MINActionResult roleQueryByBranchId(@MINParam(key = "branchId") String branchId, MINSession session)
|
|
|
throws MINBusinessException {
|
|
|
MINActionResult res = new MINActionResult();
|
|
|
- ImRoleExample s = new ImRoleExample();
|
|
|
- List<ImRole> ls = Service.lookup(IMINDataBaseService.class).selectByExample(ImRoleMapper.class, s);
|
|
|
+ ImRoleExample example = new ImRoleExample();
|
|
|
+ ImRoleExample.Criteria criteria = example.createCriteria();
|
|
|
+ User user = session.getUser();
|
|
|
+ if(!user.getBranchId().equals(Constant.DEFAULT_INSTITUTIONS)){
|
|
|
+ criteria.andBranchidEqualTo(user.getBranchId());
|
|
|
+ }
|
|
|
+ List<ImRole> ls = Service.lookup(IMINDataBaseService.class).selectByExample(ImRoleMapper.class, example);
|
|
|
res.set(IMINBusinessConstant.F_QUERY_RESULT, ls);
|
|
|
return res;
|
|
|
}
|
|
@@ -635,7 +640,6 @@ public class RoleManageAction implements IMINAction {
|
|
|
/**
|
|
|
* 查询角色菜单已经设置的权限
|
|
|
*
|
|
|
- * @param id
|
|
|
* @param session
|
|
|
* @return
|
|
|
* @throws MINBusinessException
|
|
@@ -844,9 +848,14 @@ public class RoleManageAction implements IMINAction {
|
|
|
@MINAction(value = "roleQueryBranch")
|
|
|
public MINActionResult roleQueryBranch(MINSession session) throws MINBusinessException {
|
|
|
MINActionResult res = new MINActionResult();
|
|
|
- ImBranchExample s = new ImBranchExample();
|
|
|
- s.createCriteria().andSttNotEqualTo(Constant.DEPT_STT_DEL);// 非删除状态的部门
|
|
|
- List<ImBranch> ls = Service.lookup(IMINDataBaseService.class).selectByExample(ImBranchMapper.class, s);
|
|
|
+ ImBranchExample example = new ImBranchExample();
|
|
|
+ ImBranchExample.Criteria criteria = example.createCriteria();
|
|
|
+ User user = session.getUser();
|
|
|
+ criteria.andSttNotEqualTo(Constant.DEPT_STT_DEL);
|
|
|
+ if(!user.getBranchId().equals(Constant.DEFAULT_INSTITUTIONS)){
|
|
|
+ criteria.andIdEqualTo(user.getBranchId());
|
|
|
+ }
|
|
|
+ List<ImBranch> ls = Service.lookup(IMINDataBaseService.class).selectByExample(ImBranchMapper.class, example);
|
|
|
res.set(IMINBusinessConstant.F_QUERY_RESULT, ls);
|
|
|
return res;
|
|
|
}
|