diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java index 73fbe30..6425fb7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.common.helper.UserInfoHelper; import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo; import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService; import com.ningdatech.pmapi.organization.service.IDingOrganizationService; @@ -23,7 +24,9 @@ import com.ningdatech.pmapi.user.model.po.ReqUserInfoListPO; import com.ningdatech.pmapi.user.model.vo.ResUserDetailVO; import com.ningdatech.pmapi.user.model.vo.ResUserInfoListVO; import com.ningdatech.pmapi.user.model.vo.UserRoleVO; +import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; import com.ningdatech.pmapi.user.service.IUserInfoService; +import com.ningdatech.pmapi.user.util.LoginUserUtil; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -46,6 +49,7 @@ public class UserInfoManage { private final IUserInfoService iUserInfoService; private final IUserRoleService iUserRoleService; private final IRoleService iRoleService; + private final UserInfoHelper userInfoHelper; public PageVo list(ReqUserInfoListPO reqUserInfoListPO) { LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(DingEmployeeInfo.class) @@ -63,7 +67,7 @@ public class UserInfoManage { Map employeeCodeAvailableMap = new HashMap<>(); if (CollUtil.isNotEmpty(employeeCodeList)) { employeeCodeAvailableMap = iUserInfoService.list(Wrappers.lambdaQuery(UserInfo.class) - .in(UserInfo::getEmployeeCode,employeeCodeList)) + .in(UserInfo::getEmployeeCode, employeeCodeList)) .stream().collect(Collectors.toMap(UserInfo::getEmployeeCode, Function.identity())); } @@ -87,6 +91,7 @@ public class UserInfoManage { && UserAvailableEnum.ENABLE.name().equals(userInfo.getAvailable())) { resListVO.setStatus(UserAvailableEnum.ENABLE.name()); } + resListVO.setStatus(UserAvailableEnum.DISABLE.name()); resListVO.setUserId(userInfo.getId()); } else { resListVO.setStatus(UserAvailableEnum.DISABLE.name()); @@ -172,8 +177,10 @@ public class UserInfoManage { UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) .eq(UserInfo::getEmployeeCode, employeeCode)); if (Objects.isNull(userInfo)) { - List dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class) - .eq(DingEmployeeInfo::getMainJob, "true")); + List dingEmployeeInfoList = iDingEmployeeInfoService + .list(Wrappers.lambdaQuery(DingEmployeeInfo.class) + .eq(DingEmployeeInfo::getEmployeeCode, employeeCode) + .eq(DingEmployeeInfo::getMainJob, "true")); if (CollUtil.isEmpty(dingEmployeeInfoList)) { throw new BizException("员工账号不存在"); } @@ -196,6 +203,8 @@ public class UserInfoManage { public ResUserDetailVO currentUserInfo() { + Long userId = LoginUserUtil.getUserId(); + UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId); return null; } } diff --git a/pmapi/src/main/resources/security/auth-dev.yml b/pmapi/src/main/resources/security/auth-dev.yml index c22582d..19fcc71 100644 --- a/pmapi/src/main/resources/security/auth-dev.yml +++ b/pmapi/src/main/resources/security/auth-dev.yml @@ -15,14 +15,12 @@ security: - /api/v1/user/auth/invalid-session - /api/v1/user/auth/login/password - /api/v1/user/auth/forget-password - - /api/v1/** - /doc.html - /ok.html - /open/api/** - /oa/** - /wflow/** - /sys/** - - /api/v1/user-info/** ignore-csrf-urls: - /api/v1/user/auth/** - /v2/api-docs