u
This commit is contained in:
1 parent
83cbf18572
commit
5ca04f85ca
32 files changed
+1308
-1804
No files matched your search
@@ -129,6 +129,13 @@ func TimestampToMillis(ts pgtype.Timestamp) int64 {
|
||||
return ts.Time.UnixMilli()
|
||||
}
|
||||
|
||||
func TimestamptzToMillis(ts pgtype.Timestamptz) int64 {
|
||||
if !ts.Valid {
|
||||
return 0
|
||||
}
|
||||
return ts.Time.UnixMilli()
|
||||
}
|
||||
|
||||
func DateToString(d pgtype.Date) string {
|
||||
if !d.Valid {
|
||||
return ""
|
||||
|
||||
@@ -17,15 +17,17 @@ type Result struct {
|
||||
|
||||
// HttpCode 响应状态码
|
||||
var HttpCode = struct {
|
||||
Success int
|
||||
Unauthorized int
|
||||
Fail int
|
||||
RefreshToken int
|
||||
Success int
|
||||
Unauthorized int
|
||||
Fail int
|
||||
ErrSpaceRequired int
|
||||
ErrSpaceNoPermission int
|
||||
}{
|
||||
Success: 200,
|
||||
Unauthorized: 401,
|
||||
Fail: 500,
|
||||
RefreshToken: 402,
|
||||
Success: 200,
|
||||
Unauthorized: 401,
|
||||
Fail: 500,
|
||||
ErrSpaceRequired: 501,
|
||||
ErrSpaceNoPermission: 502,
|
||||
}
|
||||
|
||||
// Builder 响应构建器
|
||||
|
||||
Reference in new issue
Block a user