♻️ 转移到 Dealer #5
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
/dist
|
/dist
|
||||||
/uploads
|
/uploads
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
@ -4,14 +4,8 @@
|
|||||||
<option name="autoReloadType" value="ALL" />
|
<option name="autoReloadType" value="ALL" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":recycle: Refactored relation system :arrow_up: Support new realm & relation api">
|
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix model relation issue">
|
||||||
<change beforePath="$PROJECT_DIR$/pkg/internal/grpc/notifier.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/grpc/notifier.go" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/pkg/internal/models/notifications.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/models/notifications.go" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/pkg/internal/server/admin/notify_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/admin/notify_api.go" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/pkg/internal/server/api/notifications_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/notifications_api.go" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/pkg/internal/server/api/notify_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/notify_api.go" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/notifications.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/notifications.go" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/relationships.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/relationships.go" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -94,6 +88,7 @@
|
|||||||
<myKeys>
|
<myKeys>
|
||||||
<visibility group="Grunt" flag="true" />
|
<visibility group="Grunt" flag="true" />
|
||||||
<visibility group="Gulp" flag="true" />
|
<visibility group="Gulp" flag="true" />
|
||||||
|
<visibility group="HTTP Requests" flag="true" />
|
||||||
<visibility group="HTTP 请求" flag="true" />
|
<visibility group="HTTP 请求" flag="true" />
|
||||||
<visibility group="Recent projects" flag="true" />
|
<visibility group="Recent projects" flag="true" />
|
||||||
<visibility group="Run configurations" flag="true" />
|
<visibility group="Run configurations" flag="true" />
|
||||||
@ -157,7 +152,6 @@
|
|||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value=":bug: Fix status validation issue" />
|
|
||||||
<MESSAGE value=":bug: Fix bugs in status" />
|
<MESSAGE value=":bug: Fix bugs in status" />
|
||||||
<MESSAGE value=":bug: Fix status query condition" />
|
<MESSAGE value=":bug: Fix status query condition" />
|
||||||
<MESSAGE value=":bug: Fix disturbable condition" />
|
<MESSAGE value=":bug: Fix disturbable condition" />
|
||||||
@ -182,7 +176,8 @@
|
|||||||
<MESSAGE value=":bug: Fix oauth ticket need mfa" />
|
<MESSAGE value=":bug: Fix oauth ticket need mfa" />
|
||||||
<MESSAGE value=":arrow_up: Support new auth api" />
|
<MESSAGE value=":arrow_up: Support new auth api" />
|
||||||
<MESSAGE value=":recycle: Refactored relation system :arrow_up: Support new realm & relation api" />
|
<MESSAGE value=":recycle: Refactored relation system :arrow_up: Support new realm & relation api" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value=":recycle: Refactored relation system :arrow_up: Support new realm & relation api" />
|
<MESSAGE value=":bug: Fix model relation issue" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix model relation issue" />
|
||||||
</component>
|
</component>
|
||||||
<component name="VgoProject">
|
<component name="VgoProject">
|
||||||
<settings-migrated>true</settings-migrated>
|
<settings-migrated>true</settings-migrated>
|
||||||
|
2
go.mod
2
go.mod
@ -6,7 +6,7 @@ toolchain go1.22.1
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
firebase.google.com/go v3.13.0+incompatible
|
firebase.google.com/go v3.13.0+incompatible
|
||||||
git.solsynth.dev/hydrogen/dealer v0.0.0-20240715154745-ab0b491f45ff
|
git.solsynth.dev/hydrogen/dealer v0.0.0-20240716024524-cfb73fde1951
|
||||||
git.solsynth.dev/hydrogen/paperclip v0.0.0-20240622051057-0f56dba45745
|
git.solsynth.dev/hydrogen/paperclip v0.0.0-20240622051057-0f56dba45745
|
||||||
github.com/go-playground/validator/v10 v10.17.0
|
github.com/go-playground/validator/v10 v10.17.0
|
||||||
github.com/gofiber/fiber/v2 v2.52.4
|
github.com/gofiber/fiber/v2 v2.52.4
|
||||||
|
2
go.sum
2
go.sum
@ -29,6 +29,8 @@ git.solsynth.dev/hydrogen/dealer v0.0.0-20240715154526-59bda7a4117a h1:ozV2DWlcS
|
|||||||
git.solsynth.dev/hydrogen/dealer v0.0.0-20240715154526-59bda7a4117a/go.mod h1:eZwAwP7ahL7TO8GWBlYFYDdjlna+8zHYbDfNabnuUEU=
|
git.solsynth.dev/hydrogen/dealer v0.0.0-20240715154526-59bda7a4117a/go.mod h1:eZwAwP7ahL7TO8GWBlYFYDdjlna+8zHYbDfNabnuUEU=
|
||||||
git.solsynth.dev/hydrogen/dealer v0.0.0-20240715154745-ab0b491f45ff h1:Bzcu+n1YFD09SGoGxuFnqT56u3kK66sQ/vF8PEhbPJQ=
|
git.solsynth.dev/hydrogen/dealer v0.0.0-20240715154745-ab0b491f45ff h1:Bzcu+n1YFD09SGoGxuFnqT56u3kK66sQ/vF8PEhbPJQ=
|
||||||
git.solsynth.dev/hydrogen/dealer v0.0.0-20240715154745-ab0b491f45ff/go.mod h1:eZwAwP7ahL7TO8GWBlYFYDdjlna+8zHYbDfNabnuUEU=
|
git.solsynth.dev/hydrogen/dealer v0.0.0-20240715154745-ab0b491f45ff/go.mod h1:eZwAwP7ahL7TO8GWBlYFYDdjlna+8zHYbDfNabnuUEU=
|
||||||
|
git.solsynth.dev/hydrogen/dealer v0.0.0-20240716024524-cfb73fde1951 h1:RgZJK4PXhrjhUX75BclBCg2xfetMkswcMwMqfTBtryQ=
|
||||||
|
git.solsynth.dev/hydrogen/dealer v0.0.0-20240716024524-cfb73fde1951/go.mod h1:eZwAwP7ahL7TO8GWBlYFYDdjlna+8zHYbDfNabnuUEU=
|
||||||
git.solsynth.dev/hydrogen/paperclip v0.0.0-20240622051057-0f56dba45745 h1:40BUsQMNXjqHyytkyF9py1HjTAWlRgO6R57YXUrHNy4=
|
git.solsynth.dev/hydrogen/paperclip v0.0.0-20240622051057-0f56dba45745 h1:40BUsQMNXjqHyytkyF9py1HjTAWlRgO6R57YXUrHNy4=
|
||||||
git.solsynth.dev/hydrogen/paperclip v0.0.0-20240622051057-0f56dba45745/go.mod h1:FsQGSLTl0gvo+9Jmbot02S72suyF9tFTrzDj70Xhifo=
|
git.solsynth.dev/hydrogen/paperclip v0.0.0-20240622051057-0f56dba45745/go.mod h1:FsQGSLTl0gvo+9Jmbot02S72suyF9tFTrzDj70Xhifo=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
|
BIN
pkg/.DS_Store
vendored
BIN
pkg/.DS_Store
vendored
Binary file not shown.
BIN
pkg/internal/.DS_Store
vendored
BIN
pkg/internal/.DS_Store
vendored
Binary file not shown.
@ -121,8 +121,8 @@ func (v *Server) ListRealmMember(ctx context.Context, request *proto.RealmMember
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &proto.ListRealmMemberResponse{
|
return &proto.ListRealmMemberResponse{
|
||||||
Data: lo.Map(members, func(item models.RealmMember, index int) *proto.MemberInfo {
|
Data: lo.Map(members, func(item models.RealmMember, index int) *proto.RealmMemberInfo {
|
||||||
return &proto.MemberInfo{
|
return &proto.RealmMemberInfo{
|
||||||
RealmId: uint64(item.RealmID),
|
RealmId: uint64(item.RealmID),
|
||||||
UserId: uint64(item.AccountID),
|
UserId: uint64(item.AccountID),
|
||||||
PowerLevel: int32(item.PowerLevel),
|
PowerLevel: int32(item.PowerLevel),
|
||||||
@ -131,7 +131,7 @@ func (v *Server) ListRealmMember(ctx context.Context, request *proto.RealmMember
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *Server) GetRealmMember(ctx context.Context, request *proto.RealmMemberLookupRequest) (*proto.MemberInfo, error) {
|
func (v *Server) GetRealmMember(ctx context.Context, request *proto.RealmMemberLookupRequest) (*proto.RealmMemberInfo, error) {
|
||||||
var member models.RealmMember
|
var member models.RealmMember
|
||||||
tx := database.C.Where("realm_id = ?", request.GetRealmId())
|
tx := database.C.Where("realm_id = ?", request.GetRealmId())
|
||||||
if request.UserId != nil {
|
if request.UserId != nil {
|
||||||
@ -142,7 +142,7 @@ func (v *Server) GetRealmMember(ctx context.Context, request *proto.RealmMemberL
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return &proto.MemberInfo{
|
return &proto.RealmMemberInfo{
|
||||||
RealmId: uint64(member.RealmID),
|
RealmId: uint64(member.RealmID),
|
||||||
UserId: uint64(member.AccountID),
|
UserId: uint64(member.AccountID),
|
||||||
PowerLevel: int32(member.PowerLevel),
|
PowerLevel: int32(member.PowerLevel),
|
||||||
|
BIN
pkg/internal/server/.DS_Store
vendored
BIN
pkg/internal/server/.DS_Store
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user