Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1b790367
authored
May 02, 2021
by
fengzhi
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.主钥匙关闭分享,分享出去的钥匙处于暂时不可领用的状态
1 parent
cf2874de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
src/main/java/com/glsx/smart/exception/ResultEnum.java
src/main/java/com/glsx/smart/service/impl/AiLockingKeyShareServiceImpl.java
src/main/java/com/glsx/smart/exception/ResultEnum.java
View file @
1b79036
...
...
@@ -40,6 +40,7 @@ public enum ResultEnum {
CAR_KEY_EXCEP_17
(
1117
,
"token令牌解析异常"
),
CAR_KEY_EXCEP_18
(
1118
,
"token令牌超时异常"
),
CAR_KEY_EXCEP_19
(
1119
,
"分享钥匙不存在"
),
CAR_KEY_EXCEP_20
(
1120
,
"钥匙已关闭分享"
),
;
private
final
Integer
code
;
...
...
src/main/java/com/glsx/smart/service/impl/AiLockingKeyShareServiceImpl.java
View file @
1b79036
...
...
@@ -258,9 +258,19 @@ public class AiLockingKeyShareServiceImpl implements AiLockingKeyShareService {
private
SmartVehicleBlueShareKey
checkToeknValid
(
String
token
)
{
Claims
claims
=
praseToken
(
token
);
long
keyid
=
Long
.
valueOf
((
String
)
claims
.
get
(
"keyID"
));
long
keyShareID
=
Long
.
valueOf
((
String
)
claims
.
get
(
"keyShareID"
));
//主钥匙是否关闭分享
List
<
SmartVehicleBlueKey
>
keyList
=
blueKeyService
.
selectById
(
keyid
);
if
(
CollectionUtils
.
isNotEmpty
(
keyList
)){
int
status
=
keyList
.
get
(
0
).
getShareStatus
();
if
(
status
==
0
){
throw
new
BusinessException
(
ResultEnum
.
CAR_KEY_EXCEP_20
);
}
}
//是否已领取
boolean
isReceive
=
isKeyReceive
(
keyShareID
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment