|
|
@@ -6,11 +6,13 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.hz.pm.api.common.helper.UserInfoHelper; |
|
|
|
import com.hz.pm.api.common.model.constant.BizConst; |
|
|
|
import com.hz.pm.api.common.model.constant.MhUnitConst; |
|
|
|
import com.hz.pm.api.common.util.StrUtils; |
|
|
|
import com.hz.pm.api.sys.mapper.RoleMapper; |
|
|
|
import com.hz.pm.api.sys.model.entity.Role; |
|
|
|
import com.hz.pm.api.sys.model.entity.UserRole; |
|
|
|
import com.hz.pm.api.sys.service.IUserRoleService; |
|
|
|
import com.hz.pm.api.user.helper.MhUnitCache; |
|
|
|
import com.hz.pm.api.user.model.entity.UserInfo; |
|
|
|
import com.hz.pm.api.user.model.enumeration.RoleEnum; |
|
|
|
import com.hz.pm.api.user.model.enumeration.UserAvailableEnum; |
|
|
@@ -38,6 +40,7 @@ public class UserInfoHelperImpl implements UserInfoHelper { |
|
|
|
private final IUserInfoService userInfoService; |
|
|
|
private final IUserRoleService iUserRoleService; |
|
|
|
private final RoleMapper roleMapper; |
|
|
|
private final MhUnitCache mhUnitCache; |
|
|
|
|
|
|
|
@Override |
|
|
|
public UserFullInfoDTO getUserFullInfoByMhUserIdOrOpenId(String mhUserId) { |
|
|
@@ -73,7 +76,8 @@ public class UserInfoHelperImpl implements UserInfoHelper { |
|
|
|
.collect(Collectors.toList()); |
|
|
|
userFullInfo.setUserRoleList(roleMapper.selectBatchIds(roleIdList)); |
|
|
|
} |
|
|
|
|
|
|
|
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.COUNTY_PARENT_UNIT_ID); |
|
|
|
userFullInfo.setIsCountyUser(viewUnitIds.contains(userInfo.getMhUnitId())); |
|
|
|
// 装配返回 |
|
|
|
userFullInfo.setUserId(userInfo.getId()); |
|
|
|
userFullInfo.setMhUserId(userInfo.getMhUserId()); |
|
|
|