관리자 목록 조회 수정
This commit is contained in:
@@ -34,43 +34,45 @@ public class MembersApiController {
|
|||||||
|
|
||||||
@Operation(summary = "회원정보 목록", description = "회원정보 조회")
|
@Operation(summary = "회원정보 목록", description = "회원정보 조회")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "검색 성공",
|
description = "검색 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = Page.class))),
|
schema = @Schema(implementation = Page.class))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ApiResponseDto<Page<Basic>> getMemberList(
|
public ApiResponseDto<Page<Basic>> getMemberList(
|
||||||
@ParameterObject MembersDto.SearchReq searchReq) {
|
@ParameterObject MembersDto.SearchReq searchReq) {
|
||||||
return ApiResponseDto.ok(membersService.findByMembers(searchReq));
|
return ApiResponseDto.ok(membersService.findByMembers(searchReq));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "사용자 비밀번호 변경", description = "로그인 성공후 status가 INACTIVE일때 로그인 id를 memberId로 path 생성필요")
|
@Operation(
|
||||||
|
summary = "사용자 비밀번호 변경",
|
||||||
|
description = "로그인 성공후 status가 INACTIVE일때 로그인 id를 memberId로 path 생성필요")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "201",
|
responseCode = "201",
|
||||||
description = "사용자 비밀번호 변경",
|
description = "사용자 비밀번호 변경",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = Long.class))),
|
schema = @Schema(implementation = Long.class))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@PatchMapping("/{memberId}/password")
|
@PatchMapping("/{memberId}/password")
|
||||||
public ApiResponseDto<String> resetPassword(
|
public ApiResponseDto<String> resetPassword(
|
||||||
@PathVariable String memberId, @RequestBody @Valid MembersDto.InitReq initReq) {
|
@PathVariable String memberId, @RequestBody @Valid MembersDto.InitReq initReq) {
|
||||||
|
|
||||||
authenticationManager.authenticate(
|
authenticationManager.authenticate(
|
||||||
new UsernamePasswordAuthenticationToken(memberId, initReq.getTempPassword()));
|
new UsernamePasswordAuthenticationToken(memberId, initReq.getTempPassword()));
|
||||||
|
|
||||||
membersService.resetPassword(memberId, initReq);
|
membersService.resetPassword(memberId, initReq);
|
||||||
return ApiResponseDto.createOK(memberId);
|
return ApiResponseDto.createOK(memberId);
|
||||||
|
|||||||
@@ -32,28 +32,24 @@ public class MembersDto {
|
|||||||
private String tempPassword;
|
private String tempPassword;
|
||||||
private String status;
|
private String status;
|
||||||
private String statusName;
|
private String statusName;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime createdDttm;
|
||||||
private ZonedDateTime createdDttm;
|
@JsonFormatDttm private ZonedDateTime updatedDttm;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime firstLoginDttm;
|
||||||
private ZonedDateTime updatedDttm;
|
@JsonFormatDttm private ZonedDateTime lastLoginDttm;
|
||||||
@JsonFormatDttm
|
|
||||||
private ZonedDateTime firstLoginDttm;
|
|
||||||
@JsonFormatDttm
|
|
||||||
private ZonedDateTime lastLoginDttm;
|
|
||||||
|
|
||||||
public Basic(
|
public Basic(
|
||||||
Long id,
|
Long id,
|
||||||
UUID uuid,
|
UUID uuid,
|
||||||
String userRole,
|
String userRole,
|
||||||
String name,
|
String name,
|
||||||
String userId,
|
String userId,
|
||||||
String employeeNo,
|
String employeeNo,
|
||||||
String tempPassword,
|
String tempPassword,
|
||||||
String status,
|
String status,
|
||||||
ZonedDateTime createdDttm,
|
ZonedDateTime createdDttm,
|
||||||
ZonedDateTime updatedDttm,
|
ZonedDateTime updatedDttm,
|
||||||
ZonedDateTime firstLoginDttm,
|
ZonedDateTime firstLoginDttm,
|
||||||
ZonedDateTime lastLoginDttm) {
|
ZonedDateTime lastLoginDttm) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
this.userRole = userRole;
|
this.userRole = userRole;
|
||||||
@@ -88,8 +84,8 @@ public class MembersDto {
|
|||||||
public static class SearchReq {
|
public static class SearchReq {
|
||||||
|
|
||||||
@Schema(
|
@Schema(
|
||||||
description = "전체, 관리자(ROLE_ADMIN), 라벨러(ROLE_LABELER), 검수자(ROLE_REVIEWER)",
|
description = "전체, 관리자(ROLE_ADMIN), 라벨러(ROLE_LABELER), 검수자(ROLE_REVIEWER)",
|
||||||
example = "")
|
example = "")
|
||||||
private String userRole;
|
private String userRole;
|
||||||
|
|
||||||
@Schema(description = "키워드", example = "홍길동")
|
@Schema(description = "키워드", example = "홍길동")
|
||||||
@@ -133,7 +129,7 @@ public class MembersDto {
|
|||||||
private String employeeNo;
|
private String employeeNo;
|
||||||
|
|
||||||
public AddReq(
|
public AddReq(
|
||||||
String userRole, String name, String userId, String tempPassword, String employeeNo) {
|
String userRole, String name, String userId, String tempPassword, String employeeNo) {
|
||||||
this.userRole = userRole;
|
this.userRole = userRole;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
|
|||||||
Reference in New Issue
Block a user