权限,列表,详情
This commit is contained in:
+7
-2
@@ -44,6 +44,7 @@ const (
|
||||
DecollatorEqual = "="
|
||||
StringEmpty = ""
|
||||
StringDot = "."
|
||||
StringZero = "0"
|
||||
StringStatusOk = "1"
|
||||
StringStatusNo = "2"
|
||||
)
|
||||
@@ -65,6 +66,7 @@ var (
|
||||
Ok = Status{Code: 10000, Msg: "OK"}
|
||||
Fail = Status{Code: 999, Msg: "fail"}
|
||||
ErrorParams = Status{Code: 10001, Msg: "缺少参数或传值不对"}
|
||||
ErrorMissingParams = Status{Code: 10001, Msg: "缺少参数"}
|
||||
ErrorEncryptAesError = Status{Code: 10001, Msg: "加密失败"}
|
||||
ErrorNotFund = Status{Code: 11001, Msg: "not fund"}
|
||||
ErrorExistUser = Status{Code: 10009, Msg: "账号或手机号已存在"}
|
||||
@@ -72,6 +74,8 @@ var (
|
||||
ErrorNoLogin = Status{Code: 10003, Msg: "没有登录"}
|
||||
ErrorAuthority = Status{Code: 10008, Msg: "没有权限"}
|
||||
ErrorNoLoginInfo = Status{Code: 10003, Msg: "没有获取到登录信息"}
|
||||
ErrorAuthorityChange = Status{Code: 10003, Msg: "该权限下有其它权限"}
|
||||
ErrorJsonDataError = Status{Code: 11008, Msg: "json数据错误"}
|
||||
|
||||
// 基础类
|
||||
ErrorExist = NewError(998, "已存在")
|
||||
@@ -107,8 +111,9 @@ var (
|
||||
ErrorBindOtherError = NewError(11013, "该设备已绑定其它用户,请不要重复绑定")
|
||||
)
|
||||
|
||||
func SetError(error Error, msg string) Error {
|
||||
return NewError(error.GetCode(), msg)
|
||||
func SetError(error Status, msg string) Status {
|
||||
error.Msg = msg
|
||||
return error
|
||||
}
|
||||
func GetLoginKey(Type, key string) string {
|
||||
return fmt.Sprintf(Login, Type) + key
|
||||
|
||||
Reference in New Issue
Block a user