mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-25 17:49:49 +08:00
update 修改鉴权卡校验规则
This commit is contained in:
@@ -113,9 +113,16 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
|||||||
}
|
}
|
||||||
memberBasicInfo.setStatus("1"); // 1-正常使用
|
memberBasicInfo.setStatus("1"); // 1-正常使用
|
||||||
}
|
}
|
||||||
|
String logicCard = dto.getLogicCard();
|
||||||
|
// 根据卡号查询数据库
|
||||||
|
PileAuthCard cardInfo = pileAuthCardMapper.selectSomeStatusCardInfo(null, logicCard);
|
||||||
|
if(cardInfo != null) {
|
||||||
|
// 不为空说明此卡已存在
|
||||||
|
throw new BusinessException(ReturnCodeEnum.CODE_THIS_CARD_HAS_BEEN_BINDING);
|
||||||
|
}
|
||||||
String secretKey = RandomStringUtils.randomAlphanumeric(8).toUpperCase(Locale.ROOT); // 生成8位数的字母 + 数字随机数
|
String secretKey = RandomStringUtils.randomAlphanumeric(8).toUpperCase(Locale.ROOT); // 生成8位数的字母 + 数字随机数
|
||||||
PileAuthCard pileAuthCard = PileAuthCard.builder()
|
PileAuthCard pileAuthCard = PileAuthCard.builder()
|
||||||
.logicCard(dto.getLogicCard())
|
.logicCard(logicCard)
|
||||||
.memberId(memberBasicInfo.getMemberId())
|
.memberId(memberBasicInfo.getMemberId())
|
||||||
.status(memberBasicInfo.getStatus())
|
.status(memberBasicInfo.getStatus())
|
||||||
.secretKey(secretKey)
|
.secretKey(secretKey)
|
||||||
|
|||||||
Reference in New Issue
Block a user