权限调整

This commit is contained in:
tangcongfa_v@didichuxing.com
2021-05-13 17:49:42 +08:00
parent eb8fe77582
commit 7218aaf52e
2 changed files with 99 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
package com.xiaojukeji.kafka.manager.openapi.common.dto;
import com.xiaojukeji.kafka.manager.common.entity.dto.ClusterTopicDTO;
import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(description = "权限调整")
public class TopicAuthorityDTO extends ClusterTopicDTO {
@ApiModelProperty(value = "appId")
private String appId;
@ApiModelProperty(value = "0:无权限, 1:读, 2:写, 3:读写")
private Integer access;
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public Integer getAccess() {
return access;
}
public void setAccess(Integer access) {
this.access = access;
}
@Override
public boolean paramLegal() {
if (ValidateUtils.isNull(clusterId)
|| ValidateUtils.isNull(topicName)
|| ValidateUtils.isNull(appId)
|| ValidateUtils.isNull(access)) {
return false;
}
return true;
}
}