All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.doudou.common.tool.client.SuggestiveLanguage Maven / Gradle / Ivy

There is a newer version: 1.3.2
Show newest version
package top.doudou.common.tool.client;

import java.io.Serializable;

/**
 * @author  傻男人<[email protected]>
 * @Date: 2020/8/17 13:31
 * @Version: 1.0
 * @Description: 提示语
 */
public class SuggestiveLanguage implements Serializable {

    public final static String PRIMARY_NOT_NULL = "主键id不能为空";

    public final static String NAME_REPEAT = "名字已经被使用";

    public final static String NOT_REPEAT = "不能重复";

    public final static String NON_EXISTENT = "不存在";

    public final static String NOT_EMPTY = "不能为空";

    public final static String PARAMETER_ERROR = "参数错误";

    public final static String CLIENT_CALL_RETURN_NULL = "远程调用返回数据为null";

    /**
     * 名字重复
     * @param name
     * @return
     */
    public static String nameRepeat(String name){ return name + NAME_REPEAT; }

    /**
     * 名字不能重复
     * @param name
     * @return
     */
    public static String notRepeat(String name){ return name + NAME_REPEAT; }

    /**
     * 参数不存在
     * @param parameter
     * @return
     */
    public static String nonExistent(String parameter){
        return parameter + NON_EXISTENT;
    }

    /**
     * 参数不能为空
     * @param parameter
     * @return
     */
    public static String notEmpty(String parameter){
        return parameter + NOT_EMPTY;
    }

    /**
     * 参数错误
     * @param parameter
     * @return
     */
    public static String parameterError(String parameter){
        return parameter + PARAMETER_ERROR;
    }

    /**
     * 远程调用异常结果
     * @param parameter
     * @return
     */
    public static String clientCall(String parameter){
        return "远程调用失败,失败得信息为:"+parameter;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy