feat 修改model名称
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/discover"
|
|
||||||
"common/log"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-user/config"
|
||||||
"github.com/judwhite/go-svc"
|
"github.com/judwhite/go-svc"
|
||||||
"user/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Program struct {
|
type Program struct {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"common/utils"
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
|
"git.hlsq.asia/mmorpg/service-user/config"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"user/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ModuleBase 基础模块,或者一些零散的模块
|
// ModuleBase 基础模块,或者一些零散的模块
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/db"
|
"git.hlsq.asia/mmorpg/service-common/db"
|
||||||
"user/config"
|
"git.hlsq.asia/mmorpg/service-user/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ModuleDB 数据库模块
|
// ModuleDB 数据库模块
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/net/grpc/service"
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
||||||
"user/config"
|
"git.hlsq.asia/mmorpg/service-user/config"
|
||||||
"user/internal/grpc_server/server"
|
"git.hlsq.asia/mmorpg/service-user/internal/grpc_server/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ModuleGrpcServer Grpc服务模块
|
// ModuleGrpcServer Grpc服务模块
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import "common/config"
|
import "git.hlsq.asia/mmorpg/service-common/config"
|
||||||
|
|
||||||
const path = "./config"
|
const path = "./config"
|
||||||
|
|
||||||
|
|||||||
4
go.mod
4
go.mod
@@ -3,7 +3,7 @@ module git.hlsq.asia/mmorpg/service-user
|
|||||||
go 1.23.1
|
go 1.23.1
|
||||||
|
|
||||||
require (
|
require (
|
||||||
common v0.0.0-00010101000000-000000000000
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78
|
||||||
github.com/judwhite/go-svc v1.2.1
|
github.com/judwhite/go-svc v1.2.1
|
||||||
google.golang.org/grpc v1.71.1
|
google.golang.org/grpc v1.71.1
|
||||||
google.golang.org/protobuf v1.36.9
|
google.golang.org/protobuf v1.36.9
|
||||||
@@ -87,5 +87,3 @@ require (
|
|||||||
gorm.io/driver/mysql v1.6.0 // indirect
|
gorm.io/driver/mysql v1.6.0 // indirect
|
||||||
gorm.io/hints v1.1.0 // indirect
|
gorm.io/hints v1.1.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace common => ../common
|
|
||||||
|
|||||||
2
go.sum
2
go.sum
@@ -1,5 +1,7 @@
|
|||||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||||
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78 h1:4CP8w5jHDOdN7hym8YrtioxNDd7PS2WcZDrO6dtY344=
|
||||||
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc=
|
||||||
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
|
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
|
||||||
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/utils"
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package query
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"user/internal/dao/model"
|
"git.hlsq.asia/mmorpg/service-user/internal/dao/model"
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"gorm.io/gorm/clause"
|
"gorm.io/gorm/clause"
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/db/mysql"
|
|
||||||
"common/db/redis"
|
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/db/mysql"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
||||||
|
"git.hlsq.asia/mmorpg/service-user/internal/dao/model"
|
||||||
|
"git.hlsq.asia/mmorpg/service-user/internal/dao/query"
|
||||||
"time"
|
"time"
|
||||||
"user/internal/dao/model"
|
|
||||||
"user/internal/dao/query"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/db/redis"
|
|
||||||
"common/net/http/http_resp"
|
|
||||||
"common/proto/ss/grpc_pb"
|
|
||||||
"common/utils"
|
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
|
"git.hlsq.asia/mmorpg/service-user/internal/dao/model"
|
||||||
|
"git.hlsq.asia/mmorpg/service-user/internal/dao/repository"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"user/internal/dao/model"
|
|
||||||
"user/internal/dao/repository"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) Login(ctx context.Context, req *grpc_pb.LoginReq) (*grpc_pb.LoginResp, error) {
|
func (s *Server) Login(ctx context.Context, req *grpc_pb.LoginReq) (*grpc_pb.LoginResp, error) {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"common/net/grpc/service"
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
||||||
"common/proto/ss/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user