mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-29 07:56:37 +08:00
5a1fc808b2
- Add batch delete, redeploy, and change-tunnel for forwards - Add batch delete and redeploy for tunnels - Add batch delete for nodes - Add multi-select UI with floating toolbar on all three pages - Create DTOs: BatchDeleteDto, BatchRedeployDto, BatchChangeTunnelDto, BatchOperationResultDto
40 lines
865 B
Java
40 lines
865 B
Java
package com.admin.common.dto;
|
|
|
|
import lombok.Data;
|
|
import java.util.List;
|
|
import java.util.ArrayList;
|
|
|
|
@Data
|
|
public class BatchOperationResultDto {
|
|
|
|
private int successCount;
|
|
private int failCount;
|
|
private List<FailedItem> failedItems = new ArrayList<>();
|
|
|
|
@Data
|
|
public static class FailedItem {
|
|
private Long id;
|
|
private String reason;
|
|
|
|
public FailedItem() {}
|
|
|
|
public FailedItem(Long id, String reason) {
|
|
this.id = id;
|
|
this.reason = reason;
|
|
}
|
|
}
|
|
|
|
public void addFailedItem(Long id, String reason) {
|
|
this.failedItems.add(new FailedItem(id, reason));
|
|
this.failCount++;
|
|
}
|
|
|
|
public void incrementSuccess() {
|
|
this.successCount++;
|
|
}
|
|
|
|
public boolean isAllSuccess() {
|
|
return failCount == 0;
|
|
}
|
|
}
|