新增 用户解绑鉴权卡接口

This commit is contained in:
Lemon
2023-03-20 17:02:30 +08:00
parent ba3bcb8e2f
commit e97ee74215
6 changed files with 64 additions and 2 deletions

View File

@@ -326,4 +326,24 @@ public class MemberController extends BaseController {
logger.info("用户绑定鉴权卡 result:{}", response);
return response;
}
@PostMapping("/memberUnbindingCard")
public RestApiResponse<?> memberUnbindingCard(HttpServletRequest request, @RequestBody BindingCardDTO dto) {
logger.info("用户解绑鉴权卡 param:{}", JSONObject.toJSONString(dto));
RestApiResponse<?> response = null;
try {
String memberId = getMemberIdByAuthorization(request);
dto.setMemberId(memberId);
int i = memberService.memberUnbindCard(dto);
response = new RestApiResponse<>(i);
} catch (BusinessException e) {
logger.error("用户解绑鉴权卡 error", e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) {
logger.error("用户解绑鉴权卡 error", e);
response = new RestApiResponse<>(e);
}
logger.info("用户解绑鉴权卡 result:{}", response);
return response;
}
}