Skip to content

Commit 2a36928

Browse files
committed
feat: refactor.
1 parent 981677d commit 2a36928

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

blog-backend/app/core/service/internal/data/attachment.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ package data
22

33
import (
44
"context"
5+
"time"
6+
7+
"github.com/go-kratos/kratos/v2/log"
58
"github.com/tx7do/kratos-utils/entgo"
9+
paging "github.com/tx7do/kratos-utils/pagination"
610
util "github.com/tx7do/kratos-utils/time"
11+
12+
"kratos-cms/app/core/service/internal/biz"
713
"kratos-cms/app/core/service/internal/data/ent"
814
"kratos-cms/app/core/service/internal/data/ent/comment"
9-
"time"
1015

11-
"github.com/go-kratos/kratos/v2/log"
12-
"kratos-cms/app/core/service/internal/biz"
1316
"kratos-cms/gen/api/go/common/pagination"
1417
v1 "kratos-cms/gen/api/go/file/service/v1"
15-
16-
paging "github.com/tx7do/kratos-utils/pagination"
1718
)
1819

1920
var _ biz.AttachmentRepo = (*AttachmentRepo)(nil)

blog-backend/app/core/service/internal/data/category.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import (
66

77
"github.com/go-kratos/kratos/v2/log"
88

9-
"kratos-cms/gen/api/go/common/pagination"
10-
"kratos-cms/gen/api/go/content/service/v1"
11-
129
"kratos-cms/app/core/service/internal/biz"
1310
"kratos-cms/app/core/service/internal/data/ent"
1411
"kratos-cms/app/core/service/internal/data/ent/category"
1512

13+
"kratos-cms/gen/api/go/common/pagination"
14+
"kratos-cms/gen/api/go/content/service/v1"
15+
1616
"github.com/tx7do/kratos-utils/entgo"
1717
paging "github.com/tx7do/kratos-utils/pagination"
1818
util "github.com/tx7do/kratos-utils/time"

blog-backend/app/core/service/internal/data/tag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func (r *TagRepo) Update(ctx context.Context, req *v1.UpdateTagRequest) (*v1.Tag
147147
}
148148

149149
func (r *TagRepo) Delete(ctx context.Context, req *v1.DeleteTagRequest) (bool, error) {
150-
err := r.data.db.Link.
150+
err := r.data.db.Tag.
151151
DeleteOneID(req.GetId()).
152152
Exec(ctx)
153153
return err != nil, err

blog-backend/app/core/service/internal/data/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import (
77
"github.com/go-kratos/kratos/v2/log"
88
"github.com/tx7do/kratos-utils/crypto"
99
"github.com/tx7do/kratos-utils/entgo"
10+
paging "github.com/tx7do/kratos-utils/pagination"
1011
util "github.com/tx7do/kratos-utils/time"
1112

1213
"kratos-cms/app/core/service/internal/biz"
1314
"kratos-cms/app/core/service/internal/data/ent"
1415
"kratos-cms/app/core/service/internal/data/ent/user"
1516

16-
paging "github.com/tx7do/kratos-utils/pagination"
1717
"kratos-cms/gen/api/go/common/pagination"
1818
v1 "kratos-cms/gen/api/go/user/service/v1"
1919
)

0 commit comments

Comments
 (0)