add get inc or dec count

This commit is contained in:
daniel.w 2024-08-29 22:50:09 +08:00
parent a3796aabdc
commit a76840fe97
14 changed files with 27 additions and 15 deletions

View File

@ -1,11 +1,12 @@
package domain
import (
"fmt"
"strings"
"code.30cm.net/digimon/library-go/errs"
"code.30cm.net/digimon/library-go/errs/code"
"fmt"
"github.com/zeromicro/go-zero/core/logx"
"strings"
)
type ErrorCode uint32

View File

@ -4,9 +4,10 @@ import (
"app-cloudep-tweeting-service/gen_result/pb/tweeting"
"app-cloudep-tweeting-service/internal/domain"
"app-cloudep-tweeting-service/internal/svc"
ers "code.30cm.net/digimon/library-go/errs"
"context"
ers "code.30cm.net/digimon/library-go/errs"
"github.com/zeromicro/go-zero/core/logx"
)

View File

@ -3,9 +3,10 @@ package postservicelogic
import (
"app-cloudep-tweeting-service/internal/domain"
model "app-cloudep-tweeting-service/internal/model/mongo"
ers "code.30cm.net/digimon/library-go/errs"
"context"
ers "code.30cm.net/digimon/library-go/errs"
"app-cloudep-tweeting-service/gen_result/pb/tweeting"
"app-cloudep-tweeting-service/internal/svc"

View File

@ -3,9 +3,10 @@ package postservicelogic
import (
"app-cloudep-tweeting-service/internal/domain"
model "app-cloudep-tweeting-service/internal/model/mongo"
ers "code.30cm.net/digimon/library-go/errs"
"context"
ers "code.30cm.net/digimon/library-go/errs"
"app-cloudep-tweeting-service/gen_result/pb/tweeting"
"app-cloudep-tweeting-service/internal/svc"

View File

@ -3,9 +3,10 @@ package postservicelogic
import (
"app-cloudep-tweeting-service/internal/domain"
model "app-cloudep-tweeting-service/internal/model/mongo"
ers "code.30cm.net/digimon/library-go/errs"
"context"
ers "code.30cm.net/digimon/library-go/errs"
"app-cloudep-tweeting-service/gen_result/pb/tweeting"
"app-cloudep-tweeting-service/internal/svc"

View File

@ -3,9 +3,10 @@ package postservicelogic
import (
"app-cloudep-tweeting-service/internal/domain"
model "app-cloudep-tweeting-service/internal/model/mongo"
ers "code.30cm.net/digimon/library-go/errs"
"context"
ers "code.30cm.net/digimon/library-go/errs"
"app-cloudep-tweeting-service/gen_result/pb/tweeting"
"app-cloudep-tweeting-service/internal/svc"

View File

@ -5,8 +5,9 @@ import (
"app-cloudep-tweeting-service/internal/domain"
model "app-cloudep-tweeting-service/internal/model/mongo"
"app-cloudep-tweeting-service/internal/svc"
ers "code.30cm.net/digimon/library-go/errs"
"context"
ers "code.30cm.net/digimon/library-go/errs"
"google.golang.org/protobuf/proto"
"github.com/zeromicro/go-zero/core/logx"

View File

@ -5,9 +5,10 @@ import (
"app-cloudep-tweeting-service/internal/domain"
model "app-cloudep-tweeting-service/internal/model/mongo"
"app-cloudep-tweeting-service/internal/svc"
ers "code.30cm.net/digimon/library-go/errs"
"context"
ers "code.30cm.net/digimon/library-go/errs"
"github.com/zeromicro/go-zero/core/logx"
)

View File

@ -3,8 +3,9 @@ package postservicelogic
import (
"app-cloudep-tweeting-service/internal/domain"
model "app-cloudep-tweeting-service/internal/model/mongo"
ers "code.30cm.net/digimon/library-go/errs"
"context"
ers "code.30cm.net/digimon/library-go/errs"
"go.mongodb.org/mongo-driver/bson/primitive"
"app-cloudep-tweeting-service/gen_result/pb/tweeting"

View File

@ -4,12 +4,13 @@ import (
"app-cloudep-tweeting-service/internal/domain"
"context"
"errors"
"time"
"github.com/zeromicro/go-zero/core/stores/mon"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"time"
)
var _ Post_likesModel = (*customPost_likesModel)(nil)

View File

@ -5,6 +5,8 @@ import (
"context"
"errors"
"fmt"
"time"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/monc"
@ -12,7 +14,6 @@ import (
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"time"
)
var _ PostModel = (*customPostModel)(nil)

View File

@ -7,7 +7,7 @@ import (
"context"
"app-cloudep-tweeting-service/gen_result/pb/tweeting"
"app-cloudep-tweeting-service/internal/logic/commentservice"
commentservicelogic "app-cloudep-tweeting-service/internal/logic/commentservice"
"app-cloudep-tweeting-service/internal/svc"
)

View File

@ -7,7 +7,7 @@ import (
"context"
"app-cloudep-tweeting-service/gen_result/pb/tweeting"
"app-cloudep-tweeting-service/internal/logic/postservice"
postservicelogic "app-cloudep-tweeting-service/internal/logic/postservice"
"app-cloudep-tweeting-service/internal/svc"
)

View File

@ -3,8 +3,9 @@ package svc
import (
"app-cloudep-tweeting-service/internal/config"
model "app-cloudep-tweeting-service/internal/model/mongo"
vi "code.30cm.net/digimon/library-go/validator"
"fmt"
vi "code.30cm.net/digimon/library-go/validator"
)
type ServiceContext struct {