diff --git a/kernel-d-db/db-api/src/main/java/cn/stylefeng/roses/kernel/db/api/constants/DbFieldConstants.java b/kernel-d-db/db-api/src/main/java/cn/stylefeng/roses/kernel/db/api/constants/DbFieldConstants.java index 055bd7e46..a3b8c16bc 100644 --- a/kernel-d-db/db-api/src/main/java/cn/stylefeng/roses/kernel/db/api/constants/DbFieldConstants.java +++ b/kernel-d-db/db-api/src/main/java/cn/stylefeng/roses/kernel/db/api/constants/DbFieldConstants.java @@ -38,4 +38,10 @@ public interface DbFieldConstants { */ String DEL_FLAG = "delFlag"; + /** + * 数据状态的字段 + * 状态:1-启用,2-禁用 + */ + String STATUS_FLAG = "statusFlag"; + } diff --git a/kernel-d-db/db-sdk-mp/src/main/java/cn/stylefeng/roses/kernel/db/mp/fieldfill/CustomMetaObjectHandler.java b/kernel-d-db/db-sdk-mp/src/main/java/cn/stylefeng/roses/kernel/db/mp/fieldfill/CustomMetaObjectHandler.java index 059e9e36f..9951339c1 100644 --- a/kernel-d-db/db-sdk-mp/src/main/java/cn/stylefeng/roses/kernel/db/mp/fieldfill/CustomMetaObjectHandler.java +++ b/kernel-d-db/db-sdk-mp/src/main/java/cn/stylefeng/roses/kernel/db/mp/fieldfill/CustomMetaObjectHandler.java @@ -1,6 +1,7 @@ package cn.stylefeng.roses.kernel.db.mp.fieldfill; import cn.stylefeng.roses.kernel.auth.api.context.LoginContext; +import cn.stylefeng.roses.kernel.rule.enums.StatusEnum; import cn.stylefeng.roses.kernel.rule.enums.YesOrNotEnum; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import lombok.extern.slf4j.Slf4j; @@ -31,9 +32,11 @@ public class CustomMetaObjectHandler implements MetaObjectHandler { // 设置createTime(BaseEntity) setFieldValByName(CREATE_TIME, new Date(), metaObject); - // 设置删除标记,默认N,未删除 + // 设置删除标记 默认N-删除 setFieldValByName(DEL_FLAG, YesOrNotEnum.N.getCode(), metaObject); + // 设置状态字段 默认1-启用 + setFieldValByName(STATUS_FLAG, StatusEnum.ENABLE.getCode(), metaObject); } catch (ReflectionException e) { log.warn("CustomMetaObjectHandler处理过程中无相关字段,不做处理"); diff --git a/kernel-d-ds-container/ds-container-business/src/main/java/cn/stylefeng/roses/kernel/dsctn/modular/service/impl/DatabaseInfoServiceImpl.java b/kernel-d-ds-container/ds-container-business/src/main/java/cn/stylefeng/roses/kernel/dsctn/modular/service/impl/DatabaseInfoServiceImpl.java index e0999366f..b58622a79 100644 --- a/kernel-d-ds-container/ds-container-business/src/main/java/cn/stylefeng/roses/kernel/dsctn/modular/service/impl/DatabaseInfoServiceImpl.java +++ b/kernel-d-ds-container/ds-container-business/src/main/java/cn/stylefeng/roses/kernel/dsctn/modular/service/impl/DatabaseInfoServiceImpl.java @@ -150,8 +150,7 @@ public class DatabaseInfoServiceImpl extends ServiceImpl7.0.1 + + + + cn.stylefeng.roses + system-api + 7.0.1 + + + + + + cn.stylefeng.roses + wrapper-api + 7.0.1 + + diff --git a/kernel-d-timer/timer-business/src/main/java/cn/stylefeng/roses/kernel/timer/modular/controller/SysTimersController.java b/kernel-d-timer/timer-business/src/main/java/cn/stylefeng/roses/kernel/timer/modular/controller/SysTimersController.java index 243c02a1c..da20ee943 100644 --- a/kernel-d-timer/timer-business/src/main/java/cn/stylefeng/roses/kernel/timer/modular/controller/SysTimersController.java +++ b/kernel-d-timer/timer-business/src/main/java/cn/stylefeng/roses/kernel/timer/modular/controller/SysTimersController.java @@ -7,6 +7,8 @@ import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource; import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource; import cn.stylefeng.roses.kernel.timer.modular.param.SysTimersParam; import cn.stylefeng.roses.kernel.timer.modular.service.SysTimersService; +import cn.stylefeng.roses.kernel.timer.modular.wrapper.TimerWrapper; +import cn.stylefeng.roses.kernel.wrapper.api.annotation.Wrapper; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -105,6 +107,7 @@ public class SysTimersController { * @date 2020/6/30 18:26 */ @GetResource(name = "分页查询定时任务", path = "/sysTimers/page") + @Wrapper(TimerWrapper.class) public ResponseData page(SysTimersParam sysTimersParam) { return new SuccessResponseData(sysTimersService.findPage(sysTimersParam)); } diff --git a/kernel-d-timer/timer-business/src/main/java/cn/stylefeng/roses/kernel/timer/modular/wrapper/TimerWrapper.java b/kernel-d-timer/timer-business/src/main/java/cn/stylefeng/roses/kernel/timer/modular/wrapper/TimerWrapper.java new file mode 100644 index 000000000..d59163190 --- /dev/null +++ b/kernel-d-timer/timer-business/src/main/java/cn/stylefeng/roses/kernel/timer/modular/wrapper/TimerWrapper.java @@ -0,0 +1,43 @@ +package cn.stylefeng.roses.kernel.timer.modular.wrapper; + +import cn.hutool.extra.spring.SpringUtil; +import cn.stylefeng.roses.kernel.system.api.UserServiceApi; +import cn.stylefeng.roses.kernel.system.api.pojo.user.SysUserDTO; +import cn.stylefeng.roses.kernel.timer.modular.entity.SysTimers; +import cn.stylefeng.roses.kernel.wrapper.api.BaseWrapper; + +import java.util.HashMap; +import java.util.Map; + +/** + * 定时任务查询结果包装 + * + * @author fengshuonan + * @date 2021/3/1 23:45 + */ +public class TimerWrapper implements BaseWrapper { + + @Override + public Map doWrap(SysTimers beWrappedModel) { + + HashMap resultMap = new HashMap<>(); + UserServiceApi userServiceApi = SpringUtil.getBean(UserServiceApi.class); + + if (beWrappedModel.getCreateUser() != null) { + SysUserDTO sysUserDTO = userServiceApi.getUserInfoByUserId(beWrappedModel.getCreateUser()); + if (sysUserDTO != null) { + resultMap.put("createUserName", sysUserDTO.getRealName()); + } + } + + if (beWrappedModel.getUpdateUser() != null) { + SysUserDTO sysUserDTO = userServiceApi.getUserInfoByUserId(beWrappedModel.getUpdateUser()); + if (sysUserDTO != null) { + resultMap.put("updateUserName", sysUserDTO.getRealName()); + } + } + + return resultMap; + } + +} diff --git a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/UserOrgServiceApi.java b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/UserOrgServiceApi.java index fa97794e6..52c9703a4 100644 --- a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/UserOrgServiceApi.java +++ b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/UserOrgServiceApi.java @@ -25,6 +25,6 @@ public interface UserOrgServiceApi { * @author fengshuonan * @date 2020/12/19 22:33 */ - SysUserOrgDTO getUserOrgInfo(Long userId); + SysUserOrgDTO getUserOrgByUserId(Long userId); } diff --git a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/exception/enums/user/SysUserDataScopeExceptionEnum.java b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/exception/enums/user/SysUserDataScopeExceptionEnum.java new file mode 100644 index 000000000..dc065a3bd --- /dev/null +++ b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/exception/enums/user/SysUserDataScopeExceptionEnum.java @@ -0,0 +1,33 @@ +package cn.stylefeng.roses.kernel.system.api.exception.enums.user; + + +import cn.stylefeng.roses.kernel.rule.constants.RuleConstants; +import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum; +import cn.stylefeng.roses.kernel.system.api.constants.SystemConstants; +import lombok.Getter; + +@Getter +public enum SysUserDataScopeExceptionEnum implements AbstractExceptionEnum { + + /** + * 用户不存在 + */ + USER_DATA_SCOPE_NOT_EXIST(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + SystemConstants.SYSTEM_EXCEPTION_STEP_CODE + "91", "{} 用户数据范围不存在"); + + + /** + * 错误编码 + */ + private final String errorCode; + + /** + * 提示用户信息 + */ + private final String userTip; + + SysUserDataScopeExceptionEnum(String errorCode, String userTip) { + this.errorCode = errorCode; + this.userTip = userTip; + } + +} diff --git a/kernel-s-system/system-business-login-log/pom.xml b/kernel-s-system/system-business-login-log/pom.xml index 84b58e011..ab0e59cb1 100644 --- a/kernel-s-system/system-business-login-log/pom.xml +++ b/kernel-s-system/system-business-login-log/pom.xml @@ -40,6 +40,22 @@ 7.0.1 + + + + cn.stylefeng.roses + system-api + 7.0.1 + + + + + + cn.stylefeng.roses + wrapper-api + 7.0.1 + + diff --git a/kernel-s-system/system-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/controller/SysLoginLogController.java b/kernel-s-system/system-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/controller/SysLoginLogController.java index 0b0e26be0..1f8c13ae0 100644 --- a/kernel-s-system/system-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/controller/SysLoginLogController.java +++ b/kernel-s-system/system-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/controller/SysLoginLogController.java @@ -6,6 +6,8 @@ import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource; import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource; import cn.stylefeng.roses.kernel.system.api.pojo.loginlog.SysLoginLogRequest; import cn.stylefeng.roses.kernel.system.modular.loginlog.service.SysLoginLogService; +import cn.stylefeng.roses.kernel.system.modular.loginlog.wrapper.SysLoginLogWrapper; +import cn.stylefeng.roses.kernel.wrapper.api.annotation.Wrapper; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RestController; @@ -54,6 +56,7 @@ public class SysLoginLogController { * @date 2021/1/13 17:51 */ @GetResource(name = "分页查询登录日志", path = "/loginLog/page") + @Wrapper(SysLoginLogWrapper.class) public ResponseData page(SysLoginLogRequest sysLoginLogRequest) { return new SuccessResponseData(sysLoginLogService.findPage(sysLoginLogRequest)); } diff --git a/kernel-s-system/system-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/wrapper/SysLoginLogWrapper.java b/kernel-s-system/system-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/wrapper/SysLoginLogWrapper.java new file mode 100644 index 000000000..5fb77392e --- /dev/null +++ b/kernel-s-system/system-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/wrapper/SysLoginLogWrapper.java @@ -0,0 +1,34 @@ +package cn.stylefeng.roses.kernel.system.modular.loginlog.wrapper; + +import cn.hutool.extra.spring.SpringUtil; +import cn.stylefeng.roses.kernel.system.api.UserServiceApi; +import cn.stylefeng.roses.kernel.system.api.pojo.user.SysUserDTO; +import cn.stylefeng.roses.kernel.system.modular.loginlog.entity.SysLoginLog; +import cn.stylefeng.roses.kernel.wrapper.api.BaseWrapper; + +import java.util.HashMap; +import java.util.Map; + +/** + * 日志结果进行包装 + * + * @author fengshuonan + * @date 2021/2/28 10:59 + */ +public class SysLoginLogWrapper implements BaseWrapper { + + @Override + public Map doWrap(SysLoginLog sysLoginLog) { + + if (sysLoginLog.getUserId() == null) { + return new HashMap<>(); + } + UserServiceApi userServiceApi = SpringUtil.getBean(UserServiceApi.class); + SysUserDTO sysUserDTO = userServiceApi.getUserInfoByUserId(sysLoginLog.getUserId()); + + HashMap map = new HashMap<>(); + map.put("realName", sysUserDTO.getRealName()); + return map; + } + +} diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java index 5cc4cee81..5590986e1 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrPositionController.java @@ -71,7 +71,7 @@ public class HrPositionController { */ @PostResource(name = "更新职位状态", path = "/hrPosition/updateStatus") public ResponseData updateStatus(@RequestBody @Validated(BaseRequest.updateStatus.class) HrPositionRequest hrPositionRequest) { - hrPositionService.updateStatus(hrPositionRequest); + hrPositionService.changeStatus(hrPositionRequest); return new SuccessResponseData(); } diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/entity/HrOrganization.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/entity/HrOrganization.java index 99977adce..77acfd8e8 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/entity/HrOrganization.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/entity/HrOrganization.java @@ -61,7 +61,7 @@ public class HrOrganization extends BaseEntity { /** * 状态:1-启用,2-禁用 */ - @TableField("status_flag") + @TableField(value = "status_flag",fill = FieldFill.INSERT) private Integer statusFlag; /** diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/DataScopeService.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/DataScopeService.java index 97704a9c7..15b447610 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/DataScopeService.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/DataScopeService.java @@ -53,7 +53,7 @@ public class DataScopeService implements DataScopeApi { } // 获取用户的主要部门信息 - SysUserOrgDTO sysUserOrgResponse = userOrgServiceApi.getUserOrgInfo(userId); + SysUserOrgDTO sysUserOrgResponse = userOrgServiceApi.getUserOrgByUserId(userId); // 获取角色中的数据范围类型 Set dataScopeTypeEnums = sysRoles.stream().map(SysRoleDTO::getDataScopeTypeEnum).collect(Collectors.toSet()); diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java index b0c8e47cd..a587b9327 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/HrPositionService.java @@ -43,13 +43,13 @@ public interface HrPositionService extends IService { void edit(HrPositionRequest hrPositionRequest); /** - * 更新装填 + * 更新状态 * * @param hrPositionRequest 请求参数 * @author chenjinlong * @date 2020/11/18 23:00 */ - void updateStatus(HrPositionRequest hrPositionRequest); + void changeStatus(HrPositionRequest hrPositionRequest); /** * 查看详情 diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java index b33c309f2..0264a649b 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrganizationServiceImpl.java @@ -149,7 +149,7 @@ public class HrOrganizationServiceImpl extends ServiceImpl findList(HrPositionRequest hrPositionRequest) { - LambdaQueryWrapper wrapper = this.createWrapper(hrPositionRequest); - return this.list(wrapper); + return this.list(this.createWrapper(hrPositionRequest)); } @Override @@ -119,16 +118,6 @@ public class HrPositionServiceImpl extends ServiceImpl createWrapper(HrPositionRequest hrPositionRequest) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - // 查询未删除状态的 - queryWrapper.eq(HrPosition::getDelFlag, YesOrNotEnum.N.getCode()); - - // 根据排序升序排列,序号越小越在前 - queryWrapper.orderByAsc(HrPosition::getPositionSort); - - if (ObjectUtil.isEmpty(hrPositionRequest)) { - return queryWrapper; - } - Long positionId = hrPositionRequest.getPositionId(); String positionName = hrPositionRequest.getPositionName(); String positionCode = hrPositionRequest.getPositionCode(); @@ -138,6 +127,11 @@ public class HrPositionServiceImpl extends ServiceImpl queryWrapper = this.createQueryWrapper(userDataScopeRequest); - this.remove(queryWrapper); + if (ObjectUtil.isNotEmpty(userId)) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(SysUserDataScope::getUserId, userId); + this.remove(queryWrapper); + } } @Override @@ -83,8 +88,7 @@ public class SysUserDataScopeServiceImpl extends ServiceImpl queryWrapper = this.createQueryWrapper(userDataScopeRequest); - return this.getOne(queryWrapper, false); + return this.getOne(this.createQueryWrapper(userDataScopeRequest), false); } @Override @@ -109,7 +113,11 @@ public class SysUserDataScopeServiceImpl extends ServiceImpl implements SysUserOrgService { @Override - public SysUserOrgDTO getUserOrgInfo(Long userId) { + public SysUserOrgDTO getUserOrgByUserId(Long userId) { - LambdaQueryWrapper sysUserOrgLambdaQueryWrapper = new LambdaQueryWrapper<>(); - sysUserOrgLambdaQueryWrapper.eq(SysUserOrg::getUserId, userId); - - List list = this.list(sysUserOrgLambdaQueryWrapper); - if (list.size() != 1) { - throw new SystemModularException(EMPLOYEE_MANY_MAIN_NOT_FOUND); - } else { - SysUserOrg sysUserOrg = list.get(0); - SysUserOrgDTO sysUserOrgResponse = new SysUserOrgDTO(); - BeanUtil.copyProperties(sysUserOrg, sysUserOrgResponse); - return sysUserOrgResponse; + UserOrgRequest userOrgRequest = new UserOrgRequest(); + userOrgRequest.setUserId(userId); + SysUserOrg sysUserOrg = this.detail(userOrgRequest); + if(ObjectUtil.isEmpty(sysUserOrg)){ + throw new SystemModularException(SysUserOrgExceptionEnum.EMPLOYEE_MANY_MAIN_NOT_FOUND); } + SysUserOrgDTO sysUserOrgDTO = new SysUserOrgDTO(); + BeanUtil.copyProperties(sysUserOrg, sysUserOrgDTO); + return sysUserOrgDTO; } @@ -84,22 +80,16 @@ public class SysUserOrgServiceServiceImpl extends ServiceImpl queryWrapper = this.createWrapper(userOrgResponse); - return this.getOne(queryWrapper, false); + return this.getOne( this.createWrapper(userOrgResponse), false); } @Override diff --git a/kernel-s-system/system-business-user/src/main/java/cn/stylefeng/roses/kernel/system/modular/user/service/impl/SysUserServiceImpl.java b/kernel-s-system/system-business-user/src/main/java/cn/stylefeng/roses/kernel/system/modular/user/service/impl/SysUserServiceImpl.java index 54b268dd4..406691ab5 100644 --- a/kernel-s-system/system-business-user/src/main/java/cn/stylefeng/roses/kernel/system/modular/user/service/impl/SysUserServiceImpl.java +++ b/kernel-s-system/system-business-user/src/main/java/cn/stylefeng/roses/kernel/system/modular/user/service/impl/SysUserServiceImpl.java @@ -159,7 +159,7 @@ public class SysUserServiceImpl extends ServiceImpl impl } // 获取被授权用户的所属机构 - SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgInfo(sysUser.getUserId()); + SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgByUserId(sysUser.getUserId()); Long organizationId = userOrgInfo.getOrgId(); // 判断当前用户有无该用户的权限 @@ -318,7 +318,7 @@ public class SysUserServiceImpl extends ServiceImpl impl SysUser sysUser = this.querySysUser(sysUserRequest); // 获取要授权角色的用户的所属机构 - SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgInfo(sysUser.getUserId()); + SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgByUserId(sysUser.getUserId()); Long organizationId = userOrgInfo.getOrgId(); // 判断当前用户有无该用户的权限 @@ -334,7 +334,7 @@ public class SysUserServiceImpl extends ServiceImpl impl SysUser sysUser = this.querySysUser(sysUserRequest); // 获取被授权用户的所属机构 - SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgInfo(sysUser.getUserId()); + SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgByUserId(sysUser.getUserId()); Long organizationId = userOrgInfo.getOrgId(); // 判断当前用户有无该用户的权限 @@ -352,7 +352,7 @@ public class SysUserServiceImpl extends ServiceImpl impl BeanUtil.copyProperties(sysUser, sysUserResponse); // 获取用户组织绑定信息 - SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgInfo(sysUser.getUserId()); + SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgByUserId(sysUser.getUserId()); sysUserResponse.setOrgId(userOrgInfo.getOrgId()); sysUserResponse.setPositionId(userOrgInfo.getPositionId()); @@ -504,7 +504,7 @@ public class SysUserServiceImpl extends ServiceImpl impl DataScopeDTO dataScopeResponse = dataScopeApi.getDataScope(userId, roleResponseList); // 4. 获取用户的组织机构和职位信息 - SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgInfo(userId); + SysUserOrgDTO userOrgInfo = sysUserOrgService.getUserOrgByUserId(userId); // 5. 获取用户的所有资源url List resourceCodeList = roleServiceApi.getRoleResourceCodeList(roleIds);