[api] AdminMemberController 이쪽 컨벤션 맞춰 변경

This commit is contained in:
2026-05-21 16:02:45 +09:00
parent 41b3cd5b33
commit 4c30133285
19 changed files with 227 additions and 211 deletions
@@ -24,104 +24,104 @@ public class AdminMemberController {
}
@Operation(
summary = "회원 목록 조회",
description = "관리자가 회원 목록을 검색 조건과 페이징으로 조회합니다."
summary = "회원 목록 조회"
, description = "관리자가 회원 목록을 검색 조건과 페이징으로 조회합니다."
)
@GetMapping("/list")
public ResponseEntity<ApiResponse<AdminMemberListVo>> adminMemberList(
@ModelAttribute AdminMemberSearchForm adminMemberSearchForm
@ModelAttribute AdminMemberListForm adminMemberListForm
) {
AdminMemberListVo result = adminMemberService.selectAdminMemberList(adminMemberSearchForm.toAdminMemberSearchDto());
AdminMemberListVo adminMemberListVo = adminMemberService.selectAdminMemberList(adminMemberListForm.toDto());
if (result.getMemberList() == null || result.getMemberList().isEmpty()) {
return ApiResponse.entity(result, ApiResponseCode.CODE_2003);
if (adminMemberListVo.getMemberList() == null || adminMemberListVo.getMemberList().isEmpty()) {
return ApiResponse.entity(adminMemberListVo, ApiResponseCode.CODE_2003);
}
return ApiResponse.entity(result, ApiResponseCode.CODE_2001, "회원");
return ApiResponse.entity(adminMemberListVo, ApiResponseCode.CODE_2001, "회원");
}
@Operation(
summary = "회원 상세 조회",
description = "관리자가 회원 PK 기준으로 회원 상세 정보를 조회합니다."
summary = "회원 상세 조회"
, description = "관리자가 회원 PK 기준으로 회원 상세 정보를 조회합니다."
)
@GetMapping("/detail")
public ResponseEntity<ApiResponse<AdminMemberDetailVo>> adminMemberDetail(
@GetMapping("/view")
public ResponseEntity<ApiResponse<AdminMemberViewVo>> adminMemberView(
@RequestParam Integer userIdx
) {
AdminMemberDetailVo result = adminMemberService.selectAdminMemberDetail(userIdx);
AdminMemberViewVo adminMemberViewVo = adminMemberService.selectAdminMemberView(userIdx);
if (result == null) {
return ApiResponse.entity((AdminMemberDetailVo) null, ApiResponseCode.CODE_2003);
if (adminMemberViewVo == null) {
return ApiResponse.entity((AdminMemberViewVo) null, ApiResponseCode.CODE_2003);
}
return ApiResponse.entity(result, ApiResponseCode.CODE_2001, "회원");
return ApiResponse.entity(adminMemberViewVo, ApiResponseCode.CODE_2001, "회원");
}
@Operation(
summary = "회원 정보 수정",
description = "관리자가 회원 PK 기준으로 회원 기본 정보와 권한 정보를 수정합니다."
summary = "회원 정보 수정"
, description = "관리자가 회원 PK 기준으로 회원 기본 정보와 권한 정보를 수정합니다."
)
@PutMapping("/update")
public ResponseEntity<ApiResponse<AdminMemberUpdateVo>> adminMemberUpdate(
@Valid @RequestBody AdminMemberUpdateForm adminMemberUpdateForm
@PutMapping("/modify")
public ResponseEntity<ApiResponse<AdminMemberModifyVo>> adminMemberModify(
@Valid @RequestBody AdminMemberModifyForm adminMemberModifyForm
) {
AdminMemberUpdateVo result = adminMemberService.updateAdminMember(adminMemberUpdateForm.toAdminMemberUpdateDto());
AdminMemberModifyVo adminMemberModifyVo = adminMemberService.updateAdminMemberModify(adminMemberModifyForm.toDto());
if (!result.isMemberUpdated()) {
return ApiResponse.entity(result, ApiResponseCode.CODE_2003);
if (!adminMemberModifyVo.isProcessed()) {
return ApiResponse.entity(adminMemberModifyVo, ApiResponseCode.CODE_2003);
}
return ApiResponse.entity(result, ApiResponseCode.CODE_2005, "회원 수정");
return ApiResponse.entity(adminMemberModifyVo, ApiResponseCode.CODE_2005, "회원 수정");
}
@Operation(
summary = "회원 휴면 상태 변경",
description = "관리자가 회원 PK 기준으로 휴면 상태를 변경합니다. Y: 휴면, N: 정상"
)
@PatchMapping("/dormant")
public ResponseEntity<ApiResponse<AdminMemberDormantStatusVo>> updateAdminMemberDormantStatus(
@Valid @RequestBody AdminMemberDormantStatusForm adminMemberDormantStatusForm
) {
AdminMemberDormantStatusVo result = adminMemberService.updateAdminMemberDormantStatus(adminMemberDormantStatusForm.toAdminMemberDormantStatusUpdateDto());
if (!result.isDormantStatusUpdated()) {
return ApiResponse.entity(result, ApiResponseCode.CODE_2003);
}
return ApiResponse.entity(result, ApiResponseCode.CODE_2005, "회원 휴면 상태 변경");
}
@Operation(
summary = "회원 탈퇴 상태 변경",
description = "관리자가 회원 PK 기준으로 탈퇴 상태를 변경합니다. N: 정상, P: 탈퇴대기, Y: 탈퇴완료"
)
@PatchMapping("/withdraw")
public ResponseEntity<ApiResponse<AdminMemberWithdrawStatusVo>> updateAdminMemberWithdrawStatus(
@Valid @RequestBody AdminMemberWithdrawStatusForm adminMemberWithdrawStatusForm
) {
AdminMemberWithdrawStatusVo result = adminMemberService.updateAdminMemberWithdrawStatus(adminMemberWithdrawStatusForm.toAdminMemberWithdrawStatusUpdateDto());
if (!result.isWithdrawStatusUpdated()) {
return ApiResponse.entity(result, ApiResponseCode.CODE_2003);
}
return ApiResponse.entity(result, ApiResponseCode.CODE_2005, "회원 탈퇴 상태 변경");
}
@Operation(
summary = "회원 계정 삭제",
description = "관리자가 회원 PK 기준으로 계정을 삭제 처리합니다. 실제 삭제가 아닌 del_yn 변경 방식입니다."
summary = "회원 계정 삭제"
, description = "관리자가 회원 PK 기준으로 계정을 삭제 처리합니다. 실제 삭제가 아닌 del_yn 변경 방식입니다."
)
@PatchMapping("/delete")
public ResponseEntity<ApiResponse<AdminMemberDeleteVo>> deleteAdminMember(
public ResponseEntity<ApiResponse<AdminMemberDeleteVo>> adminMemberDelete(
@Valid @RequestBody AdminMemberDeleteForm adminMemberDeleteForm
) {
AdminMemberDeleteVo result = adminMemberService.deleteAdminMember(adminMemberDeleteForm.toAdminMemberDeleteDto());
AdminMemberDeleteVo adminMemberDeleteVo = adminMemberService.updateAdminMemberDelete(adminMemberDeleteForm.toDto());
if (!result.isMemberDeleted()) {
return ApiResponse.entity(result, ApiResponseCode.CODE_2003);
if (!adminMemberDeleteVo.isProcessed()) {
return ApiResponse.entity(adminMemberDeleteVo, ApiResponseCode.CODE_2003);
}
return ApiResponse.entity(result, ApiResponseCode.CODE_2005, "회원 계정 삭제");
return ApiResponse.entity(adminMemberDeleteVo, ApiResponseCode.CODE_2005, "회원 계정 삭제");
}
@Operation(
summary = "회원 휴면 상태 변경"
, description = "관리자가 회원 PK 기준으로 휴면 상태를 변경합니다. Y: 휴면, N: 정상"
)
@PatchMapping("/dormant/modify")
public ResponseEntity<ApiResponse<AdminMemberDormantModifyVo>> adminMemberDormantModify(
@Valid @RequestBody AdminMemberDormantModifyForm adminMemberDormantModifyForm
) {
AdminMemberDormantModifyVo adminMemberDormantModifyVo = adminMemberService.updateAdminMemberDormantModify(adminMemberDormantModifyForm.toDto());
if (!adminMemberDormantModifyVo.isProcessed()) {
return ApiResponse.entity(adminMemberDormantModifyVo, ApiResponseCode.CODE_2003);
}
return ApiResponse.entity(adminMemberDormantModifyVo, ApiResponseCode.CODE_2005, "회원 휴면 상태 변경");
}
@Operation(
summary = "회원 탈퇴 상태 변경"
, description = "관리자가 회원 PK 기준으로 탈퇴 상태를 변경합니다. N: 정상, P: 탈퇴대기, Y: 탈퇴완료"
)
@PatchMapping("/withdraw/modify")
public ResponseEntity<ApiResponse<AdminMemberWithdrawModifyVo>> adminMemberWithdrawModify(
@Valid @RequestBody AdminMemberWithdrawModifyForm adminMemberWithdrawModifyForm
) {
AdminMemberWithdrawModifyVo adminMemberWithdrawModifyVo = adminMemberService.updateAdminMemberWithdrawModify(adminMemberWithdrawModifyForm.toDto());
if (!adminMemberWithdrawModifyVo.isProcessed()) {
return ApiResponse.entity(adminMemberWithdrawModifyVo, ApiResponseCode.CODE_2003);
}
return ApiResponse.entity(adminMemberWithdrawModifyVo, ApiResponseCode.CODE_2005, "회원 탈퇴 상태 변경");
}
}
@@ -5,7 +5,7 @@ import lombok.Setter;
@Getter
@Setter
public class AdminMemberDormantStatusDto {
public class AdminMemberDormantModifyDto {
private Integer userIdx;
private String dormantYn;
}
@@ -6,7 +6,7 @@ import lombok.Setter;
@Getter
@Setter
public class AdminMemberSearchDto extends PageRequest {
public class AdminMemberListDto extends PageRequest {
private String keyword;
private String userRole;
private String userType;
@@ -5,7 +5,7 @@ import lombok.Setter;
@Getter
@Setter
public class AdminMemberUpdateDto {
public class AdminMemberModifyDto {
private Integer userIdx;
private String email;
private String hp;
@@ -5,7 +5,7 @@ import lombok.Setter;
@Getter
@Setter
public class AdminMemberWithdrawStatusDto {
public class AdminMemberWithdrawModifyDto {
private Integer userIdx;
private String withdrawStatus;
}
@@ -14,7 +14,7 @@ public class AdminMemberDeleteForm {
@NotNull(message = "회원 PK는 필수입니다.")
private Integer userIdx;
public AdminMemberDeleteDto toAdminMemberDeleteDto() {
public AdminMemberDeleteDto toDto() {
AdminMemberDeleteDto adminMemberDeleteDto = new AdminMemberDeleteDto();
adminMemberDeleteDto.setUserIdx(userIdx);
return adminMemberDeleteDto;
@@ -1,6 +1,6 @@
package com.alist.api.modules.admin.member.form;
import com.alist.api.modules.admin.member.dto.AdminMemberDormantStatusDto;
import com.alist.api.modules.admin.member.dto.AdminMemberDormantModifyDto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
@@ -11,7 +11,7 @@ import lombok.Setter;
@Schema(description = "관리자 회원 휴면 상태 변경 요청 폼")
@Getter
@Setter
public class AdminMemberDormantStatusForm {
public class AdminMemberDormantModifyForm {
@Schema(description = "회원 PK", example = "15", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "회원 PK는 필수입니다.")
private Integer userIdx;
@@ -21,10 +21,10 @@ public class AdminMemberDormantStatusForm {
@Pattern(regexp = "^[YN]$", message = "휴면 여부는 Y 또는 N만 가능합니다.")
private String dormantYn;
public AdminMemberDormantStatusDto toAdminMemberDormantStatusUpdateDto() {
AdminMemberDormantStatusDto adminMemberDormantStatusDto = new AdminMemberDormantStatusDto();
adminMemberDormantStatusDto.setUserIdx(userIdx);
adminMemberDormantStatusDto.setDormantYn(dormantYn);
return adminMemberDormantStatusDto;
public AdminMemberDormantModifyDto toDto() {
AdminMemberDormantModifyDto adminMemberDormantModifyDto = new AdminMemberDormantModifyDto();
adminMemberDormantModifyDto.setUserIdx(userIdx);
adminMemberDormantModifyDto.setDormantYn(dormantYn);
return adminMemberDormantModifyDto;
}
}
@@ -1,7 +1,7 @@
package com.alist.api.modules.admin.member.form;
import com.alist.api.common.paging.PageRequest;
import com.alist.api.modules.admin.member.dto.AdminMemberSearchDto;
import com.alist.api.modules.admin.member.dto.AdminMemberListDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -9,7 +9,7 @@ import lombok.Setter;
@Schema(description = "관리자 회원 목록 검색 조건")
@Getter
@Setter
public class AdminMemberSearchForm extends PageRequest {
public class AdminMemberListForm extends PageRequest {
@Schema(description = "검색어. 아이디, 이메일, 휴대폰 번호를 대상으로 검색합니다.", example = "admin")
private String keyword;
@@ -25,15 +25,15 @@ public class AdminMemberSearchForm extends PageRequest {
@Schema(description = "탈퇴 상태. N: 정상, P: 탈퇴대기, Y: 탈퇴완료", example = "N")
private String withdrawStatus;
public AdminMemberSearchDto toAdminMemberSearchDto() {
AdminMemberSearchDto adminMemberSearchDto = new AdminMemberSearchDto();
adminMemberSearchDto.setPage(getPage());
adminMemberSearchDto.setSize(getSize());
adminMemberSearchDto.setKeyword(keyword);
adminMemberSearchDto.setUserRole(userRole);
adminMemberSearchDto.setUserType(userType);
adminMemberSearchDto.setDormantYn(dormantYn);
adminMemberSearchDto.setWithdrawStatus(withdrawStatus);
return adminMemberSearchDto;
public AdminMemberListDto toDto() {
AdminMemberListDto adminMemberListDto = new AdminMemberListDto();
adminMemberListDto.setPage(getPage());
adminMemberListDto.setSize(getSize());
adminMemberListDto.setKeyword(keyword);
adminMemberListDto.setUserRole(userRole);
adminMemberListDto.setUserType(userType);
adminMemberListDto.setDormantYn(dormantYn);
adminMemberListDto.setWithdrawStatus(withdrawStatus);
return adminMemberListDto;
}
}
@@ -1,6 +1,6 @@
package com.alist.api.modules.admin.member.form;
import com.alist.api.modules.admin.member.dto.AdminMemberUpdateDto;
import com.alist.api.modules.admin.member.dto.AdminMemberModifyDto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
@@ -10,7 +10,7 @@ import lombok.Setter;
@Schema(description = "관리자 회원 수정 요청 폼")
@Getter
@Setter
public class AdminMemberUpdateForm {
public class AdminMemberModifyForm {
@Schema(description = "회원 PK", example = "15", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "회원 PK는 필수입니다.")
private Integer userIdx;
@@ -28,13 +28,13 @@ public class AdminMemberUpdateForm {
@Schema(description = "회원 유형 코드. A: 관리자, T: 교사, S: 학생", example = "T")
private String userType;
public AdminMemberUpdateDto toAdminMemberUpdateDto() {
AdminMemberUpdateDto adminMemberUpdateDto = new AdminMemberUpdateDto();
adminMemberUpdateDto.setUserIdx(userIdx);
adminMemberUpdateDto.setEmail(email);
adminMemberUpdateDto.setHp(hp);
adminMemberUpdateDto.setUserRole(userRole);
adminMemberUpdateDto.setUserType(userType);
return adminMemberUpdateDto;
public AdminMemberModifyDto toDto() {
AdminMemberModifyDto adminMemberModifyDto = new AdminMemberModifyDto();
adminMemberModifyDto.setUserIdx(userIdx);
adminMemberModifyDto.setEmail(email);
adminMemberModifyDto.setHp(hp);
adminMemberModifyDto.setUserRole(userRole);
adminMemberModifyDto.setUserType(userType);
return adminMemberModifyDto;
}
}
@@ -1,6 +1,6 @@
package com.alist.api.modules.admin.member.form;
import com.alist.api.modules.admin.member.dto.AdminMemberWithdrawStatusDto;
import com.alist.api.modules.admin.member.dto.AdminMemberWithdrawModifyDto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
@@ -11,7 +11,7 @@ import lombok.Setter;
@Schema(description = "관리자 회원 탈퇴 상태 변경 요청 폼")
@Getter
@Setter
public class AdminMemberWithdrawStatusForm {
public class AdminMemberWithdrawModifyForm {
@Schema(description = "회원 PK", example = "15", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "회원 PK는 필수입니다.")
private Integer userIdx;
@@ -21,10 +21,10 @@ public class AdminMemberWithdrawStatusForm {
@Pattern(regexp = "^[NPY]$", message = "탈퇴 상태는 N, P, Y만 가능합니다.")
private String withdrawStatus;
public AdminMemberWithdrawStatusDto toAdminMemberWithdrawStatusUpdateDto() {
AdminMemberWithdrawStatusDto adminMemberWithdrawStatusDto = new AdminMemberWithdrawStatusDto();
adminMemberWithdrawStatusDto.setUserIdx(userIdx);
adminMemberWithdrawStatusDto.setWithdrawStatus(withdrawStatus);
return adminMemberWithdrawStatusDto;
public AdminMemberWithdrawModifyDto toDto() {
AdminMemberWithdrawModifyDto adminMemberWithdrawModifyDto = new AdminMemberWithdrawModifyDto();
adminMemberWithdrawModifyDto.setUserIdx(userIdx);
adminMemberWithdrawModifyDto.setWithdrawStatus(withdrawStatus);
return adminMemberWithdrawModifyDto;
}
}
@@ -1,7 +1,7 @@
package com.alist.api.modules.admin.member.mapper;
import com.alist.api.modules.admin.member.dto.*;
import com.alist.api.modules.admin.member.vo.AdminMemberDetailVo;
import com.alist.api.modules.admin.member.vo.AdminMemberViewVo;
import com.alist.api.modules.admin.member.vo.AdminMemberVo;
import org.apache.ibatis.annotations.Mapper;
@@ -9,17 +9,17 @@ import java.util.List;
@Mapper
public interface AdminMemberMapper {
int selectAdminMemberCount(AdminMemberSearchDto adminMemberSearchDto);
int selectAdminMemberCount(AdminMemberListDto adminMemberListDto);
List<AdminMemberVo> selectAdminMemberList(AdminMemberSearchDto adminMemberSearchDto);
List<AdminMemberVo> selectAdminMemberList(AdminMemberListDto adminMemberListDto);
AdminMemberDetailVo selectAdminMemberDetail(Integer userIdx);
AdminMemberViewVo selectAdminMemberView(Integer userIdx);
int updateAdminMember(AdminMemberUpdateDto adminMemberUpdateDto);
int updateAdminMemberModify(AdminMemberModifyDto adminMemberModifyDto);
int updateAdminMemberDormantStatus(AdminMemberDormantStatusDto adminMemberDormantStatusDto);
int updateAdminMemberDormantModify(AdminMemberDormantModifyDto adminMemberDormantModifyDto);
int updateAdminMemberWithdrawStatus(AdminMemberWithdrawStatusDto adminMemberWithdrawStatusDto);
int updateAdminMemberWithdrawModify(AdminMemberWithdrawModifyDto adminMemberWithdrawModifyDto);
int deleteAdminMember(AdminMemberDeleteDto adminMemberDeleteDto);
int updateAdminMemberDelete(AdminMemberDeleteDto adminMemberDeleteDto);
}
@@ -17,55 +17,55 @@ public class AdminMemberService {
}
@Transactional(readOnly = true)
public AdminMemberListVo selectAdminMemberList(AdminMemberSearchDto adminMemberSearchDto) {
int totalCount = adminMemberMapper.selectAdminMemberCount(adminMemberSearchDto);
List<AdminMemberVo> memberList = adminMemberMapper.selectAdminMemberList(adminMemberSearchDto);
public AdminMemberListVo selectAdminMemberList(AdminMemberListDto adminMemberListDto) {
int totalCount = adminMemberMapper.selectAdminMemberCount(adminMemberListDto);
List<AdminMemberVo> adminMemberList = adminMemberMapper.selectAdminMemberList(adminMemberListDto);
AdminMemberListVo result = new AdminMemberListVo();
result.setMemberList(memberList);
result.setPaging(adminMemberSearchDto, totalCount);
AdminMemberListVo adminMemberListVo = new AdminMemberListVo();
adminMemberListVo.setMemberList(adminMemberList);
adminMemberListVo.setPaging(adminMemberListDto, totalCount);
return result;
return adminMemberListVo;
}
@Transactional(readOnly = true)
public AdminMemberDetailVo selectAdminMemberDetail(Integer userIdx) {
return adminMemberMapper.selectAdminMemberDetail(userIdx);
public AdminMemberViewVo selectAdminMemberView(Integer userIdx) {
return adminMemberMapper.selectAdminMemberView(userIdx);
}
@Transactional
public AdminMemberUpdateVo updateAdminMember(AdminMemberUpdateDto adminMemberUpdateDto) {
int updateCount = adminMemberMapper.updateAdminMember(adminMemberUpdateDto);
public AdminMemberModifyVo updateAdminMemberModify(AdminMemberModifyDto adminMemberModifyDto) {
int updateCount = adminMemberMapper.updateAdminMemberModify(adminMemberModifyDto);
AdminMemberUpdateVo result = new AdminMemberUpdateVo();
result.setMemberUpdated(updateCount > 0);
return result;
AdminMemberModifyVo adminMemberModifyVo = new AdminMemberModifyVo();
adminMemberModifyVo.setProcessed(updateCount > 0);
return adminMemberModifyVo;
}
@Transactional
public AdminMemberDormantStatusVo updateAdminMemberDormantStatus(AdminMemberDormantStatusDto adminMemberDormantStatusDto) {
int updateCount = adminMemberMapper.updateAdminMemberDormantStatus(adminMemberDormantStatusDto);
public AdminMemberDormantModifyVo updateAdminMemberDormantModify(AdminMemberDormantModifyDto adminMemberDormantModifyDto) {
int updateCount = adminMemberMapper.updateAdminMemberDormantModify(adminMemberDormantModifyDto);
AdminMemberDormantStatusVo result = new AdminMemberDormantStatusVo();
result.setDormantStatusUpdated(updateCount > 0);
return result;
AdminMemberDormantModifyVo adminMemberDormantModifyVo = new AdminMemberDormantModifyVo();
adminMemberDormantModifyVo.setProcessed(updateCount > 0);
return adminMemberDormantModifyVo;
}
@Transactional
public AdminMemberWithdrawStatusVo updateAdminMemberWithdrawStatus(AdminMemberWithdrawStatusDto adminMemberWithdrawStatusDto) {
int updateCount = adminMemberMapper.updateAdminMemberWithdrawStatus(adminMemberWithdrawStatusDto);
public AdminMemberWithdrawModifyVo updateAdminMemberWithdrawModify(AdminMemberWithdrawModifyDto adminMemberWithdrawModifyDto) {
int updateCount = adminMemberMapper.updateAdminMemberWithdrawModify(adminMemberWithdrawModifyDto);
AdminMemberWithdrawStatusVo result = new AdminMemberWithdrawStatusVo();
result.setWithdrawStatusUpdated(updateCount > 0);
return result;
AdminMemberWithdrawModifyVo adminMemberWithdrawModifyVo = new AdminMemberWithdrawModifyVo();
adminMemberWithdrawModifyVo.setProcessed(updateCount > 0);
return adminMemberWithdrawModifyVo;
}
@Transactional
public AdminMemberDeleteVo deleteAdminMember(AdminMemberDeleteDto adminMemberDeleteDto) {
int updateCount = adminMemberMapper.deleteAdminMember(adminMemberDeleteDto);
public AdminMemberDeleteVo updateAdminMemberDelete(AdminMemberDeleteDto adminMemberDeleteDto) {
int updateCount = adminMemberMapper.updateAdminMemberDelete(adminMemberDeleteDto);
AdminMemberDeleteVo result = new AdminMemberDeleteVo();
result.setMemberDeleted(updateCount > 0);
return result;
AdminMemberDeleteVo adminMemberDeleteVo = new AdminMemberDeleteVo();
adminMemberDeleteVo.setProcessed(updateCount > 0);
return adminMemberDeleteVo;
}
}
@@ -9,5 +9,5 @@ import lombok.Setter;
@Setter
public class AdminMemberDeleteVo {
@Schema(description = "회원 계정 삭제 여부", example = "true")
private boolean memberDeleted;
private boolean processed;
}
@@ -7,7 +7,7 @@ import lombok.Setter;
@Schema(description = "관리자 회원 휴면 상태 변경 응답")
@Getter
@Setter
public class AdminMemberDormantStatusVo {
public class AdminMemberDormantModifyVo {
@Schema(description = "휴면 상태 변경 여부", example = "true")
private boolean dormantStatusUpdated;
private boolean processed;
}
@@ -7,7 +7,7 @@ import lombok.Setter;
@Schema(description = "관리자 회원 수정 응답")
@Getter
@Setter
public class AdminMemberUpdateVo {
public class AdminMemberModifyVo {
@Schema(description = "회원 수정 여부", example = "true")
private boolean memberUpdated;
private boolean processed;
}
@@ -9,7 +9,7 @@ import java.time.LocalDateTime;
@Schema(description = "관리자 회원 상세 조회 응답")
@Getter
@Setter
public class AdminMemberDetailVo {
public class AdminMemberViewVo {
@Schema(description = "회원 PK", example = "15")
private Integer userIdx;
@@ -7,7 +7,7 @@ import lombok.Setter;
@Schema(description = "관리자 회원 탈퇴 상태 변경 응답")
@Getter
@Setter
public class AdminMemberWithdrawStatusVo {
public class AdminMemberWithdrawModifyVo {
@Schema(description = "탈퇴 상태 변경 여부", example = "true")
private boolean withdrawStatusUpdated;
private boolean processed;
}
@@ -26,8 +26,57 @@
AND ATU.withdraw_status = #{withdrawStatus}
</if>
</sql>
<update id="updateAdminMember">
/*AdminMemberMapper.updateAdminMember*/
<select id="selectAdminMemberCount" resultType="int">
/*AdminMemberMapper.selectAdminMemberCount*/
SELECT COUNT(*)
<include refid="adminMemberWhere"/>
</select>
<select id="selectAdminMemberList" resultType="com.alist.api.modules.admin.member.vo.AdminMemberVo">
/*AdminMemberMapper.selectAdminMemberList*/
SELECT ATU.user_idx
, ATUT.user_token_idx
, ATU.id
, ATU.email
, ATU.hp
, ATUT.user_role
, ATUT.user_type
, ATU.dormant_yn
, ATU.dormant_at
, ATU.withdraw_status
, ATU.withdraw_at
, ATU.create_at
, ATU.update_at
<include refid="adminMemberWhere"/>
ORDER BY ATU.user_idx DESC
LIMIT #{limit}
OFFSET #{offset}
</select>
<select id="selectAdminMemberView" resultType="com.alist.api.modules.admin.member.vo.AdminMemberViewVo">
/*AdminMemberMapper.selectAdminMemberView*/
SELECT ATU.user_idx
, ATUT.user_token_idx
, ATU.id
, ATU.email
, ATU.hp
, ATUT.user_role
, ATUT.user_type
, ATU.dormant_yn
, ATU.dormant_at
, ATU.withdraw_status
, ATU.withdraw_at
, ATU.create_at
, ATU.update_at
FROM ALISTLMS.test_user ATU
INNER JOIN ALISTLMS.test_user_token ATUT ON ATUT.user_idx = ATU.user_idx
WHERE ATU.del_yn = 1
AND ATU.user_idx = #{userIdx}
</select>
<update id="updateAdminMemberModify">
/*AdminMemberMapper.updateAdminMemberModify*/
UPDATE ALISTLMS.test_user ATU
INNER JOIN ALISTLMS.test_user_token ATUT ON ATUT.user_idx = ATU.user_idx
SET ATU.update_at = now()
@@ -48,8 +97,8 @@
AND ATU.del_yn = 1
</update>
<update id="updateAdminMemberDormantStatus">
/*AdminMemberMapper.updateAdminMemberDormantStatus*/
<update id="updateAdminMemberDormantModify">
/*AdminMemberMapper.updateAdminMemberDormantModify*/
UPDATE ALISTLMS.test_user
SET dormant_yn = #{dormantYn}
, dormant_at =
@@ -63,8 +112,8 @@
AND del_yn = 1
</update>
<update id="updateAdminMemberWithdrawStatus">
/*AdminMemberMapper.updateAdminMemberWithdrawStatus*/
<update id="updateAdminMemberWithdrawModify">
/*AdminMemberMapper.updateAdminMemberWithdrawModify*/
UPDATE ALISTLMS.test_user
SET withdraw_status = #{withdrawStatus}
, withdraw_at =
@@ -77,59 +126,13 @@
WHERE user_idx = #{userIdx}
AND del_yn = 1
</update>
<update id="deleteAdminMember">
/*AdminMemberMapper.deleteAdminMember*/
<update id="updateAdminMemberDelete">
/*AdminMemberMapper.updateAdminMemberDelete*/
UPDATE ALISTLMS.test_user
SET del_yn = 0
, update_at = now()
WHERE user_idx = #{userIdx}
AND del_yn = 1
</update>
<select id="selectAdminMemberCount" resultType="int">
/*AdminMemberMapper.selectAdminMemberCount*/
SELECT COUNT(*)
<include refid="adminMemberWhere"/>
</select>
<select id="selectAdminMemberList" resultType="com.alist.api.modules.admin.member.vo.AdminMemberVo">
/*AdminMemberMapper.selectAdminMemberList*/
SELECT ATU.user_idx
, ATUT.user_token_idx
, ATU.id
, ATU.email
, ATU.hp
, ATUT.user_role
, ATUT.user_type
, ATU.dormant_yn
, ATU.dormant_at
, ATU.withdraw_status
, ATU.withdraw_at
, ATU.create_at
, ATU.update_at
<include refid="adminMemberWhere"/>
ORDER BY ATU.user_idx DESC
LIMIT #{limit}
OFFSET #{offset}
</select>
<select id="selectAdminMemberDetail" resultType="com.alist.api.modules.admin.member.vo.AdminMemberDetailVo">
/*AdminMemberMapper.selectAdminMemberDetail*/
SELECT ATU.user_idx
, ATUT.user_token_idx
, ATU.id
, ATU.email
, ATU.hp
, ATUT.user_role
, ATUT.user_type
, ATU.dormant_yn
, ATU.dormant_at
, ATU.withdraw_status
, ATU.withdraw_at
, ATU.create_at
, ATU.update_at
FROM ALISTLMS.test_user ATU
INNER JOIN ALISTLMS.test_user_token ATUT ON ATUT.user_idx = ATU.user_idx
WHERE ATU.del_yn = 1
AND ATU.user_idx = #{userIdx}
</select>
</mapper>