|
@@ -1,12 +1,12 @@
|
|
|
package com.sckw.system.dubbo;
|
|
package com.sckw.system.dubbo;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.sckw.core.model.constant.Global;
|
|
import com.sckw.core.model.constant.Global;
|
|
|
import com.sckw.core.model.enums.EntTypeEnum;
|
|
import com.sckw.core.model.enums.EntTypeEnum;
|
|
|
-
|
|
|
|
|
import com.sckw.core.utils.BeanUtils;
|
|
import com.sckw.core.utils.BeanUtils;
|
|
|
import com.sckw.core.utils.CollectionUtils;
|
|
import com.sckw.core.utils.CollectionUtils;
|
|
|
import com.sckw.core.utils.FileUtils;
|
|
import com.sckw.core.utils.FileUtils;
|
|
@@ -21,7 +21,6 @@ import com.sckw.system.model.*;
|
|
|
import com.sckw.system.model.vo.res.FindAreaTreeResVo;
|
|
import com.sckw.system.model.vo.res.FindAreaTreeResVo;
|
|
|
import com.sckw.system.model.vo.res.KwsUserResVo;
|
|
import com.sckw.system.model.vo.res.KwsUserResVo;
|
|
|
import com.sckw.system.repository.KwsEntTypeRepository;
|
|
import com.sckw.system.repository.KwsEntTypeRepository;
|
|
|
-import com.sckw.system.repository.KwsEnterpriseRepository;
|
|
|
|
|
import com.sckw.system.service.KwsUserService;
|
|
import com.sckw.system.service.KwsUserService;
|
|
|
import com.sckw.system.service.SysAreaService;
|
|
import com.sckw.system.service.SysAreaService;
|
|
|
import jakarta.annotation.Resource;
|
|
import jakarta.annotation.Resource;
|
|
@@ -589,7 +588,7 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
// return userCacheResDto;
|
|
// return userCacheResDto;
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
- // Long entId = kwsDeptResDtos.get(0).getEntId();
|
|
|
|
|
|
|
+ // Long entId = kwsDeptResDtos.get(0).getEntId();
|
|
|
KwsEnterpriseResDto kwsEnterpriseResDto = remoteBaseService.queryEnterpriseById(kwsUser.getEntId());
|
|
KwsEnterpriseResDto kwsEnterpriseResDto = remoteBaseService.queryEnterpriseById(kwsUser.getEntId());
|
|
|
if (Objects.isNull(kwsEnterpriseResDto)) {
|
|
if (Objects.isNull(kwsEnterpriseResDto)) {
|
|
|
return userCacheResDto;
|
|
return userCacheResDto;
|
|
@@ -607,6 +606,15 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
return JSONObject.parseObject(dictCache, UserCacheResDto.class);
|
|
return JSONObject.parseObject(dictCache, UserCacheResDto.class);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public UserResDto queryUserById(Long userId) {
|
|
|
|
|
+ KwsUser kwsUser = kwsUserService.selectByKey(userId);
|
|
|
|
|
+ if (Objects.nonNull(kwsUser)) {
|
|
|
|
|
+ return BeanUtil.toBean(kwsUser, UserResDto.class);
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public List<UserCacheResDto> queryUserCacheByIds(List<Long> userIds) {
|
|
public List<UserCacheResDto> queryUserCacheByIds(List<Long> userIds) {
|
|
|
if (CollectionUtils.isEmpty(userIds)) {
|
|
if (CollectionUtils.isEmpty(userIds)) {
|
|
@@ -929,7 +937,7 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
@Override
|
|
@Override
|
|
|
public KwsRoleDto queryByRoleIdAndEntId(Long currentRoleId) {
|
|
public KwsRoleDto queryByRoleIdAndEntId(Long currentRoleId) {
|
|
|
KwsRole kwsRole = kwsRoleDao.selectByKey(currentRoleId);
|
|
KwsRole kwsRole = kwsRoleDao.selectByKey(currentRoleId);
|
|
|
- if (Objects.isNull(kwsRole)){
|
|
|
|
|
|
|
+ if (Objects.isNull(kwsRole)) {
|
|
|
return new KwsRoleDto();
|
|
return new KwsRoleDto();
|
|
|
}
|
|
}
|
|
|
KwsRoleDto kwsRoleDto = new KwsRoleDto();
|
|
KwsRoleDto kwsRoleDto = new KwsRoleDto();
|
|
@@ -943,7 +951,7 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
|
|
|
@Override
|
|
@Override
|
|
|
public List<EntTypeResDto> queryEntTypeByIds(Set<Long> entIds) {
|
|
public List<EntTypeResDto> queryEntTypeByIds(Set<Long> entIds) {
|
|
|
List<KwsEntType> kwsEnterprises = kwsEntTypeRepository.queryByEntIds(entIds);
|
|
List<KwsEntType> kwsEnterprises = kwsEntTypeRepository.queryByEntIds(entIds);
|
|
|
- if (org.apache.commons.collections4.CollectionUtils.isEmpty(kwsEnterprises)){
|
|
|
|
|
|
|
+ if (org.apache.commons.collections4.CollectionUtils.isEmpty(kwsEnterprises)) {
|
|
|
return List.of();
|
|
return List.of();
|
|
|
}
|
|
}
|
|
|
return kwsEnterprises.stream()
|
|
return kwsEnterprises.stream()
|