mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 18:15:56 +08:00
update-修改常量命名
This commit is contained in:
parent
e7630e0da6
commit
b68410ca45
@ -82,5 +82,5 @@ public interface FlowConstant {
|
|||||||
/**
|
/**
|
||||||
* 模型标识key命名规范正则表达式
|
* 模型标识key命名规范正则表达式
|
||||||
*/
|
*/
|
||||||
String MODE_KEY_PATTERN = "^[a-zA-Z][a-zA-Z0-9_]{0,254}$";
|
String MODEL_KEY_PATTERN = "^[a-zA-Z][a-zA-Z0-9_]{0,254}$";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@ public class ModelBo extends PageEntity implements Serializable {
|
|||||||
* 模型标识key
|
* 模型标识key
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "模型标识key不能为空", groups = {AddGroup.class})
|
@NotBlank(message = "模型标识key不能为空", groups = {AddGroup.class})
|
||||||
@Pattern(regexp = FlowConstant.MODE_KEY_PATTERN, message = "模型标识key只能字符或者下划线开头", groups = {AddGroup.class})
|
@Pattern(regexp = FlowConstant.MODEL_KEY_PATTERN, message = "模型标识key只能字符或者下划线开头", groups = {AddGroup.class})
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -229,7 +229,7 @@ public class ActModelServiceImpl implements IActModelService {
|
|||||||
// 获取唯一标识key
|
// 获取唯一标识key
|
||||||
String key = values.getFirst("key");
|
String key = values.getFirst("key");
|
||||||
// 校验key命名规范
|
// 校验key命名规范
|
||||||
if (!Validator.isMatchRegex(FlowConstant.MODE_KEY_PATTERN, key)) {
|
if (!Validator.isMatchRegex(FlowConstant.MODEL_KEY_PATTERN, key)) {
|
||||||
throw new ServiceException("模型标识key只能字符或者下划线开头!");
|
throw new ServiceException("模型标识key只能字符或者下划线开头!");
|
||||||
}
|
}
|
||||||
List<Model> list = repositoryService.createModelQuery().modelKey(key).modelTenantId(TenantHelper.getTenantId()).list();
|
List<Model> list = repositoryService.createModelQuery().modelKey(key).modelTenantId(TenantHelper.getTenantId()).list();
|
||||||
@ -245,7 +245,7 @@ public class ActModelServiceImpl implements IActModelService {
|
|||||||
if (StringUtils.isBlank(processId)) {
|
if (StringUtils.isBlank(processId)) {
|
||||||
throw new ServiceException("流程标识不能为空!");
|
throw new ServiceException("流程标识不能为空!");
|
||||||
}
|
}
|
||||||
if (!Validator.isMatchRegex(FlowConstant.MODE_KEY_PATTERN, processId)) {
|
if (!Validator.isMatchRegex(FlowConstant.MODEL_KEY_PATTERN, processId)) {
|
||||||
throw new ServiceException("流程标识只能字符或者下划线开头!");
|
throw new ServiceException("流程标识只能字符或者下划线开头!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user