实现通过直播间获取furry等
用户信息新增直播间房间号字段 能用了,但不是很好用
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
package exception
|
||||
|
||||
/**
|
||||
4xxx 数据库异常
|
||||
5xxx 业务逻辑异常
|
||||
6xxx 网络API异常
|
||||
*/
|
||||
|
||||
func InternalError(msg string) BaseError {
|
||||
shortMsg := "系统异常,请联系管理员"
|
||||
return BaseError{Code: 500, Msg: msg, ShortMsg: shortMsg}
|
||||
@@ -7,20 +13,30 @@ func InternalError(msg string) BaseError {
|
||||
|
||||
func ErrFetchUserInfo(msg string) BaseError {
|
||||
shortMsg := "用户信息获取失败"
|
||||
return BaseError{Code: 4001, Msg: msg, ShortMsg: shortMsg}
|
||||
}
|
||||
|
||||
func ErrFetchStat(msg string) BaseError {
|
||||
shortMsg := "获取用户统计信息失败"
|
||||
return BaseError{Code: 4002, Msg: msg, ShortMsg: shortMsg}
|
||||
}
|
||||
|
||||
func ErrUserMismatch(msg string) BaseError {
|
||||
shortMsg := "操作的两个用户不匹配"
|
||||
return BaseError{Code: 5001, Msg: msg, ShortMsg: shortMsg}
|
||||
}
|
||||
|
||||
func ErrFetchFurries(msg string) BaseError {
|
||||
shortMsg := "获取Furry列表失败"
|
||||
return BaseError{Code: 5002, Msg: msg, ShortMsg: shortMsg}
|
||||
return BaseError{Code: 6001, Msg: msg, ShortMsg: shortMsg}
|
||||
}
|
||||
|
||||
func ErrUserMismatch(msg string) BaseError {
|
||||
shortMsg := "操作的两个用户不匹配"
|
||||
return BaseError{Code: 5003, Msg: msg, ShortMsg: shortMsg}
|
||||
func ErrSearchVideo(msg string) BaseError {
|
||||
shortMsg := "分类视频搜索失败"
|
||||
return BaseError{Code: 6002, Msg: msg, ShortMsg: shortMsg}
|
||||
}
|
||||
|
||||
func ErrFetchStat(msg string) BaseError {
|
||||
shortMsg := "获取用户统计信息失败"
|
||||
return BaseError{Code: 5004, Msg: msg, ShortMsg: shortMsg}
|
||||
func ErrSearchLiveRoom(msg string) BaseError {
|
||||
shortMsg := "直播间搜索失败"
|
||||
return BaseError{Code: 6003, Msg: msg, ShortMsg: shortMsg}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user