Selaa lähdekoodia

新增查询租户下对应的用户列表接口

tags/v2.4.1
xiaoying 1 vuosi sitten
vanhempi
commit
191e55ff89
9 muutettua tiedostoa jossa 45 lisäystä ja 22 poistoa
  1. +0
    -15
      tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/WateWayConstant.java
  2. +15
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/WaterWayConstant.java
  3. +10
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/UserController.java
  4. +6
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/ClientUserSevice.java
  5. +14
    -7
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java
  6. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/controller/UserController.class
  7. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/model/query/TenantQuery.class
  8. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/service/ClientUserSevice.class
  9. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/service/impl/ClientUserServiceImpl.class

+ 0
- 15
tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/WateWayConstant.java Näytä tiedosto

@@ -1,15 +0,0 @@
package com.tuoheng.constant;

/**
* 航道平台接口常量类
*
* @Author xiaoying
* @Date 2023/2/23 9:34
*/
public class WateWayConstant {


public static final String WATEWAY_CLIENT = "tuoheng-wateway";

public static final String WATEWAY_NAME = "航道业务平台";
}

+ 15
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/constant/WaterWayConstant.java Näytä tiedosto

@@ -0,0 +1,15 @@
package com.tuoheng.constant;

/**
* 航道平台接口常量类
*
* @Author xiaoying
* @Date 2023/2/23 9:34
*/
public class WaterWayConstant {


public static final String WATERWAY_CLIENT = "tuoheng-waterway";

public static final String WATERWAY_NAME = "航道业务平台";
}

+ 10
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/UserController.java Näytä tiedosto

@@ -61,4 +61,14 @@ public class UserController {

}

/**
* 查询对应租户下的所有用户数据
* @param tenantId
* @return
*/
@GetMapping("/findUserList")
public JsonResult findUserList(Long tenantId){
return clientUserSevice.findUserList(tenantId);
}

}

+ 6
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/ClientUserSevice.java Näytä tiedosto

@@ -48,4 +48,10 @@ public interface ClientUserSevice {
* @return
*/
JsonResult updateAuthorities(CreateClientUserDto createClientUserDto, LoginUser loginUser);
/**
* 查询对应租户下的所有用户数据
* @param tenantId
* @return
*/
JsonResult findUserList(Long tenantId);
}

+ 14
- 7
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java Näytä tiedosto

@@ -5,9 +5,6 @@ import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tuoheng.common.CommonConfig;
import com.tuoheng.common.ServiceException;
import com.tuoheng.constant.*;
import com.tuoheng.mapper.*;
@@ -18,13 +15,11 @@ import com.tuoheng.model.po.ClientUserRolePo;
import com.tuoheng.model.po.TenantPo;
import com.tuoheng.model.po.UserPo;
import com.tuoheng.model.query.TenantQuery;
import com.tuoheng.model.request.AirportRequest;
import com.tuoheng.model.vo.BusinessSystemVo;
import com.tuoheng.model.vo.TenantVo;
import com.tuoheng.service.ClientUserSevice;
import com.tuoheng.until.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.*;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@@ -223,6 +218,18 @@ public class ClientUserServiceImpl implements ClientUserSevice {
return JsonResult.success(true);
}

/**
* 查询对应租户下的所有用户数据
*
* @param tenantId
* @return
*/
@Override
public JsonResult findUserList(Long tenantId) {
List<UserPo> userPos = clientUserMapper.selectByTenantId(tenantId);
return JsonResult.success(userPos);
}

/**
* 更新 用户/租户对应关系的系统or角色id
*
@@ -337,8 +344,8 @@ public class ClientUserServiceImpl implements ClientUserSevice {
}
if (authoritiesPo.getAuthority().contains("wateway")) {
BusinessSystemVo businessSystemVo = new BusinessSystemVo();
businessSystemVo.setClientId(WateWayConstant.WATEWAY_CLIENT);
businessSystemVo.setName(WateWayConstant.WATEWAY_NAME);
businessSystemVo.setClientId(WaterWayConstant.WATERWAY_CLIENT);
businessSystemVo.setName(WaterWayConstant.WATERWAY_NAME);
businessSystemVoList.add(businessSystemVo);
}
if (authoritiesPo.getAuthority().contains("freeway")) {

BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/controller/UserController.class Näytä tiedosto


BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/model/query/TenantQuery.class Näytä tiedosto


BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/service/ClientUserSevice.class Näytä tiedosto


BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/service/impl/ClientUserServiceImpl.class Näytä tiedosto


Loading…
Peruuta
Tallenna