You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
771 B
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.supervision.dto.robot;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class ParamCheckDTO {
private String paramName;
private String paramDesc;
/**
* 错误类型 1参数缺失 2参数值错误 3参数类型错误
*/
private Integer errorType;
public String toMessage(){
if (Integer.valueOf(1).equals(errorType)){
return String.format("参数%s缺失",paramName);
}
if (Integer.valueOf(2).equals(errorType)){
return String.format("参数%s值错误",paramName);
}
if (Integer.valueOf(3).equals(errorType)){
return String.format("参数%s类型错误",paramName);
}
return "";
}
}