From 50c8a56f38ee90dc7d88d1bebd719226ca225b50 Mon Sep 17 00:00:00 2001
From: truthhun <1272881215@qq.com>
Date: Tue, 4 Apr 2023 23:46:29 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=88=86=E7=B1=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/v1/document.pb.go | 740 +++++++++++++-----
api/v1/document.pb.gw.go | 81 ++
api/v1/document.proto | 14 +
biz/document.go | 14 +
model/document.go | 55 +-
web/api/document.js | 8 +
.../FormUpdateDocumentsCategory.vue | 112 +++
web/pages/admin/document/list.vue | 35 +
8 files changed, 877 insertions(+), 182 deletions(-)
create mode 100644 web/components/FormUpdateDocumentsCategory.vue
diff --git a/api/v1/document.pb.go b/api/v1/document.pb.go
index 7932ea8..f65b831 100644
--- a/api/v1/document.pb.go
+++ b/api/v1/document.pb.go
@@ -477,6 +477,58 @@ func (m *GetDocumentRequest) GetWithAuthor() bool {
return false
}
+type SetDocumentsCategoryRequest struct {
+ DocumentId []int64 `protobuf:"varint,1,rep,packed,name=document_id,json=documentId,proto3" json:"document_id,omitempty"`
+ CategoryId []int64 `protobuf:"varint,2,rep,packed,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"`
+}
+
+func (m *SetDocumentsCategoryRequest) Reset() { *m = SetDocumentsCategoryRequest{} }
+func (m *SetDocumentsCategoryRequest) String() string { return proto.CompactTextString(m) }
+func (*SetDocumentsCategoryRequest) ProtoMessage() {}
+func (*SetDocumentsCategoryRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_55a584ae3a7fc022, []int{4}
+}
+func (m *SetDocumentsCategoryRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *SetDocumentsCategoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_SetDocumentsCategoryRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *SetDocumentsCategoryRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SetDocumentsCategoryRequest.Merge(m, src)
+}
+func (m *SetDocumentsCategoryRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *SetDocumentsCategoryRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_SetDocumentsCategoryRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SetDocumentsCategoryRequest proto.InternalMessageInfo
+
+func (m *SetDocumentsCategoryRequest) GetDocumentId() []int64 {
+ if m != nil {
+ return m.DocumentId
+ }
+ return nil
+}
+
+func (m *SetDocumentsCategoryRequest) GetCategoryId() []int64 {
+ if m != nil {
+ return m.CategoryId
+ }
+ return nil
+}
+
// 文档列表
type ListDocumentRequest struct {
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
@@ -496,7 +548,7 @@ func (m *ListDocumentRequest) Reset() { *m = ListDocumentRequest{} }
func (m *ListDocumentRequest) String() string { return proto.CompactTextString(m) }
func (*ListDocumentRequest) ProtoMessage() {}
func (*ListDocumentRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{4}
+ return fileDescriptor_55a584ae3a7fc022, []int{5}
}
func (m *ListDocumentRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -612,7 +664,7 @@ func (m *ListDocumentReply) Reset() { *m = ListDocumentReply{} }
func (m *ListDocumentReply) String() string { return proto.CompactTextString(m) }
func (*ListDocumentReply) ProtoMessage() {}
func (*ListDocumentReply) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{5}
+ return fileDescriptor_55a584ae3a7fc022, []int{6}
}
func (m *ListDocumentReply) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -666,7 +718,7 @@ func (m *CreateDocumentItem) Reset() { *m = CreateDocumentItem{} }
func (m *CreateDocumentItem) String() string { return proto.CompactTextString(m) }
func (*CreateDocumentItem) ProtoMessage() {}
func (*CreateDocumentItem) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{6}
+ return fileDescriptor_55a584ae3a7fc022, []int{7}
}
func (m *CreateDocumentItem) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -727,7 +779,7 @@ func (m *CreateDocumentRequest) Reset() { *m = CreateDocumentRequest{} }
func (m *CreateDocumentRequest) String() string { return proto.CompactTextString(m) }
func (*CreateDocumentRequest) ProtoMessage() {}
func (*CreateDocumentRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{7}
+ return fileDescriptor_55a584ae3a7fc022, []int{8}
}
func (m *CreateDocumentRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -787,7 +839,7 @@ func (m *SetDocumentRecommendRequest) Reset() { *m = SetDocumentRecommen
func (m *SetDocumentRecommendRequest) String() string { return proto.CompactTextString(m) }
func (*SetDocumentRecommendRequest) ProtoMessage() {}
func (*SetDocumentRecommendRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{8}
+ return fileDescriptor_55a584ae3a7fc022, []int{9}
}
func (m *SetDocumentRecommendRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -839,7 +891,7 @@ func (m *ListDocumentForHomeRequest) Reset() { *m = ListDocumentForHomeR
func (m *ListDocumentForHomeRequest) String() string { return proto.CompactTextString(m) }
func (*ListDocumentForHomeRequest) ProtoMessage() {}
func (*ListDocumentForHomeRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{9}
+ return fileDescriptor_55a584ae3a7fc022, []int{10}
}
func (m *ListDocumentForHomeRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -887,7 +939,7 @@ func (m *ListDocumentForHomeItem) Reset() { *m = ListDocumentForHomeItem
func (m *ListDocumentForHomeItem) String() string { return proto.CompactTextString(m) }
func (*ListDocumentForHomeItem) ProtoMessage() {}
func (*ListDocumentForHomeItem) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{10}
+ return fileDescriptor_55a584ae3a7fc022, []int{11}
}
func (m *ListDocumentForHomeItem) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -953,7 +1005,7 @@ func (m *ListDocumentForHomeResponse) Reset() { *m = ListDocumentForHome
func (m *ListDocumentForHomeResponse) String() string { return proto.CompactTextString(m) }
func (*ListDocumentForHomeResponse) ProtoMessage() {}
func (*ListDocumentForHomeResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{11}
+ return fileDescriptor_55a584ae3a7fc022, []int{12}
}
func (m *ListDocumentForHomeResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1003,7 +1055,7 @@ func (m *SearchDocumentRequest) Reset() { *m = SearchDocumentRequest{} }
func (m *SearchDocumentRequest) String() string { return proto.CompactTextString(m) }
func (*SearchDocumentRequest) ProtoMessage() {}
func (*SearchDocumentRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{12}
+ return fileDescriptor_55a584ae3a7fc022, []int{13}
}
func (m *SearchDocumentRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1088,7 +1140,7 @@ func (m *DocumentScore) Reset() { *m = DocumentScore{} }
func (m *DocumentScore) String() string { return proto.CompactTextString(m) }
func (*DocumentScore) ProtoMessage() {}
func (*DocumentScore) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{13}
+ return fileDescriptor_55a584ae3a7fc022, []int{14}
}
func (m *DocumentScore) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1170,7 +1222,7 @@ func (m *SearchDocumentReply) Reset() { *m = SearchDocumentReply{} }
func (m *SearchDocumentReply) String() string { return proto.CompactTextString(m) }
func (*SearchDocumentReply) ProtoMessage() {}
func (*SearchDocumentReply) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{14}
+ return fileDescriptor_55a584ae3a7fc022, []int{15}
}
func (m *SearchDocumentReply) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1229,7 +1281,7 @@ func (m *DownloadDocumentReply) Reset() { *m = DownloadDocumentReply{} }
func (m *DownloadDocumentReply) String() string { return proto.CompactTextString(m) }
func (*DownloadDocumentReply) ProtoMessage() {}
func (*DownloadDocumentReply) Descriptor() ([]byte, []int) {
- return fileDescriptor_55a584ae3a7fc022, []int{15}
+ return fileDescriptor_55a584ae3a7fc022, []int{16}
}
func (m *DownloadDocumentReply) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1270,6 +1322,7 @@ func init() {
proto.RegisterType((*DeleteDocumentRequest)(nil), "api.v1.DeleteDocumentRequest")
proto.RegisterType((*RecoverRecycleDocumentRequest)(nil), "api.v1.RecoverRecycleDocumentRequest")
proto.RegisterType((*GetDocumentRequest)(nil), "api.v1.GetDocumentRequest")
+ proto.RegisterType((*SetDocumentsCategoryRequest)(nil), "api.v1.SetDocumentsCategoryRequest")
proto.RegisterType((*ListDocumentRequest)(nil), "api.v1.ListDocumentRequest")
proto.RegisterType((*ListDocumentReply)(nil), "api.v1.ListDocumentReply")
proto.RegisterType((*CreateDocumentItem)(nil), "api.v1.CreateDocumentItem")
@@ -1287,110 +1340,113 @@ func init() {
func init() { proto.RegisterFile("api/v1/document.proto", fileDescriptor_55a584ae3a7fc022) }
var fileDescriptor_55a584ae3a7fc022 = []byte{
- // 1642 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xc1, 0x6e, 0xdb, 0xcc,
- 0x11, 0x0e, 0x45, 0xc9, 0x96, 0x47, 0xb2, 0x22, 0xaf, 0x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e, 0x7d, 0xea, 0x64, 0xa2, 0xfd, 0xb6, 0x69, 0x25,
+ 0x5f, 0xf7, 0xf4, 0xa0, 0x88, 0xa9, 0xef, 0xf8, 0xfe, 0xa7, 0x3f, 0xfe, 0xdb, 0xfb, 0x8e, 0xf6,
+ 0xf5, 0xfb, 0x8e, 0xf6, 0xcd, 0xfb, 0x8e, 0xf6, 0xe5, 0x87, 0xce, 0xb3, 0xaf, 0x3f, 0x74, 0x9e,
+ 0xfd, 0xf3, 0x43, 0xe7, 0x19, 0xc8, 0xbf, 0xfd, 0x3e, 0xd3, 0xbe, 0xd8, 0x9a, 0x04, 0x11, 0x75,
+ 0x83, 0xa1, 0x04, 0xfa, 0xe4, 0xf6, 0xe5, 0xbb, 0x35, 0x24, 0xfb, 0xd1, 0xff, 0x02, 0x00, 0x00,
+ 0xff, 0xff, 0xd6, 0x05, 0xf6, 0xca, 0x33, 0x14, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1431,6 +1487,8 @@ type DocumentAPIClient interface {
GetDocumentScore(ctx context.Context, in *DocumentScore, opts ...grpc.CallOption) (*DocumentScore, error)
// 将文档一键设置为重转
SetDocumentReconvert(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ // 批量更新文档分类
+ SetDocumentsCategory(ctx context.Context, in *SetDocumentsCategoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type documentAPIClient struct {
@@ -1558,6 +1616,15 @@ func (c *documentAPIClient) SetDocumentReconvert(ctx context.Context, in *emptyp
return out, nil
}
+func (c *documentAPIClient) SetDocumentsCategory(ctx context.Context, in *SetDocumentsCategoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, "/api.v1.DocumentAPI/SetDocumentsCategory", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// DocumentAPIServer is the server API for DocumentAPI service.
type DocumentAPIServer interface {
// 针对首页的文档查询
@@ -1586,6 +1653,8 @@ type DocumentAPIServer interface {
GetDocumentScore(context.Context, *DocumentScore) (*DocumentScore, error)
// 将文档一键设置为重转
SetDocumentReconvert(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
+ // 批量更新文档分类
+ SetDocumentsCategory(context.Context, *SetDocumentsCategoryRequest) (*emptypb.Empty, error)
}
// UnimplementedDocumentAPIServer can be embedded to have forward compatible implementations.
@@ -1631,6 +1700,9 @@ func (*UnimplementedDocumentAPIServer) GetDocumentScore(ctx context.Context, req
func (*UnimplementedDocumentAPIServer) SetDocumentReconvert(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetDocumentReconvert not implemented")
}
+func (*UnimplementedDocumentAPIServer) SetDocumentsCategory(ctx context.Context, req *SetDocumentsCategoryRequest) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method SetDocumentsCategory not implemented")
+}
func RegisterDocumentAPIServer(s *grpc.Server, srv DocumentAPIServer) {
s.RegisterService(&_DocumentAPI_serviceDesc, srv)
@@ -1870,6 +1942,24 @@ func _DocumentAPI_SetDocumentReconvert_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
+func _DocumentAPI_SetDocumentsCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(SetDocumentsCategoryRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DocumentAPIServer).SetDocumentsCategory(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/api.v1.DocumentAPI/SetDocumentsCategory",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DocumentAPIServer).SetDocumentsCategory(ctx, req.(*SetDocumentsCategoryRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _DocumentAPI_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.v1.DocumentAPI",
HandlerType: (*DocumentAPIServer)(nil),
@@ -1926,6 +2016,10 @@ var _DocumentAPI_serviceDesc = grpc.ServiceDesc{
MethodName: "SetDocumentReconvert",
Handler: _DocumentAPI_SetDocumentReconvert_Handler,
},
+ {
+ MethodName: "SetDocumentsCategory",
+ Handler: _DocumentAPI_SetDocumentsCategory_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "api/v1/document.proto",
@@ -2536,6 +2630,67 @@ func (m *GetDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *SetDocumentsCategoryRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SetDocumentsCategoryRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *SetDocumentsCategoryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.CategoryId) > 0 {
+ dAtA14 := make([]byte, len(m.CategoryId)*10)
+ var j13 int
+ for _, num1 := range m.CategoryId {
+ num := uint64(num1)
+ for num >= 1<<7 {
+ dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80)
+ num >>= 7
+ j13++
+ }
+ dAtA14[j13] = uint8(num)
+ j13++
+ }
+ i -= j13
+ copy(dAtA[i:], dAtA14[:j13])
+ i = encodeVarintDocument(dAtA, i, uint64(j13))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.DocumentId) > 0 {
+ dAtA16 := make([]byte, len(m.DocumentId)*10)
+ var j15 int
+ for _, num1 := range m.DocumentId {
+ num := uint64(num1)
+ for num >= 1<<7 {
+ dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80)
+ num >>= 7
+ j15++
+ }
+ dAtA16[j15] = uint8(num)
+ j15++
+ }
+ i -= j15
+ copy(dAtA[i:], dAtA16[:j15])
+ i = encodeVarintDocument(dAtA, i, uint64(j15))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
func (m *ListDocumentRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -2582,59 +2737,59 @@ func (m *ListDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
dAtA[i] = 0x4a
}
if len(m.Status) > 0 {
- dAtA14 := make([]byte, len(m.Status)*10)
- var j13 int
+ dAtA18 := make([]byte, len(m.Status)*10)
+ var j17 int
for _, num1 := range m.Status {
num := uint64(num1)
for num >= 1<<7 {
- dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j13++
+ j17++
}
- dAtA14[j13] = uint8(num)
- j13++
+ dAtA18[j17] = uint8(num)
+ j17++
}
- i -= j13
- copy(dAtA[i:], dAtA14[:j13])
- i = encodeVarintDocument(dAtA, i, uint64(j13))
+ i -= j17
+ copy(dAtA[i:], dAtA18[:j17])
+ i = encodeVarintDocument(dAtA, i, uint64(j17))
i--
dAtA[i] = 0x42
}
if len(m.UserId) > 0 {
- dAtA16 := make([]byte, len(m.UserId)*10)
- var j15 int
+ dAtA20 := make([]byte, len(m.UserId)*10)
+ var j19 int
for _, num1 := range m.UserId {
num := uint64(num1)
for num >= 1<<7 {
- dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA20[j19] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j15++
+ j19++
}
- dAtA16[j15] = uint8(num)
- j15++
+ dAtA20[j19] = uint8(num)
+ j19++
}
- i -= j15
- copy(dAtA[i:], dAtA16[:j15])
- i = encodeVarintDocument(dAtA, i, uint64(j15))
+ i -= j19
+ copy(dAtA[i:], dAtA20[:j19])
+ i = encodeVarintDocument(dAtA, i, uint64(j19))
i--
dAtA[i] = 0x3a
}
if len(m.CategoryId) > 0 {
- dAtA18 := make([]byte, len(m.CategoryId)*10)
- var j17 int
+ dAtA22 := make([]byte, len(m.CategoryId)*10)
+ var j21 int
for _, num1 := range m.CategoryId {
num := uint64(num1)
for num >= 1<<7 {
- dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j17++
+ j21++
}
- dAtA18[j17] = uint8(num)
- j17++
+ dAtA22[j21] = uint8(num)
+ j21++
}
- i -= j17
- copy(dAtA[i:], dAtA18[:j17])
- i = encodeVarintDocument(dAtA, i, uint64(j17))
+ i -= j21
+ copy(dAtA[i:], dAtA22[:j21])
+ i = encodeVarintDocument(dAtA, i, uint64(j21))
i--
dAtA[i] = 0x32
}
@@ -2791,21 +2946,21 @@ func (m *CreateDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
}
}
if len(m.CategoryId) > 0 {
- dAtA20 := make([]byte, len(m.CategoryId)*10)
- var j19 int
+ dAtA24 := make([]byte, len(m.CategoryId)*10)
+ var j23 int
for _, num1 := range m.CategoryId {
num := uint64(num1)
for num >= 1<<7 {
- dAtA20[j19] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA24[j23] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j19++
+ j23++
}
- dAtA20[j19] = uint8(num)
- j19++
+ dAtA24[j23] = uint8(num)
+ j23++
}
- i -= j19
- copy(dAtA[i:], dAtA20[:j19])
- i = encodeVarintDocument(dAtA, i, uint64(j19))
+ i -= j23
+ copy(dAtA[i:], dAtA24[:j23])
+ i = encodeVarintDocument(dAtA, i, uint64(j23))
i--
dAtA[i] = 0x12
}
@@ -2848,21 +3003,21 @@ func (m *SetDocumentRecommendRequest) MarshalToSizedBuffer(dAtA []byte) (int, er
dAtA[i] = 0x10
}
if len(m.Id) > 0 {
- dAtA22 := make([]byte, len(m.Id)*10)
- var j21 int
+ dAtA26 := make([]byte, len(m.Id)*10)
+ var j25 int
for _, num1 := range m.Id {
num := uint64(num1)
for num >= 1<<7 {
- dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA26[j25] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j21++
+ j25++
}
- dAtA22[j21] = uint8(num)
- j21++
+ dAtA26[j25] = uint8(num)
+ j25++
}
- i -= j21
- copy(dAtA[i:], dAtA22[:j21])
- i = encodeVarintDocument(dAtA, i, uint64(j21))
+ i -= j25
+ copy(dAtA[i:], dAtA26[:j25])
+ i = encodeVarintDocument(dAtA, i, uint64(j25))
i--
dAtA[i] = 0xa
}
@@ -3025,21 +3180,21 @@ func (m *SearchDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
dAtA[i] = 0x2a
}
if len(m.CategoryId) > 0 {
- dAtA24 := make([]byte, len(m.CategoryId)*10)
- var j23 int
+ dAtA28 := make([]byte, len(m.CategoryId)*10)
+ var j27 int
for _, num1 := range m.CategoryId {
num := uint64(num1)
for num >= 1<<7 {
- dAtA24[j23] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j23++
+ j27++
}
- dAtA24[j23] = uint8(num)
- j23++
+ dAtA28[j27] = uint8(num)
+ j27++
}
- i -= j23
- copy(dAtA[i:], dAtA24[:j23])
- i = encodeVarintDocument(dAtA, i, uint64(j23))
+ i -= j27
+ copy(dAtA[i:], dAtA28[:j27])
+ i = encodeVarintDocument(dAtA, i, uint64(j27))
i--
dAtA[i] = 0x22
}
@@ -3084,22 +3239,22 @@ func (m *DocumentScore) MarshalToSizedBuffer(dAtA []byte) (int, error) {
var l int
_ = l
if m.UpdatedAt != nil {
- n25, err25 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt):])
- if err25 != nil {
- return 0, err25
+ n29, err29 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt):])
+ if err29 != nil {
+ return 0, err29
}
- i -= n25
- i = encodeVarintDocument(dAtA, i, uint64(n25))
+ i -= n29
+ i = encodeVarintDocument(dAtA, i, uint64(n29))
i--
dAtA[i] = 0x32
}
if m.CreatedAt != nil {
- n26, err26 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt):])
- if err26 != nil {
- return 0, err26
+ n30, err30 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt):])
+ if err30 != nil {
+ return 0, err30
}
- i -= n26
- i = encodeVarintDocument(dAtA, i, uint64(n26))
+ i -= n30
+ i = encodeVarintDocument(dAtA, i, uint64(n30))
i--
dAtA[i] = 0x2a
}
@@ -3390,6 +3545,29 @@ func (m *GetDocumentRequest) Size() (n int) {
return n
}
+func (m *SetDocumentsCategoryRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.DocumentId) > 0 {
+ l = 0
+ for _, e := range m.DocumentId {
+ l += sovDocument(uint64(e))
+ }
+ n += 1 + sovDocument(uint64(l)) + l
+ }
+ if len(m.CategoryId) > 0 {
+ l = 0
+ for _, e := range m.CategoryId {
+ l += sovDocument(uint64(e))
+ }
+ n += 1 + sovDocument(uint64(l)) + l
+ }
+ return n
+}
+
func (m *ListDocumentRequest) Size() (n int) {
if m == nil {
return 0
@@ -4983,6 +5161,208 @@ func (m *GetDocumentRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *SetDocumentsCategoryRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowDocument
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SetDocumentsCategoryRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SetDocumentsCategoryRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType == 0 {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowDocument
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DocumentId = append(m.DocumentId, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowDocument
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthDocument
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex < 0 {
+ return ErrInvalidLengthDocument
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var elementCount int
+ var count int
+ for _, integer := range dAtA[iNdEx:postIndex] {
+ if integer < 128 {
+ count++
+ }
+ }
+ elementCount = count
+ if elementCount != 0 && len(m.DocumentId) == 0 {
+ m.DocumentId = make([]int64, 0, elementCount)
+ }
+ for iNdEx < postIndex {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowDocument
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DocumentId = append(m.DocumentId, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType)
+ }
+ case 2:
+ if wireType == 0 {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowDocument
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CategoryId = append(m.CategoryId, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowDocument
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthDocument
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex < 0 {
+ return ErrInvalidLengthDocument
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var elementCount int
+ var count int
+ for _, integer := range dAtA[iNdEx:postIndex] {
+ if integer < 128 {
+ count++
+ }
+ }
+ elementCount = count
+ if elementCount != 0 && len(m.CategoryId) == 0 {
+ m.CategoryId = make([]int64, 0, elementCount)
+ }
+ for iNdEx < postIndex {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowDocument
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CategoryId = append(m.CategoryId, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field CategoryId", wireType)
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipDocument(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthDocument
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func (m *ListDocumentRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
diff --git a/api/v1/document.pb.gw.go b/api/v1/document.pb.gw.go
index e50e13b..4d0eab4 100644
--- a/api/v1/document.pb.gw.go
+++ b/api/v1/document.pb.gw.go
@@ -476,6 +476,40 @@ func local_request_DocumentAPI_SetDocumentReconvert_0(ctx context.Context, marsh
}
+func request_DocumentAPI_SetDocumentsCategory_0(ctx context.Context, marshaler runtime.Marshaler, client DocumentAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SetDocumentsCategoryRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.SetDocumentsCategory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_DocumentAPI_SetDocumentsCategory_0(ctx context.Context, marshaler runtime.Marshaler, server DocumentAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SetDocumentsCategoryRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.SetDocumentsCategory(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
var (
filter_RecycleAPI_ListRecycleDocument_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
@@ -905,6 +939,29 @@ func RegisterDocumentAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux
})
+ mux.Handle("PUT", pattern_DocumentAPI_SetDocumentsCategory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_DocumentAPI_SetDocumentsCategory_0(rctx, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_DocumentAPI_SetDocumentsCategory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -1307,6 +1364,26 @@ func RegisterDocumentAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux
})
+ mux.Handle("PUT", pattern_DocumentAPI_SetDocumentsCategory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ rctx, err := runtime.AnnotateContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_DocumentAPI_SetDocumentsCategory_0(rctx, inboundMarshaler, client, req, pathParams)
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_DocumentAPI_SetDocumentsCategory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -1336,6 +1413,8 @@ var (
pattern_DocumentAPI_GetDocumentScore_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "document", "score"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_DocumentAPI_SetDocumentReconvert_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "document", "reconvert"}, "", runtime.AssumeColonVerbOpt(true)))
+
+ pattern_DocumentAPI_SetDocumentsCategory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "document", "category"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
@@ -1364,6 +1443,8 @@ var (
forward_DocumentAPI_GetDocumentScore_0 = runtime.ForwardResponseMessage
forward_DocumentAPI_SetDocumentReconvert_0 = runtime.ForwardResponseMessage
+
+ forward_DocumentAPI_SetDocumentsCategory_0 = runtime.ForwardResponseMessage
)
// RegisterRecycleAPIHandlerFromEndpoint is same as RegisterRecycleAPIHandler but
diff --git a/api/v1/document.proto b/api/v1/document.proto
index f676cba..23ba44b 100644
--- a/api/v1/document.proto
+++ b/api/v1/document.proto
@@ -67,6 +67,11 @@ message GetDocumentRequest {
bool with_author = 2; // 是否查询作者信息
}
+message SetDocumentsCategoryRequest {
+ repeated int64 document_id = 1; // 文档ID
+ repeated int64 category_id = 2; // 分类ID
+}
+
// 文档列表
message ListDocumentRequest {
int64 page = 1; // 页码
@@ -256,6 +261,15 @@ service DocumentAPI {
put : '/api/v1/document/reconvert',
};
}
+
+ // 批量更新文档分类
+ rpc SetDocumentsCategory(SetDocumentsCategoryRequest)
+ returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ put : '/api/v1/document/category',
+ body : '*',
+ };
+ }
}
service RecycleAPI {
diff --git a/biz/document.go b/biz/document.go
index a780a53..6db5098 100644
--- a/biz/document.go
+++ b/biz/document.go
@@ -786,3 +786,17 @@ func (s *DocumentAPIService) SetDocumentReconvert(ctx context.Context, req *empt
return &emptypb.Empty{}, nil
}
+
+func (s *DocumentAPIService) SetDocumentsCategory(ctx context.Context, req *pb.SetDocumentsCategoryRequest) (res *emptypb.Empty, err error) {
+ _, err = s.checkPermission(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ err = s.dbModel.SetDocumentsCategory(req.DocumentId, req.CategoryId)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "更新文档分类失败:%s", err.Error())
+ }
+
+ return &emptypb.Empty{}, nil
+}
diff --git a/model/document.go b/model/document.go
index 151f42c..168b587 100644
--- a/model/document.go
+++ b/model/document.go
@@ -292,8 +292,6 @@ func (m *DBModel) DeleteDocument(ids []int64, deletedUserId int64, deepDelete ..
}
for _, doc := range docs {
- // 文档不是禁用状态,且未被逻辑删除,则需要减少用户、分类下的文档统计数量
- // if doc.Status != DocumentStatusDisabled && doc.DeletedAt == nil {
if doc.DeletedAt == nil {
err = sess.Model(modelUser).Where("id = ?", doc.UserId).Update("doc_count", gorm.Expr("doc_count - ?", 1)).Error
if err != nil {
@@ -765,3 +763,56 @@ func (m *DBModel) CountDocument(status ...int) (count int64, err error) {
}
return
}
+
+func (m *DBModel) SetDocumentsCategory(documentId, categoryId []int64) (err error) {
+ tx := m.db.Begin()
+ defer func() {
+ if err != nil {
+ tx.Rollback()
+ } else {
+ tx.Commit()
+ }
+ }()
+
+ for _, id := range documentId {
+ // 1. 旧的文档分类,减少计数
+ var docCates []DocumentCategory
+ m.db.Model(&DocumentCategory{}).Where("document_id = ?", id).Find(&docCates)
+ for _, cate := range docCates {
+ err = tx.Model(&Category{}).Where("id = ?", cate.CategoryId).Update("doc_count", gorm.Expr("doc_count - ?", 1)).Error
+ if err != nil {
+ m.logger.Error("SetDocumentsCategory", zap.Error(err))
+ return
+ }
+ }
+
+ // 2. 删除旧的分类
+ err = tx.Model(&DocumentCategory{}).Where("document_id = ?", id).Delete(&DocumentCategory{}).Error
+ if err != nil {
+ m.logger.Error("SetDocumentsCategory", zap.Error(err))
+ return
+ }
+
+ // 3. 添加新的分类
+ docCates = []DocumentCategory{}
+ for _, cid := range categoryId {
+ docCates = append(docCates, DocumentCategory{
+ DocumentId: id,
+ CategoryId: cid,
+ })
+ }
+ err = tx.Create(&docCates).Error
+ if err != nil {
+ m.logger.Error("SetDocumentsCategory", zap.Error(err))
+ return
+ }
+
+ // 4. 更新文档分类统计
+ err = tx.Model(&Category{}).Where("id in (?)", categoryId).Update("doc_count", gorm.Expr("doc_count + ?", 1)).Error
+ if err != nil {
+ m.logger.Error("SetDocumentsCategory", zap.Error(err))
+ return
+ }
+ }
+ return
+}
diff --git a/web/api/document.js b/web/api/document.js
index bbcd58b..809ae53 100644
--- a/web/api/document.js
+++ b/web/api/document.js
@@ -135,3 +135,11 @@ export const setDocumentScore = (data) => {
data,
})
}
+
+export const setDocumentsCategory = (data) => {
+ return service({
+ url: '/api/v1/document/category',
+ method: 'put',
+ data,
+ })
+}
diff --git a/web/components/FormUpdateDocumentsCategory.vue b/web/components/FormUpdateDocumentsCategory.vue
new file mode 100644
index 0000000..0f48ca6
--- /dev/null
+++ b/web/components/FormUpdateDocumentsCategory.vue
@@ -0,0 +1,112 @@
+
+
+
+
+
diff --git a/web/pages/admin/document/list.vue b/web/pages/admin/document/list.vue
index 594e77d..8ba23df 100644
--- a/web/pages/admin/document/list.vue
+++ b/web/pages/admin/document/list.vue
@@ -28,6 +28,22 @@
>
+
+
+ 批量分类
+
+
@@ -105,6 +121,18 @@
@success="formSuccess"
/>
+
+
+
{})
},
+ batchUpdateDocumentsCategory() {
+ this.categoryDocuments = this.selectedRow
+ this.formDocumentsCategoryVisible = true
+ },
deleteRow(row) {
this.$confirm(
`您确定要删除文档【${row.title}】吗?删除之后将会进入到回收站,可以在回收站中恢复。`,