增加简单的部署打包脚本
增加 Dubbo 参数校验
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<artifactId>admin-service-api</artifactId>
|
||||
<dependencies>
|
||||
@@ -17,9 +18,8 @@
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>admin-service-api</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package cn.iocoder.mall.admin.api;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.admin.api.bo.ResourceBO;
|
||||
import cn.iocoder.mall.admin.api.dto.ResourceAddDTO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -9,4 +11,6 @@ public interface ResourceService {
|
||||
|
||||
List<ResourceBO> getResourceByTypeAndRoleIds(Integer type, Set<Integer> roleIds);
|
||||
|
||||
CommonResult<ResourceBO> addResource(ResourceAddDTO resourceAddDTO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package cn.iocoder.mall.admin.api.dto;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 资源添加 DTO
|
||||
*/
|
||||
public class ResourceAddDTO {
|
||||
|
||||
/**
|
||||
* 资源名字(标识)
|
||||
*/
|
||||
@NotEmpty(message = "资源名字不能为空")
|
||||
private String name;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@NotNull(message = "类型不能为空")
|
||||
private Integer type;
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
@NotNull(message = "类型不能为空")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 展示名
|
||||
*/
|
||||
@NotEmpty(message = "资源名字不能为空")
|
||||
private String displayName;
|
||||
/**
|
||||
* 父资源比那好
|
||||
*/
|
||||
private Integer pid;
|
||||
/**
|
||||
* 操作
|
||||
*/
|
||||
private String handler;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public ResourceAddDTO setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public ResourceAddDTO setType(Integer type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public ResourceAddDTO setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public ResourceAddDTO setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public ResourceAddDTO setPid(Integer pid) {
|
||||
this.pid = pid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getHandler() {
|
||||
return handler;
|
||||
}
|
||||
|
||||
public ResourceAddDTO setHandler(String handler) {
|
||||
this.handler = handler;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user