|
@@ -2,16 +2,24 @@ package com.dragoninfo.dcuc.authweb.restcontroller.sub;
|
|
|
|
|
|
import com.dragoninfo.dcuc.auth.sub.dto.AuthUserDTO;
|
|
|
import com.dragoninfo.dcuc.auth.sub.facade.IAuthUserInfoFacade;
|
|
|
+import com.dragoninfo.dcuc.authweb.restcontroller.sub.vo.user.AuthUserVo;
|
|
|
import com.dragoninfo.duceap.core.response.Result;
|
|
|
import com.dragonsoft.duceap.core.search.Searchable;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
+/**
|
|
|
+ * @author wangrs
|
|
|
+ * @date 2021-04-27
|
|
|
+ */
|
|
|
@Api(tags = {"授权管理-主客体管理-用户信息"})
|
|
|
@RestController
|
|
|
@RequestMapping(value = "authsvr/v2/authuserinfo")
|
|
@@ -31,9 +39,11 @@ public class AuthUserInfoController {
|
|
|
@ApiOperation(value = "用户信息详情")
|
|
|
@ApiImplicitParam(name = "id", value = "id")
|
|
|
@GetMapping(value = "/detail/{id}")
|
|
|
- public AuthUserDTO detail(@PathVariable(value = "id") String id) {
|
|
|
+ public AuthUserVo detail(@PathVariable(value = "id") String id) {
|
|
|
AuthUserDTO authUserInfo = userInfoFacade.get(id);
|
|
|
- return authUserInfo;
|
|
|
+ AuthUserVo authUserVo = new AuthUserVo();
|
|
|
+ BeanUtils.copyProperties(authUserInfo,authUserVo);
|
|
|
+ return authUserVo;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "用户信息删除")
|
|
@@ -44,4 +54,20 @@ public class AuthUserInfoController {
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "机构下未添加白名单的人员")
|
|
|
+ @ApiImplicitParam(name = "searchable", value = "searchable 查询条件:orgId:= ; name:like; idcard:like")
|
|
|
+ @PostMapping("whiteListUserPage")
|
|
|
+ public Result whiteListUserPage(Searchable searchable) {
|
|
|
+ Page<AuthUserDTO> userPage = userInfoFacade.whiteListUserPage(searchable.toSearchDTO());
|
|
|
+ List<AuthUserDTO> content = userPage.getContent();
|
|
|
+ List<AuthUserVo> voList = content.stream().map(item -> {
|
|
|
+ AuthUserVo vo = new AuthUserVo();
|
|
|
+ BeanUtils.copyProperties(item, vo);
|
|
|
+ return vo;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ return Result.success(userPage.getTotalElements(), voList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|