Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
522821da
authored
Oct 08, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat:对外api
parent
97eed631
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
server-api/src/main/java/com/makeit/api/external/controller/IotPlatExternalController.java
server-api/src/main/java/com/makeit/api/external/controller/IotPlatExternalController.java
View file @
522821da
...
@@ -13,6 +13,7 @@ import com.makeit.global.aspect.tenant.TenantIdIgnore;
...
@@ -13,6 +13,7 @@ import com.makeit.global.aspect.tenant.TenantIdIgnore;
import
com.makeit.service.platform.alarm.PlatAlarmRecordService
;
import
com.makeit.service.platform.alarm.PlatAlarmRecordService
;
import
com.makeit.service.platform.device.PlatDeviceService
;
import
com.makeit.service.platform.device.PlatDeviceService
;
import
com.makeit.service.platform.elder.PlatElderService
;
import
com.makeit.service.platform.elder.PlatElderService
;
import
com.makeit.utils.old.StringUtils
;
import
com.makeit.vo.platform.alarm.PlatAlarmRecordVO
;
import
com.makeit.vo.platform.alarm.PlatAlarmRecordVO
;
import
com.makeit.vo.platform.device.PlatDeviceListVO
;
import
com.makeit.vo.platform.device.PlatDeviceListVO
;
import
com.makeit.vo.platform.elder.PlatElderListVO
;
import
com.makeit.vo.platform.elder.PlatElderListVO
;
...
@@ -45,6 +46,10 @@ public class IotPlatExternalController {
...
@@ -45,6 +46,10 @@ public class IotPlatExternalController {
@TenantIdIgnore
@TenantIdIgnore
@AuthIgnore
@AuthIgnore
public
ApiResponseEntity
<
PageVO
<
PlatElderListVO
>>
elderPage
(
@RequestBody
PageReqDTO
<
PlatElderQueryDTO
>
page
)
{
public
ApiResponseEntity
<
PageVO
<
PlatElderListVO
>>
elderPage
(
@RequestBody
PageReqDTO
<
PlatElderQueryDTO
>
page
)
{
PlatElderQueryDTO
dto
=
page
.
getData
();
if
(
dto
==
null
||
StringUtils
.
isEmpty
(
dto
.
getOrgId
()))
{
return
ApiResponseUtils
.
success
(
new
PageVO
<>());
}
return
ApiResponseUtils
.
success
(
platElderService
.
page
(
page
));
return
ApiResponseUtils
.
success
(
platElderService
.
page
(
page
));
}
}
...
@@ -54,6 +59,10 @@ public class IotPlatExternalController {
...
@@ -54,6 +59,10 @@ public class IotPlatExternalController {
@TenantIdIgnore
@TenantIdIgnore
@AuthIgnore
@AuthIgnore
public
ApiResponseEntity
<
PageVO
<
PlatDeviceListVO
>>
devicePage
(
@RequestBody
PageReqDTO
<
PlatDeviceQueryDTO
>
pageReqDTO
)
{
public
ApiResponseEntity
<
PageVO
<
PlatDeviceListVO
>>
devicePage
(
@RequestBody
PageReqDTO
<
PlatDeviceQueryDTO
>
pageReqDTO
)
{
PlatDeviceQueryDTO
dto
=
pageReqDTO
.
getData
();
if
(
dto
==
null
||
StringUtils
.
isEmpty
(
dto
.
getOrgId
()))
{
return
ApiResponseUtils
.
success
(
new
PageVO
<>());
}
return
ApiResponseUtils
.
success
(
platDeviceService
.
page
(
pageReqDTO
));
return
ApiResponseUtils
.
success
(
platDeviceService
.
page
(
pageReqDTO
));
}
}
...
@@ -62,8 +71,12 @@ public class IotPlatExternalController {
...
@@ -62,8 +71,12 @@ public class IotPlatExternalController {
@PostMapping
(
"alarmRecordPage"
)
@PostMapping
(
"alarmRecordPage"
)
@TenantIdIgnore
@TenantIdIgnore
@AuthIgnore
@AuthIgnore
public
ApiResponseEntity
<
PageVO
<
PlatAlarmRecordVO
>>
page
(
@RequestBody
PageReqDTO
<
PlatAlarmRecordQueryDTO
>
dto
)
{
public
ApiResponseEntity
<
PageVO
<
PlatAlarmRecordVO
>>
page
(
@RequestBody
PageReqDTO
<
PlatAlarmRecordQueryDTO
>
pageReqDTO
)
{
return
ApiResponseUtils
.
success
(
platAlarmRecordService
.
page
(
dto
));
PlatAlarmRecordQueryDTO
dto
=
pageReqDTO
.
getData
();
if
(
dto
==
null
||
StringUtils
.
isEmpty
(
dto
.
getOrgId
()))
{
return
ApiResponseUtils
.
success
(
new
PageVO
<>());
}
return
ApiResponseUtils
.
success
(
platAlarmRecordService
.
page
(
pageReqDTO
));
}
}
@ApiOperation
(
"处理告警回调"
)
@ApiOperation
(
"处理告警回调"
)
...
...
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