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
234b7e94
Commit
234b7e94
authored
Dec 01, 2022
by
ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增查询绑定状态接口
parent
8ee9100e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
0 deletions
+34
-0
TerminalDeviceController.java
.../sixiang/license/controller/TerminalDeviceController.java
+6
-0
DeviceService.java
.../main/java/iot/sixiang/license/service/DeviceService.java
+3
-0
TerminalDeviceService.java
...va/iot/sixiang/license/service/TerminalDeviceService.java
+2
-0
DeviceServiceImpl.java
...a/iot/sixiang/license/service/impl/DeviceServiceImpl.java
+14
-0
TerminalDeviceServiceImpl.java
...xiang/license/service/impl/TerminalDeviceServiceImpl.java
+9
-0
No files found.
license/src/main/java/iot/sixiang/license/controller/TerminalDeviceController.java
View file @
234b7e94
...
...
@@ -48,4 +48,10 @@ public class TerminalDeviceController {
public
BaseResult
terminalDevieunBind
(
@RequestBody
TerminalDevieUnBindDTO
terminalDevieUnBindDTO
)
{
return
terminalDeviceService
.
terminalDeviceunBind
(
terminalDevieUnBindDTO
);
}
@GetMapping
(
"/get_bind_status"
)
@ApiOperation
(
value
=
"获取终端设备绑定状态接口"
,
notes
=
"获取终端设备绑定状态接口"
)
public
ResResult
getBindStatus
(
TerminalDevieUnBindDTO
terminalDevieUnBindDTO
)
{
return
terminalDeviceService
.
getBindStatus
(
terminalDevieUnBindDTO
);
}
}
license/src/main/java/iot/sixiang/license/service/DeviceService.java
View file @
234b7e94
...
...
@@ -3,6 +3,7 @@ package iot.sixiang.license.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
iot.sixiang.license.entity.Device
;
import
iot.sixiang.license.model.PageInfoModel
;
import
iot.sixiang.license.model.ResResult
;
import
iot.sixiang.license.model.dto.TerminalDevieBindDTO
;
import
iot.sixiang.license.model.dto.TerminalDevieUnBindDTO
;
import
iot.sixiang.license.model.vo.DeviceVo
;
...
...
@@ -21,4 +22,6 @@ public interface DeviceService extends IService<Device> {
Boolean
terminalDevieBind
(
TerminalDevieBindDTO
terminalDevieBindDTO
);
Boolean
terminalDevieunBind
(
TerminalDevieUnBindDTO
terminalDevieUnBindDTO
);
ResResult
getBindStatus
(
TerminalDevieUnBindDTO
terminalDevieUnBindDTO
);
}
license/src/main/java/iot/sixiang/license/service/TerminalDeviceService.java
View file @
234b7e94
...
...
@@ -17,4 +17,6 @@ public interface TerminalDeviceService {
BaseResult
terminalDeviceBind
(
TerminalDevieBindDTO
terminalDevieBindDTO
);
BaseResult
terminalDeviceunBind
(
TerminalDevieUnBindDTO
terminalDevieUnBindDTO
);
ResResult
getBindStatus
(
TerminalDevieUnBindDTO
terminalDevieUnBindDTO
);
}
license/src/main/java/iot/sixiang/license/service/impl/DeviceServiceImpl.java
View file @
234b7e94
...
...
@@ -8,6 +8,7 @@ import iot.sixiang.license.entity.Device;
import
iot.sixiang.license.handler.IotLicenseException
;
import
iot.sixiang.license.mapper.DeviceMapper
;
import
iot.sixiang.license.model.PageInfoModel
;
import
iot.sixiang.license.model.ResResult
;
import
iot.sixiang.license.model.dto.TerminalDevieBindDTO
;
import
iot.sixiang.license.model.dto.TerminalDevieUnBindDTO
;
import
iot.sixiang.license.model.vo.DeviceVo
;
...
...
@@ -123,4 +124,17 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
}
return
false
;
}
@Override
public
ResResult
getBindStatus
(
TerminalDevieUnBindDTO
terminalDevieUnBindDTO
)
{
String
snBind
=
terminalDevieUnBindDTO
.
getSnBind
();
LambdaQueryWrapper
<
Device
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
Device:
:
getSnBind
,
snBind
).
last
(
"limit 1"
);
Device
device
=
deviceMapper
.
selectOne
(
queryWrapper
);
if
(
device
!=
null
)
{
return
ResResult
.
success
().
record
(
device
.
getSn
());
}
else
{
return
new
ResResult
(
405
,
"未绑定"
);
}
}
}
license/src/main/java/iot/sixiang/license/service/impl/TerminalDeviceServiceImpl.java
View file @
234b7e94
...
...
@@ -123,4 +123,13 @@ public class TerminalDeviceServiceImpl implements TerminalDeviceService {
return
BaseResult
.
failed
();
}
}
@Override
public
ResResult
getBindStatus
(
TerminalDevieUnBindDTO
terminalDevieUnBindDTO
)
{
String
snBind
=
terminalDevieUnBindDTO
.
getSnBind
();
if
(
StringUtils
.
isEmpty
(
snBind
))
{
return
ResResult
.
validate_failed
();
}
return
deviceService
.
getBindStatus
(
terminalDevieUnBindDTO
);
}
}
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