mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
新增 用户解绑鉴权卡接口
This commit is contained in:
@@ -275,10 +275,10 @@ public class MemberService {
|
||||
.mobileNumber(dto.getPhoneNumber())
|
||||
.verificationCode(dto.getVerificationCode())
|
||||
.build();
|
||||
// checkVerificationCode(registerAndLoginDTO);
|
||||
checkVerificationCode(registerAndLoginDTO);
|
||||
// 判断当前鉴权卡是否被绑定过
|
||||
PileAuthCard authCard = PileAuthCard.builder()
|
||||
.physicsCard(dto.getPhysicsCard())
|
||||
.logicCard(dto.getLogicCard())
|
||||
.build();
|
||||
PileAuthCard pileAuthCardInfo = pileAuthCardService.selectPileAuthCardInfo(authCard);
|
||||
if (pileAuthCardInfo == null){
|
||||
@@ -295,4 +295,30 @@ public class MemberService {
|
||||
authCard.setId(pileAuthCardInfo.getId());
|
||||
return pileAuthCardService.updatePileAuthCard(authCard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户解绑鉴权卡
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public int memberUnbindCard(BindingCardDTO dto) {
|
||||
// 校验短信验证码
|
||||
MemberRegisterAndLoginDTO registerAndLoginDTO = MemberRegisterAndLoginDTO.builder()
|
||||
.mobileNumber(dto.getPhoneNumber())
|
||||
.verificationCode(dto.getVerificationCode())
|
||||
.build();
|
||||
// checkVerificationCode(registerAndLoginDTO);
|
||||
// 校验身份信息
|
||||
PileAuthCard authCard = PileAuthCard.builder()
|
||||
.logicCard(dto.getLogicCard())
|
||||
.memberId(dto.getMemberId())
|
||||
.build();
|
||||
PileAuthCard pileAuthCardInfo = pileAuthCardService.selectPileAuthCardInfo(authCard);
|
||||
if (pileAuthCardInfo == null){
|
||||
// 为空说明没查到此卡信息
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_THIS_CARD_HAS_NO_INFO);
|
||||
}
|
||||
// 解绑鉴权卡
|
||||
return pileAuthCardService.unBindingCard(authCard);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user