Преглед изворни кода

fix 禁用启用

tags/24080901
liuxinxin пре 1 година
родитељ
комит
1de7890456
2 измењених фајлова са 12 додато и 5 уклоњено
  1. +12
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java
  2. +0
    -2
      pmapi/src/main/resources/security/auth-dev.yml

+ 12
- 3
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<ResUserInfoListVO> list(ReqUserInfoListPO reqUserInfoListPO) {
LambdaQueryWrapper<DingEmployeeInfo> wrapper = Wrappers.lambdaQuery(DingEmployeeInfo.class)
@@ -63,7 +67,7 @@ public class UserInfoManage {
Map<String, UserInfo> 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<DingEmployeeInfo> dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class)
.eq(DingEmployeeInfo::getMainJob, "true"));
List<DingEmployeeInfo> 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;
}
}

+ 0
- 2
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


Loading…
Откажи
Сачувај