Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengtianlai3
ioc_sixiang_license
Commits
799fad48
Commit
799fad48
authored
Dec 09, 2022
by
ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决授权信息与绑定sn不一致但鉴权成功问题
parent
42978028
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
AuthManager.java
...e/src/main/java/iot/sixiang/license/auth/AuthManager.java
+5
-0
DeviceVo.java
.../src/main/java/iot/sixiang/license/model/vo/DeviceVo.java
+3
-0
DeviceMapper.xml
license/src/main/resources/mapper/DeviceMapper.xml
+1
-1
No files found.
license/src/main/java/iot/sixiang/license/auth/AuthManager.java
View file @
799fad48
...
@@ -102,6 +102,11 @@ public class AuthManager {
...
@@ -102,6 +102,11 @@ public class AuthManager {
return
false
;
return
false
;
}
}
DeviceVo
device
=
deviceManager
.
getDevice
(
sn
);
DeviceVo
device
=
deviceManager
.
getDevice
(
sn
);
String
tempAppId
=
device
.
getAppId
();
if
(!
appId
.
equals
(
tempAppId
))
{
log
.
info
(
"appId and sn no matching ..."
);
return
false
;
}
// 未绑定
// 未绑定
if
(
device
.
getSnBind
()
==
null
)
{
if
(
device
.
getSnBind
()
==
null
)
{
log
.
info
(
"bind sn null..."
);
log
.
info
(
"bind sn null..."
);
...
...
license/src/main/java/iot/sixiang/license/model/vo/DeviceVo.java
View file @
799fad48
...
@@ -16,6 +16,9 @@ public class DeviceVo implements Serializable {
...
@@ -16,6 +16,9 @@ public class DeviceVo implements Serializable {
@ApiModelProperty
(
"设备Id"
)
@ApiModelProperty
(
"设备Id"
)
private
int
deviceId
;
private
int
deviceId
;
@ApiModelProperty
(
"应用Id"
)
private
String
appId
;
@ApiModelProperty
(
"应用名"
)
@ApiModelProperty
(
"应用名"
)
private
String
appName
;
private
String
appName
;
...
...
license/src/main/resources/mapper/DeviceMapper.xml
View file @
799fad48
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"iot.sixiang.license.mapper.DeviceMapper"
>
<mapper
namespace=
"iot.sixiang.license.mapper.DeviceMapper"
>
<select
id=
"getDeviceList"
resultType=
"iot.sixiang.license.model.vo.DeviceVo"
>
<select
id=
"getDeviceList"
resultType=
"iot.sixiang.license.model.vo.DeviceVo"
>
SELECT de.device_id,app_name,user_name,sn,sn_bind,de.status,de.create_time,de.update_time,de.device_id IN (select
SELECT de.device_id,
de.app_id,
app_name,user_name,sn,sn_bind,de.status,de.create_time,de.update_time,de.device_id IN (select
device_id from device_black) AS blackFlag FROM device AS de
device_id from device_black) AS blackFlag FROM device AS de
JOIN apply AS app ON de.app_id = app.app_id
JOIN apply AS app ON de.app_id = app.app_id
JOIN `user` AS us ON us.user_id = app.user_id
JOIN `user` AS us ON us.user_id = app.user_id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment