This commit is contained in:
daniel.w 2024-08-22 22:24:51 +08:00
parent 994597cd94
commit fc547508a4
7 changed files with 16 additions and 11 deletions

View File

@ -1,12 +1,13 @@
package middleware
import (
ers "code.30cm.net/digimon/library-go/errors"
"context"
"errors"
"time"
ers "code.30cm.net/digimon/library-go/errors"
"github.com/zeromicro/go-zero/core/logx"
"google.golang.org/grpc"
"time"
)
const defaultTimeout = 30 * time.Second

View File

@ -10,9 +10,10 @@
package lib
import (
required "code.30cm.net/digimon/library-go/validator"
reflect "reflect"
required "code.30cm.net/digimon/library-go/validator"
gomock "go.uber.org/mock/gomock"
)

View File

@ -4,6 +4,7 @@ import (
"context"
"database/sql"
"fmt"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)

View File

@ -2,10 +2,11 @@ package model
import (
"context"
"time"
"github.com/zeromicro/go-zero/core/stores/mon"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo/options"
"time"
)
var _ AutoIdModel = (*customAutoIdModel)(nil)

View File

@ -5,11 +5,12 @@ import (
"context"
"database/sql"
"fmt"
"strings"
"time"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/sqlc"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"strings"
"time"
)
var _ UserTableModel = (*customUserTableModel)(nil)
@ -115,8 +116,6 @@ func (m *defaultUserTableModel) ListMembers(ctx context.Context, params *UserQue
args = append(args, params.PageSize, offset)
var users []*UserTable
fmt.Println("query:", query)
fmt.Println("args:", args)
err := m.QueryRowsNoCacheCtx(ctx, &users, query, args...)
if err != nil {
return nil, err

View File

@ -7,9 +7,10 @@ import (
"app-cloudep-member-server/internal/model"
mgo "app-cloudep-member-server/internal/model/mongo"
"app-cloudep-member-server/internal/usecase"
"fmt"
ers "code.30cm.net/digimon/library-go/errors"
vi "code.30cm.net/digimon/library-go/validator"
"fmt"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)

View File

@ -2,7 +2,8 @@ package main
import (
"flag"
"fmt"
"github.com/zeromicro/go-zero/core/logx"
"app-cloudep-member-server/gen_result/pb/member"
"app-cloudep-member-server/internal/config"
@ -34,6 +35,6 @@ func main() {
})
defer s.Stop()
fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
logx.Info("Starting rpc server at %s...\n", c.ListenOn)
s.Start()
}