mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
5.0
This commit is contained in:
@@ -65,6 +65,10 @@ public class OpenStoryImpl implements OpenStory {
|
||||
if (id == null || id == 0) {
|
||||
throw new OpenException(StoryMessageEnum.ISV_PARAM_ERROR, "id is null or 0");
|
||||
}
|
||||
if (id < 0) {
|
||||
// 自定义code, msg
|
||||
throw new OpenException("4000", "id必须大于0");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package com.gitee.sop.storyweb.message;
|
||||
|
||||
import com.gitee.sop.support.message.OpenError;
|
||||
import com.gitee.sop.support.message.I18nMessage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -9,24 +9,12 @@ import lombok.Getter;
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum StoryMessageEnum implements OpenError {
|
||||
/**
|
||||
* 未知错误
|
||||
*/
|
||||
ISP_UNKNOWN_ERROR("isp.service-unknown-error"),
|
||||
public enum StoryMessageEnum implements I18nMessage {
|
||||
/**
|
||||
* 参数错误
|
||||
*/
|
||||
ISV_PARAM_ERROR("isv.invalid-parameter"),
|
||||
/**
|
||||
* 通用错误
|
||||
*/
|
||||
ISV_COMMON_ERROR("isv.common-error");
|
||||
ISV_PARAM_ERROR("isv.invalid-parameter");
|
||||
|
||||
private final String subCode;
|
||||
private final String configKey;
|
||||
|
||||
@Override
|
||||
public String modulePrefix() {
|
||||
return "isp.error_";
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,2 @@
|
||||
isv.invalid-parameter=Invalid parameter, {0}
|
||||
isv.invalid-parameter.solution=Check doc api and input right parameter.
|
@@ -0,0 +1,2 @@
|
||||
isv.invalid-parameter=\u53c2\u6570\u65e0\u6548, {0}
|
||||
isv.invalid-parameter.solution=\u67e5\u770b\u63a5\u53e3\u6587\u6863\u5e76\u8f93\u5165\u6b63\u786e\u7684\u53c2\u6570
|
@@ -1,10 +0,0 @@
|
||||
# 错误配置
|
||||
|
||||
# 系统配置
|
||||
isp.error_isv.common-error=The system is busy.
|
||||
isp.error_isv.invalid-parameter=Invalid parameter, {0}
|
||||
|
||||
# ==== 参数配置 ====
|
||||
|
||||
goods.remark.notNull=The goods_remark can not be null
|
||||
goods.comment.length=The goods_comment length must >= {0} and <= {1}
|
@@ -1,14 +0,0 @@
|
||||
# 错误配置
|
||||
|
||||
# 系统繁忙
|
||||
isp.error_isv.common-error=\u7cfb\u7edf\u7e41\u5fd9
|
||||
# 参数无效
|
||||
isp.error_isv.invalid-parameter=\u53c2\u6570\u65e0\u6548, {0}
|
||||
|
||||
# ==== 参数配置 ====
|
||||
|
||||
# 商品备注不能为空
|
||||
goods.remark.notNull=\u5546\u54c1\u5907\u6ce8\u4e0d\u80fd\u4e3a\u7a7a
|
||||
# 商品评论长度必须在{0}和{1}之间
|
||||
goods.comment.length=\u5546\u54c1\u8bc4\u8bba\u957f\u5ea6\u5fc5\u987b\u5728{0}\u548c{1}\u4e4b\u95f4
|
||||
|
@@ -1,2 +0,0 @@
|
||||
isp.goods_error_100=the goods_name can NOT be null
|
||||
isp.goods_error_101=the goods_name must bigger than {0}
|
@@ -1,5 +0,0 @@
|
||||
# 商品名字不能为空
|
||||
isp.goods_error_100=\u5546\u54C1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A
|
||||
|
||||
# 商品名称太短,不能小于{0}个字
|
||||
isp.goods_error_101=\u5546\u54C1\u540D\u79F0\u592A\u77ED\uFF0C\u4E0D\u80FD\u5C0F\u4E8E{0}\u4E2A\u5B57
|
Reference in New Issue
Block a user