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
0e215e5d
authored
Nov 16, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:划拨组织批量
parent
5ad46f03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
4 deletions
server-module/src/main/java/com/makeit/module/controller/device/PlatDeviceController.java
server-service/src/main/java/com/makeit/dto/platform/device/PlatDeviceBindOrgDTO.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-module/src/main/java/com/makeit/module/controller/device/PlatDeviceController.java
View file @
0e215e5d
...
...
@@ -68,7 +68,7 @@ public class PlatDeviceController {
@ApiOperation
(
"划拨组织"
)
@PostMapping
(
"bindOrg"
)
public
ApiResponseEntity
<
PlatDeviceViewVO
>
bindOrg
(
@
Validated
@
RequestBody
PlatDeviceBindOrgDTO
platDeviceBindOrgDTO
)
{
public
ApiResponseEntity
<
PlatDeviceViewVO
>
bindOrg
(
@RequestBody
PlatDeviceBindOrgDTO
platDeviceBindOrgDTO
)
{
platDeviceService
.
bindOrg
(
platDeviceBindOrgDTO
);
return
ApiResponseUtils
.
success
();
}
...
...
server-service/src/main/java/com/makeit/dto/platform/device/PlatDeviceBindOrgDTO.java
View file @
0e215e5d
...
...
@@ -19,9 +19,7 @@ import java.util.List;
@ApiModel
(
value
=
"设备划拨组织对象"
,
description
=
"设备划拨组织"
)
public
class
PlatDeviceBindOrgDTO
{
@ApiModelProperty
(
value
=
"设备id集合"
)
@NotBlank
(
message
=
"设备id不能为空"
)
private
List
<
String
>
idList
;
@ApiModelProperty
(
value
=
"组织id"
)
@NotBlank
(
message
=
"组织id不能为空"
)
...
...
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
0e215e5d
...
...
@@ -719,6 +719,6 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
public
void
bindOrg
(
PlatDeviceBindOrgDTO
dto
)
{
update
(
new
UpdateWrapper
<
PlatDevice
>().
lambda
()
.
set
(
PlatDevice:
:
getOrgId
,
dto
.
getOrgId
())
.
in
(
BaseEntity:
:
getId
,
dto
.
getIdList
()));
.
in
(
CollectionUtils
.
isNotEmpty
(
dto
.
getIdList
()),
BaseEntity:
:
getId
,
dto
.
getIdList
()));
}
}
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