rts-sim-testing-service/dto/error.go

32 lines
719 B
Go
Raw Normal View History

package dto
type ErrorCode int
// 1xxx表示各种逻辑错误
// 2xxx表示各种数据错误
// 3xxx表示各种参数错误
const (
LogicError = 1000
2023-09-12 10:00:13 +08:00
DynamicsError = 1001
DataNotExist = 2000
DataAlreadyExist = 2001
// DataOperationError 数据操作错误(增删改查操作出了意料之外的错误都算)
DataOperationError = 2002
ArgumentParseError = 3000
2023-08-30 14:26:48 +08:00
NoAuthOperationError = 4001
2023-08-30 18:05:11 +08:00
QueryDBError = 5000
)
2023-09-04 11:12:57 +08:00
var ErrorTipMap = map[int]string{
1000: "系统内部出错",
2023-09-12 10:00:13 +08:00
1001: "动力学接口出错",
2023-09-04 11:12:57 +08:00
2000: "数据不存在",
2001: "数据已经存在",
2002: "数据操作错误",
3000: "输入参数格式错误",
4001: "无权限操作",
5000: "数据库操作错误",
}