mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-09 08:27:47 +08:00
bugfix: LogicalClusterDTO和RegionDTO校验参数冗余 & RdLogicalClusterController解释修正
This commit is contained in:
@@ -118,10 +118,7 @@ public class LogicalClusterDTO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean legal() {
|
public boolean legal() {
|
||||||
if (ValidateUtils.isNull(clusterId)
|
if (ValidateUtils.isNull(clusterId) || ValidateUtils.isEmptyList(regionIdList) || ValidateUtils.isNull(mode)) {
|
||||||
|| ValidateUtils.isNull(clusterId)
|
|
||||||
|| ValidateUtils.isEmptyList(regionIdList)
|
|
||||||
|| ValidateUtils.isNull(mode)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!ClusterModeEnum.SHARED_MODE.getCode().equals(mode) && ValidateUtils.isNull(appId)) {
|
if (!ClusterModeEnum.SHARED_MODE.getCode().equals(mode) && ValidateUtils.isNull(appId)) {
|
||||||
|
|||||||
@@ -94,10 +94,7 @@ public class RegionDTO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean legal() {
|
public boolean legal() {
|
||||||
if (ValidateUtils.isNull(clusterId)
|
if (ValidateUtils.isNull(clusterId) || ValidateUtils.isEmptyList(brokerIdList) || ValidateUtils.isNull(status)) {
|
||||||
|| ValidateUtils.isNull(clusterId)
|
|
||||||
|| ValidateUtils.isEmptyList(brokerIdList)
|
|
||||||
|| ValidateUtils.isNull(status)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
description = ValidateUtils.isNull(description)? "": description;
|
description = ValidateUtils.isNull(description)? "": description;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class RdLogicalClusterController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询逻辑集群列表", notes = "")
|
@ApiOperation(value = "根据逻辑集群Id获取逻辑集群", notes = "")
|
||||||
@RequestMapping(value = "logical-clusters", method = RequestMethod.GET)
|
@RequestMapping(value = "logical-clusters", method = RequestMethod.GET)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Result<LogicalClusterVO> getByLogicalClusterId(@RequestParam("id") Long physicalClusterId) {
|
public Result<LogicalClusterVO> getByLogicalClusterId(@RequestParam("id") Long physicalClusterId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user