|
|
@ -13,7 +13,6 @@ import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoVo; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; |
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgVo; |
|
|
|
import com.yxt.anrui.portal.api.sysstaffpost.SysStaffPostDetailsVo; |
|
|
|
import com.yxt.anrui.portal.api.sysstaffpost.SysStaffPostVo; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.*; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.app.AppUserOrgInfoVo; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.wx.WxHomePageVo; |
|
|
@ -24,7 +23,6 @@ import com.yxt.anrui.portal.biz.sysrole.SysRoleService; |
|
|
|
import com.yxt.anrui.portal.biz.sysstaffinfo.SysStaffinfoService; |
|
|
|
import com.yxt.anrui.portal.biz.sysstafforg.SysStaffOrgService; |
|
|
|
import com.yxt.anrui.portal.biz.sysstaffpost.SysStaffPostService; |
|
|
|
import com.yxt.anrui.portal.biz.sysuserrole.SysUserRoleService; |
|
|
|
import com.yxt.anrui.portal.config.DictCommonType; |
|
|
|
import com.yxt.anrui.portal.utils.MsgWs; |
|
|
|
import com.yxt.common.base.config.RedisUtil; |
|
|
@ -35,7 +33,6 @@ import com.yxt.common.base.utils.*; |
|
|
|
import com.yxt.common.core.query.PagerQuery; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import com.yxt.common.core.vo.PagerVo; |
|
|
|
import org.apache.commons.collections.map.HashedMap; |
|
|
|
import org.apache.ibatis.annotations.Param; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -99,6 +96,8 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ImageUploadUtil imageUploadUtil; |
|
|
|
@Autowired |
|
|
|
private SysRoleService sysRoleService; |
|
|
|
|
|
|
|
|
|
|
|
public PagerVo<SysUser> listPage(PagerQuery<SysUserQuery> pq) { |
|
|
@ -884,4 +883,22 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> { |
|
|
|
ResultBean<Object> objectResultBean = ResultBean.fireSuccess().setData(r); |
|
|
|
return objectResultBean; |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<List<SysUserVo>> getUserByRole(UserQuery query) { |
|
|
|
ResultBean<List<SysUserVo>> rb = ResultBean.fireFail(); |
|
|
|
List<SysUserVo> sysUserVoList = new ArrayList<>(); |
|
|
|
//根据角色sid获取角色的层级
|
|
|
|
String levelTypeKey = sysRoleService.getLevelType(query.getRoleSid()); |
|
|
|
if (StringUtils.isNotBlank(levelTypeKey)) { |
|
|
|
String orgSidPath = query.getOrgSidPath(); |
|
|
|
if(query.getOrgSidPath().split("/").length>=Integer.parseInt(levelTypeKey)-1){ |
|
|
|
String levelOrgSid = query.getOrgSidPath().split("/")[Integer.parseInt(levelTypeKey) - 1]; |
|
|
|
sysUserVoList = baseMapper.getUserByRole(query.getRoleSid(), levelOrgSid); |
|
|
|
sysUserVoList.removeAll(Collections.singleton(null)); |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.success().setData(sysUserVoList); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |