代码调整

This commit is contained in:
caozehui
2025-03-28 15:06:57 +08:00
parent 48408859b1
commit 71ba7fa139
31 changed files with 296 additions and 414 deletions

View File

@@ -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路径格式错误";
}

View File

@@ -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;
}
}