Commit b3eff83a by huangjy

fix:划拨组织批量

parent 22aef231
...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.util.List;
/** /**
* <p> * <p>
...@@ -22,6 +23,9 @@ public class PlatDeviceBindOrgDTO { ...@@ -22,6 +23,9 @@ public class PlatDeviceBindOrgDTO {
@ApiModelProperty(value = "设备id") @ApiModelProperty(value = "设备id")
@NotBlank(message = "设备id不能为空") @NotBlank(message = "设备id不能为空")
private String id; private String id;
@ApiModelProperty(value = "设备id集合")
@NotBlank(message = "设备id不能为空")
private List<String> idList;
@ApiModelProperty(value = "组织id") @ApiModelProperty(value = "组织id")
@NotBlank(message = "组织id不能为空") @NotBlank(message = "组织id不能为空")
private String orgId; private String orgId;
......
...@@ -719,6 +719,6 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev ...@@ -719,6 +719,6 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
public void bindOrg(PlatDeviceBindOrgDTO dto) { public void bindOrg(PlatDeviceBindOrgDTO dto) {
update(new UpdateWrapper<PlatDevice>().lambda() update(new UpdateWrapper<PlatDevice>().lambda()
.set(PlatDevice::getOrgId,dto.getOrgId()) .set(PlatDevice::getOrgId,dto.getOrgId())
.eq(BaseEntity::getId,dto.getId())); .in(BaseEntity::getId,dto.getIdList()));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment