代码调整
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
package com.njcn.gather.icd.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2025-02-11
|
||||
*/
|
||||
public interface PqIcdPathValidMessage {
|
||||
String ID_NOT_BLANK = "id不能为空,请检查id参数";
|
||||
String ID_FORMAT_ERROR = "id格式错误,请检查id参数";
|
||||
String NAME_NOT_BLANK = "名称不能为空";
|
||||
String PATH_NOT_BLANK = "icd存储路径不能为空";
|
||||
String NAME_FORMAT_ERROR = "名称格式错误,只能包含字母、数字、中文、下划线、中划线、点号,长度为1-50个字符";
|
||||
String PATH_FORMAT_ERROR = "ICD路径格式错误";
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.gather.icd.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.gather.icd.pojo.constant.PqIcdPathValidMessage;
|
||||
import com.njcn.gather.type.pojo.constant.DevTypeValidMessage;
|
||||
import com.njcn.gather.pojo.constant.DetectionValidMessage;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -18,13 +17,13 @@ import javax.validation.constraints.Pattern;
|
||||
@Data
|
||||
public class PqIcdPathParam {
|
||||
@ApiModelProperty(value = "名称", required = true)
|
||||
@NotBlank(message = PqIcdPathValidMessage.NAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.ICD_NAME_REGEX, message = PqIcdPathValidMessage.NAME_FORMAT_ERROR)
|
||||
@NotBlank(message = DetectionValidMessage.NAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.ICD_NAME_REGEX, message = DetectionValidMessage.ICD_NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "存储路径", required = true)
|
||||
@NotBlank(message = PqIcdPathValidMessage.PATH_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.ICD_PATH_REGEX, message = PqIcdPathValidMessage.PATH_FORMAT_ERROR)
|
||||
@NotBlank(message = DetectionValidMessage.ICD_PATH_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.ICD_PATH_REGEX, message = DetectionValidMessage.ICD_PATH_FORMAT_ERROR)
|
||||
private String path;
|
||||
|
||||
/**
|
||||
@@ -45,8 +44,8 @@ public class PqIcdPathParam {
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class UpdateParam extends PqIcdPathParam {
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
@NotBlank(message = PqIcdPathValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = PqIcdPathValidMessage.ID_FORMAT_ERROR)
|
||||
@NotBlank(message = DetectionValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user