mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
新增 绑定鉴权卡需密钥
This commit is contained in:
@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service
|
||||
@@ -289,6 +290,10 @@ public class MemberService {
|
||||
// memberId 不为空,说明此卡已被绑定
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_THIS_CARD_HAS_BEEN_BINDING);
|
||||
}
|
||||
if (!StringUtils.equals(pileAuthCardInfo.getSecretKey(), dto.getSecretKey().toUpperCase(Locale.ROOT))) {
|
||||
// 密钥不一致,不能绑定
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_SECRET_KEY_NOT_SAME);
|
||||
}
|
||||
authCard.setMemberId(dto.getMemberId());
|
||||
authCard.setStatus("1"); // 1-正常使用
|
||||
authCard.setCreateBy(dto.getMemberId());
|
||||
|
||||
Reference in New Issue
Block a user