add v2.2.0 feature & fix

This commit is contained in:
zengqiao
2021-01-23 13:19:29 +08:00
parent fc109fd1b1
commit 850d43df63
34 changed files with 429 additions and 156 deletions

View File

@@ -40,8 +40,7 @@ public class NormalAccountController {
public Result<List<AccountSummaryVO>> searchOnJobStaffByKeyWord(@RequestParam("keyWord") String keyWord) {
List<EnterpriseStaff> staffList = accountService.searchAccountByPrefix(keyWord);
if (ValidateUtils.isEmptyList(staffList)) {
LOGGER.info("class=NormalAccountController||method=searchOnJobStaffByKeyWord||keyWord={}||msg=staffList is empty!"
,keyWord);
LOGGER.info("class=NormalAccountController||method=searchOnJobStaffByKeyWord||keyWord={}||msg=staffList is empty!", keyWord);
return new Result<>();
}
List<AccountSummaryVO> voList = new ArrayList<>();

View File

@@ -69,7 +69,8 @@ public class NormalTopicController {
}
return new Result<>(TopicModelConverter.convert2TopicBasicVO(
topicService.getTopicBasicDTO(physicalClusterId, topicName),
clusterService.getById(physicalClusterId)
clusterService.getById(physicalClusterId),
logicalClusterMetadataManager.getTopicLogicalClusterId(physicalClusterId, topicName)
));
}

View File

@@ -166,7 +166,7 @@ public class OpUtilsController {
if (!ResultStatus.SUCCESS.equals(rs)) {
return Result.buildFrom(rs);
}
topicManagerService.modifyTopic(dto.getClusterId(), dto.getTopicName(), dto.getDescription(), operator);
topicManagerService.modifyTopicByOp(dto.getClusterId(), dto.getTopicName(), dto.getAppId(), dto.getDescription(), operator);
return new Result();
}

View File

@@ -55,6 +55,7 @@ public class ClusterModelConverter {
CopyUtils.copyProperties(vo, logicalCluster);
vo.setClusterId(logicalCluster.getLogicalClusterId());
vo.setClusterName(logicalCluster.getLogicalClusterName());
vo.setClusterIdentification(logicalCluster.getLogicalClusterIdentification());
return vo;
}
@@ -78,9 +79,8 @@ public class ClusterModelConverter {
ClusterDO clusterDO = new ClusterDO();
CopyUtils.copyProperties(clusterDO, reqObj);
clusterDO.setId(reqObj.getClusterId());
clusterDO.setSecurityProperties(
ValidateUtils.isNull(clusterDO.getSecurityProperties())? "": clusterDO.getSecurityProperties()
);
clusterDO.setSecurityProperties(ValidateUtils.isNull(reqObj.getSecurityProperties())? "": reqObj.getSecurityProperties());
clusterDO.setJmxProperties(ValidateUtils.isNull(reqObj.getJmxProperties())? "": reqObj.getJmxProperties());
return clusterDO;
}

View File

@@ -21,6 +21,7 @@ public class LogicalClusterModelConverter {
LogicalClusterVO vo = new LogicalClusterVO();
vo.setLogicalClusterId(logicalClusterDO.getId());
vo.setLogicalClusterName(logicalClusterDO.getName());
vo.setLogicalClusterIdentification(logicalClusterDO.getIdentification());
vo.setPhysicalClusterId(logicalClusterDO.getClusterId());
vo.setMode(logicalClusterDO.getMode());
vo.setRegionIdList(ListUtils.string2LongList(logicalClusterDO.getRegionList()));
@@ -45,6 +46,7 @@ public class LogicalClusterModelConverter {
public static LogicalClusterDO convert2LogicalClusterDO(LogicalClusterDTO dto) {
LogicalClusterDO logicalClusterDO = new LogicalClusterDO();
logicalClusterDO.setName(dto.getName());
logicalClusterDO.setIdentification(dto.getIdentification());
logicalClusterDO.setClusterId(dto.getClusterId());
logicalClusterDO.setRegionList(ListUtils.longList2String(dto.getRegionIdList()));
logicalClusterDO.setMode(dto.getMode());

View File

@@ -22,9 +22,9 @@ import java.util.List;
* @date 2017/6/1.
*/
public class TopicModelConverter {
public static TopicBasicVO convert2TopicBasicVO(TopicBasicDTO dto, ClusterDO clusterDO) {
public static TopicBasicVO convert2TopicBasicVO(TopicBasicDTO dto, ClusterDO clusterDO, Long logicalClusterId) {
TopicBasicVO vo = new TopicBasicVO();
vo.setClusterId(dto.getClusterId());
vo.setClusterId(logicalClusterId);
vo.setAppId(dto.getAppId());
vo.setAppName(dto.getAppName());
vo.setPartitionNum(dto.getPartitionNum());