Compare commits

...

24 Commits

@ -543,6 +543,7 @@ type ListDocumentRequest struct {
Limit int64 `protobuf:"varint,10,opt,name=limit,proto3" json:"limit,omitempty"`
Ext string `protobuf:"bytes,11,opt,name=ext,proto3" json:"ext,omitempty"`
CreatedAt []string `protobuf:"bytes,12,rep,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
FeeType string `protobuf:"bytes,13,opt,name=fee_type,json=feeType,proto3" json:"fee_type,omitempty"`
}
func (m *ListDocumentRequest) Reset() { *m = ListDocumentRequest{} }
@ -662,6 +663,13 @@ func (m *ListDocumentRequest) GetCreatedAt() []string {
return nil
}
func (m *ListDocumentRequest) GetFeeType() string {
if m != nil {
return m.FeeType
}
return ""
}
// 文档列表
type ListDocumentReply struct {
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
@ -1365,114 +1373,116 @@ func init() {
func init() { proto.RegisterFile("api/v1/document.proto", fileDescriptor_55a584ae3a7fc022) }
var fileDescriptor_55a584ae3a7fc022 = []byte{
// 1711 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x5f, 0x6f, 0x23, 0x49,
0x11, 0xdf, 0xf1, 0xd8, 0x89, 0x5d, 0x76, 0xbc, 0xde, 0xde, 0x38, 0x99, 0x1d, 0x27, 0xb6, 0x77,
0x96, 0x40, 0x2e, 0x42, 0xb1, 0x36, 0x08, 0x1e, 0xee, 0x1e, 0x50, 0x2e, 0xbb, 0x2c, 0x91, 0x10,
0x3a, 0xcd, 0xb2, 0x3a, 0xe9, 0x5e, 0xcc, 0xac, 0xa7, 0xd7, 0x1e, 0x18, 0x7b, 0x86, 0x99, 0x76,
0x4c, 0x22, 0x78, 0xe1, 0x03, 0xa0, 0x93, 0xf8, 0x2a, 0xf0, 0x1d, 0x78, 0x42, 0x27, 0xc1, 0x03,
0x12, 0x0f, 0x9c, 0x76, 0xf9, 0x02, 0x7c, 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 0xff, 0x58, 0x3b, 0x39,
0xfb, 0x97, 0x0e, 0x20, 0x5f, 0x47, 0x9c, 0xd5, 0x03, 0xc1, 0xea, 0x99, 0xf7, 0xd2, 0xb7, 0x4e,
0xcd, 0xdb, 0x8a, 0x0d, 0x11, 0xc8, 0xef, 0x60, 0xaf, 0xf8, 0x8d, 0x46, 0x8e, 0x94, 0xd9, 0x5b,
0xdf, 0x70, 0xa5, 0xee, 0x3f, 0x43, 0xe8, 0x43, 0xb3, 0x14, 0x9a, 0xa7, 0x51, 0xa8, 0x9e, 0x92,
0x59, 0xf0, 0x6f, 0xc9, 0x88, 0xd2, 0xdf, 0x93, 0x72, 0x7f, 0x7d, 0xd8, 0xbd, 0xf0, 0xa9, 0x93,
0xf3, 0xf6, 0x9b, 0xa6, 0x95, 0x8c, 0xee, 0xc9, 0x41, 0x19, 0xd2, 0xc8, 0xf1, 0xfd, 0x4f, 0x7f,
0xf8, 0xd7, 0xf7, 0x7d, 0xed, 0xab, 0xf7, 0x7d, 0xed, 0xeb, 0xf7, 0x7d, 0xed, 0xcb, 0x0f, 0xfd,
0x07, 0x5f, 0x7d, 0xe8, 0x3f, 0xf8, 0xe7, 0x87, 0xfe, 0x03, 0x90, 0x7f, 0x13, 0x3f, 0xd3, 0xbe,
0x78, 0x34, 0x0f, 0x22, 0xea, 0x06, 0x13, 0x69, 0xe8, 0x93, 0xab, 0xe7, 0x6f, 0xb7, 0x10, 0xec,
0x07, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x4c, 0x01, 0x70, 0x8a, 0x14, 0x00, 0x00,
// 1729 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xdd, 0x6e, 0xdb, 0xc8,
0x15, 0x0e, 0x45, 0xd9, 0x96, 0x8e, 0x64, 0x45, 0x99, 0x58, 0x36, 0x4d, 0xdb, 0x92, 0xc2, 0xd4,
0xad,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, 0x90, 0x3f, 0x1a, 0xbf,
0xd0, 0xbe, 0x7e, 0x34, 0x0d, 0x22, 0xea, 0x06, 0x23, 0x09, 0xf4, 0xd9, 0xcd, 0xb3, 0x37, 0x9b,
0x48, 0xf6, 0xa3, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x12, 0x32, 0x62, 0xac, 0xa5, 0x14, 0x00,
0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -2737,6 +2747,13 @@ func (m *ListDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.FeeType) > 0 {
i -= len(m.FeeType)
copy(dAtA[i:], m.FeeType)
i = encodeVarintDocument(dAtA, i, uint64(len(m.FeeType)))
i--
dAtA[i] = 0x6a
}
if len(m.CreatedAt) > 0 {
for iNdEx := len(m.CreatedAt) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.CreatedAt[iNdEx])
@ -3680,6 +3697,10 @@ func (m *ListDocumentRequest) Size() (n int) {
n += 1 + l + sovDocument(uint64(l))
}
}
l = len(m.FeeType)
if l > 0 {
n += 1 + l + sovDocument(uint64(l))
}
return n
}
@ -5971,6 +5992,38 @@ func (m *ListDocumentRequest) Unmarshal(dAtA []byte) error {
}
m.CreatedAt = append(m.CreatedAt, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 13:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field FeeType", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDocument
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDocument
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDocument
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.FeeType = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipDocument(dAtA[iNdEx:])

@ -86,6 +86,7 @@ message ListDocumentRequest {
int64 limit = 10; // 0pagesize
string ext = 11; //
repeated string created_at = 12; //
string fee_type = 13; //
}
//

File diff suppressed because it is too large Load Diff

@ -0,0 +1,497 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: api/v1/punishment.proto
/*
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package v1
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
func request_PunishmentAPI_CreatePunishment_0(ctx context.Context, marshaler runtime.Marshaler, client PunishmentAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreatePunishmentRequest
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.CreatePunishment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_PunishmentAPI_CreatePunishment_0(ctx context.Context, marshaler runtime.Marshaler, server PunishmentAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreatePunishmentRequest
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.CreatePunishment(ctx, &protoReq)
return msg, metadata, err
}
func request_PunishmentAPI_UpdatePunishment_0(ctx context.Context, marshaler runtime.Marshaler, client PunishmentAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq Punishment
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.UpdatePunishment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_PunishmentAPI_UpdatePunishment_0(ctx context.Context, marshaler runtime.Marshaler, server PunishmentAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq Punishment
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.UpdatePunishment(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_PunishmentAPI_GetPunishment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_PunishmentAPI_GetPunishment_0(ctx context.Context, marshaler runtime.Marshaler, client PunishmentAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetPunishmentRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PunishmentAPI_GetPunishment_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetPunishment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_PunishmentAPI_GetPunishment_0(ctx context.Context, marshaler runtime.Marshaler, server PunishmentAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetPunishmentRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PunishmentAPI_GetPunishment_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetPunishment(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_PunishmentAPI_ListPunishment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_PunishmentAPI_ListPunishment_0(ctx context.Context, marshaler runtime.Marshaler, client PunishmentAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListPunishmentRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PunishmentAPI_ListPunishment_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListPunishment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_PunishmentAPI_ListPunishment_0(ctx context.Context, marshaler runtime.Marshaler, server PunishmentAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListPunishmentRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PunishmentAPI_ListPunishment_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListPunishment(ctx, &protoReq)
return msg, metadata, err
}
func request_PunishmentAPI_CancelPunishment_0(ctx context.Context, marshaler runtime.Marshaler, client PunishmentAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CancelPunishmentRequest
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.CancelPunishment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_PunishmentAPI_CancelPunishment_0(ctx context.Context, marshaler runtime.Marshaler, server PunishmentAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CancelPunishmentRequest
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.CancelPunishment(ctx, &protoReq)
return msg, metadata, err
}
// RegisterPunishmentAPIHandlerServer registers the http handlers for service PunishmentAPI to "mux".
// UnaryRPC :call PunishmentAPIServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPunishmentAPIHandlerFromEndpoint instead.
func RegisterPunishmentAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PunishmentAPIServer) error {
mux.Handle("POST", pattern_PunishmentAPI_CreatePunishment_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_PunishmentAPI_CreatePunishment_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_PunishmentAPI_CreatePunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_PunishmentAPI_UpdatePunishment_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_PunishmentAPI_UpdatePunishment_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_PunishmentAPI_UpdatePunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_PunishmentAPI_GetPunishment_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_PunishmentAPI_GetPunishment_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_PunishmentAPI_GetPunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_PunishmentAPI_ListPunishment_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_PunishmentAPI_ListPunishment_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_PunishmentAPI_ListPunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_PunishmentAPI_CancelPunishment_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_PunishmentAPI_CancelPunishment_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_PunishmentAPI_CancelPunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterPunishmentAPIHandlerFromEndpoint is same as RegisterPunishmentAPIHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPunishmentAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterPunishmentAPIHandler(ctx, mux, conn)
}
// RegisterPunishmentAPIHandler registers the http handlers for service PunishmentAPI to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterPunishmentAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterPunishmentAPIHandlerClient(ctx, mux, NewPunishmentAPIClient(conn))
}
// RegisterPunishmentAPIHandlerClient registers the http handlers for service PunishmentAPI
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PunishmentAPIClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PunishmentAPIClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "PunishmentAPIClient" to call the correct interceptors.
func RegisterPunishmentAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PunishmentAPIClient) error {
mux.Handle("POST", pattern_PunishmentAPI_CreatePunishment_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_PunishmentAPI_CreatePunishment_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_PunishmentAPI_CreatePunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_PunishmentAPI_UpdatePunishment_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_PunishmentAPI_UpdatePunishment_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_PunishmentAPI_UpdatePunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_PunishmentAPI_GetPunishment_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_PunishmentAPI_GetPunishment_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_PunishmentAPI_GetPunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_PunishmentAPI_ListPunishment_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_PunishmentAPI_ListPunishment_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_PunishmentAPI_ListPunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_PunishmentAPI_CancelPunishment_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_PunishmentAPI_CancelPunishment_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_PunishmentAPI_CancelPunishment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_PunishmentAPI_CreatePunishment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "punishment"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_PunishmentAPI_UpdatePunishment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "punishment"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_PunishmentAPI_GetPunishment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "punishment"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_PunishmentAPI_ListPunishment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "punishment", "list"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_PunishmentAPI_CancelPunishment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "punishment", "cancel"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
forward_PunishmentAPI_CreatePunishment_0 = runtime.ForwardResponseMessage
forward_PunishmentAPI_UpdatePunishment_0 = runtime.ForwardResponseMessage
forward_PunishmentAPI_GetPunishment_0 = runtime.ForwardResponseMessage
forward_PunishmentAPI_ListPunishment_0 = runtime.ForwardResponseMessage
forward_PunishmentAPI_CancelPunishment_0 = runtime.ForwardResponseMessage
)

@ -0,0 +1,96 @@
syntax = "proto3";
import "google/protobuf/timestamp.proto";
import "gogoproto/gogo.proto";
// import "validate/validate.proto";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
package api.v1;
option go_package = "moredoc/api/v1;v1";
option java_multiple_files = true;
option java_package = "api.v1";
// proto
message Punishment {
google.protobuf.Timestamp end_time = 1 [ (gogoproto.stdtime) = true ];
google.protobuf.Timestamp created_at = 2 [ (gogoproto.stdtime) = true ];
google.protobuf.Timestamp updated_at = 3 [ (gogoproto.stdtime) = true ];
int64 id = 4;
int64 user_id = 5;
int32 type = 6;
bool enable = 7;
string operators = 8;
string remark = 9;
string reason = 10;
string username = 11;
}
message CancelPunishmentRequest { repeated int64 id = 1; }
message GetPunishmentRequest { int64 id = 1; }
message ListPunishmentRequest {
int64 page = 1;
int64 size = 2;
string wd = 3;
repeated string field = 4;
string order = 5;
repeated int32 type = 6;
repeated int32 enable = 7;
repeated int64 user_id = 8;
}
message CreatePunishmentRequest {
google.protobuf.Timestamp end_time = 1 [ (gogoproto.stdtime) = true ];
int64 id = 2;
repeated int64 user_id = 3;
repeated int32 type = 4;
bool enable = 5;
string remark = 6;
string reason = 7;
}
message ListPunishmentReply {
int64 total = 1;
repeated Punishment punishment = 2;
}
service PunishmentAPI {
rpc CreatePunishment(CreatePunishmentRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
post : '/api/v1/punishment',
body : '*',
};
}
rpc UpdatePunishment(Punishment) returns (google.protobuf.Empty) {
option (google.api.http) = {
put : '/api/v1/punishment',
body : '*',
};
}
rpc GetPunishment(GetPunishmentRequest) returns (Punishment) {
option (google.api.http) = {
get : '/api/v1/punishment',
};
}
rpc ListPunishment(ListPunishmentRequest) returns (ListPunishmentReply) {
option (google.api.http) = {
get : '/api/v1/punishment/list',
};
}
//
rpc CancelPunishment(CancelPunishmentRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
put : '/api/v1/punishment/cancel',
body : '*',
};
}
}

@ -590,14 +590,15 @@ func (m *FindPasswordRequest) GetCaptchaId() string {
// 用户列表请求
type ListUserRequest struct {
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
Wd string `protobuf:"bytes,3,opt,name=wd,proto3" json:"wd,omitempty"`
Sort string `protobuf:"bytes,4,opt,name=sort,proto3" json:"sort,omitempty"`
Id []int64 `protobuf:"varint,5,rep,packed,name=id,proto3" json:"id,omitempty"`
GroupId []int64 `protobuf:"varint,6,rep,packed,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
Status []int32 `protobuf:"varint,7,rep,packed,name=status,proto3" json:"status,omitempty"`
Limit int64 `protobuf:"varint,8,opt,name=limit,proto3" json:"limit,omitempty"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
Wd string `protobuf:"bytes,3,opt,name=wd,proto3" json:"wd,omitempty"`
Sort string `protobuf:"bytes,4,opt,name=sort,proto3" json:"sort,omitempty"`
Id []int64 `protobuf:"varint,5,rep,packed,name=id,proto3" json:"id,omitempty"`
GroupId []int64 `protobuf:"varint,6,rep,packed,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
Status []int32 `protobuf:"varint,7,rep,packed,name=status,proto3" json:"status,omitempty"`
Limit int64 `protobuf:"varint,8,opt,name=limit,proto3" json:"limit,omitempty"`
Field []string `protobuf:"bytes,9,rep,name=field,proto3" json:"field,omitempty"`
}
func (m *ListUserRequest) Reset() { *m = ListUserRequest{} }
@ -689,6 +690,13 @@ func (m *ListUserRequest) GetLimit() int64 {
return 0
}
func (m *ListUserRequest) GetField() []string {
if m != nil {
return m.Field
}
return nil
}
// 用户列表响应
type ListUserReply struct {
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
@ -1407,112 +1415,113 @@ func init() {
func init() { proto.RegisterFile("api/v1/user.proto", fileDescriptor_b74e2e33d57193df) }
var fileDescriptor_b74e2e33d57193df = []byte{
// 1674 bytes of a gzipped FileDescriptorProto
// 1687 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x4f, 0x6f, 0x23, 0x49,
0x15, 0x9f, 0xf6, 0x7f, 0x3f, 0x27, 0x99, 0xa4, 0xe2, 0xd8, 0x4e, 0x67, 0x26, 0x76, 0x7a, 0x05,
0x84, 0x61, 0x14, 0x33, 0x19, 0xc1, 0x4a, 0xb3, 0x5a, 0xa1, 0xcc, 0x64, 0x77, 0x15, 0x14, 0x44,
0xe8, 0x4c, 0x84, 0xb4, 0x7b, 0x88, 0x2a, 0xee, 0x8a, 0x29, 0xb6, 0xbb, 0xab, 0xa7, 0xbb, 0x1c,
0x6f, 0x38, 0x72, 0xe1, 0xba, 0x12, 0x5f, 0x03, 0x89, 0x1b, 0x27, 0x3e, 0x00, 0x27, 0xb4, 0xd2,
0x5e, 0x38, 0x2d, 0x68, 0x86, 0x2b, 0x97, 0xfd, 0x00, 0x08, 0xd5, 0xbf, 0xb6, 0xbb, 0x9d, 0x5e,
0x92, 0x99, 0x5b, 0xbf, 0x57, 0xaf, 0x7e, 0x55, 0xf5, 0xde, 0xef, 0xfd, 0xb1, 0x61, 0x0d, 0x47,
0x74, 0x78, 0xf5, 0x64, 0x38, 0x49, 0x48, 0xbc, 0x17, 0xc5, 0x8c, 0x33, 0x54, 0xc3, 0x11, 0xdd,
0xbb, 0x7a, 0x62, 0xf7, 0xc7, 0x8c, 0x8d, 0x7d, 0x32, 0x94, 0xda, 0x8b, 0xc9, 0xe5, 0x90, 0xd3,
0x80, 0x24, 0x1c, 0x07, 0x91, 0x32, 0xb4, 0xdb, 0x63, 0x36, 0x66, 0xf2, 0x73, 0x28, 0xbe, 0xb4,
0xf6, 0x81, 0xde, 0x26, 0x80, 0x71, 0x18, 0x32, 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x8d, 0x13, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -2761,6 +2770,15 @@ func (m *ListUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.Field) > 0 {
for iNdEx := len(m.Field) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Field[iNdEx])
copy(dAtA[i:], m.Field[iNdEx])
i = encodeVarintUser(dAtA, i, uint64(len(m.Field[iNdEx])))
i--
dAtA[i] = 0x4a
}
}
if m.Limit != 0 {
i = encodeVarintUser(dAtA, i, uint64(m.Limit))
i--
@ -3638,6 +3656,12 @@ func (m *ListUserRequest) Size() (n int) {
if m.Limit != 0 {
n += 1 + sovUser(uint64(m.Limit))
}
if len(m.Field) > 0 {
for _, s := range m.Field {
l = len(s)
n += 1 + l + sovUser(uint64(l))
}
}
return n
}
@ -5783,6 +5807,38 @@ func (m *ListUserRequest) Unmarshal(dAtA []byte) error {
break
}
}
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUser
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthUser
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthUser
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Field = append(m.Field, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipUser(dAtA[iNdEx:])

@ -90,6 +90,7 @@ message ListUserRequest {
repeated int64 group_id = 6; // ID
repeated int32 status = 7; //
int64 limit = 8; // 0pagesize
repeated string field = 9; //
}
//

@ -150,7 +150,7 @@ func (s *AttachmentAPIService) ListAttachment(ctx context.Context, req *pb.ListA
util.CopyStruct(&attachments, &pbAttachments)
var (
userIds []interface{}
userIds []int64
userIdIndexMap = make(map[int64][]int)
)
@ -186,7 +186,7 @@ func (s *AttachmentAPIService) UploadDocument(ctx *gin.Context) {
}
// 检查用户是否有权限上传文档
if !s.dbModel.CanIUploadDocument(userClaims.UserId) {
if !s.dbModel.CanIAccessUploadDocument(userClaims.UserId) {
ctx.JSON(http.StatusForbidden, ginResponse{Code: http.StatusForbidden, Message: "没有权限上传文档", Error: "没有权限上传文档"})
return
}

@ -47,6 +47,10 @@ func (s *CommentAPIService) CreateComment(ctx context.Context, req *pb.CreateCom
return nil, status.Errorf(codes.InvalidArgument, "验证码错误")
}
if yes, _ := s.dbModel.CanIAccessComment(userClaims.UserId); !yes {
return nil, status.Errorf(codes.PermissionDenied, "您已经被禁止发表评论")
}
comment := &model.Comment{}
err = util.CopyStruct(req, comment)
if err != nil {

@ -54,7 +54,7 @@ func (s *DocumentAPIService) CreateDocument(ctx context.Context, req *pb.CreateD
return nil, err
}
if !s.dbModel.CanIUploadDocument(userCliams.UserId) {
if !s.dbModel.CanIAccessUploadDocument(userCliams.UserId) {
return nil, status.Error(codes.PermissionDenied, "没有权限上传文档")
}
@ -276,6 +276,7 @@ func (s *DocumentAPIService) ListDocument(ctx context.Context, req *pb.ListDocum
QueryLike: make(map[string][]interface{}),
QueryRange: make(map[string][2]interface{}),
IsRecommend: req.IsRecommend,
FeeType: req.FeeType,
}
if len(req.Order) > 0 {
@ -673,6 +674,10 @@ func (s *DocumentAPIService) DownloadDocument(ctx context.Context, req *pb.Docum
userId = userClaims.UserId
}
if yes, _ := s.dbModel.CanIAccessDownload(userId); !yes {
return res, status.Errorf(codes.PermissionDenied, "您的账户已被禁止下载文档")
}
ip := ""
ips, _ := util.GetGRPCRemoteIP(ctx)
if len(ips) > 0 {

@ -34,6 +34,11 @@ func (s *FavoriteAPIService) CreateFavorite(ctx context.Context, req *pb.Favorit
return nil, err
}
yes, _ := s.dbModel.CanIAccessFavorite(userClaims.UserId)
if !yes {
return nil, status.Errorf(codes.PermissionDenied, "您已经被禁止收藏文档")
}
favorite := &model.Favorite{
UserId: userClaims.UserId,
DocumentId: req.DocumentId,

@ -0,0 +1,243 @@
package biz
import (
"context"
"strings"
pb "moredoc/api/v1"
"moredoc/middleware/auth"
"moredoc/model"
"moredoc/util"
"go.uber.org/zap"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/emptypb"
"gorm.io/gorm"
)
type PunishmentAPIService struct {
pb.UnimplementedPunishmentAPIServer
dbModel *model.DBModel
logger *zap.Logger
}
func NewPunishmentAPIService(dbModel *model.DBModel, logger *zap.Logger) (service *PunishmentAPIService) {
return &PunishmentAPIService{dbModel: dbModel, logger: logger.Named("PunishmentAPIService")}
}
func (s *PunishmentAPIService) checkPermission(ctx context.Context) (userClaims *auth.UserClaims, err error) {
return checkGRPCPermission(s.dbModel, ctx)
}
func (s *PunishmentAPIService) CreatePunishment(ctx context.Context, req *pb.CreatePunishmentRequest) (*emptypb.Empty, error) {
userClaims, err := s.checkPermission(ctx)
if err != nil {
return nil, err
}
if len(req.UserId) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "请选择用户")
}
if len(req.Type) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "请选择处罚类型")
}
for _, userId := range req.UserId {
if userId == 1 {
continue
}
for _, typ := range req.Type {
punishment := &model.Punishment{
UserId: userId,
Type: int(typ),
Enable: req.Enable,
Reason: req.Reason,
Remark: req.Remark,
EndTime: req.EndTime,
}
s.logger.Debug("CreatePunishment", zap.Any("punishment", punishment), zap.Any("req", req))
punishment.Operators = s.dbModel.MakePunishmentOperators(userClaims.UserId, typ)
err = s.dbModel.CreatePunishment(punishment)
if err != nil {
s.logger.Error("CreatePunishment", zap.Error(err))
return nil, status.Errorf(codes.Internal, err.Error())
}
}
}
return &emptypb.Empty{}, nil
}
func (s *PunishmentAPIService) UpdatePunishment(ctx context.Context, req *pb.Punishment) (*emptypb.Empty, error) {
userClaims, err := s.checkPermission(ctx)
if err != nil {
return nil, err
}
punishment := &model.Punishment{}
err = util.CopyStruct(req, punishment)
if err != nil {
s.logger.Error("CopyStruct", zap.Error(err))
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
s.logger.Debug("UpdatePunishment", zap.Any("punishment", punishment), zap.Any("req", req))
if existPunishment, _ := s.dbModel.GetPunishment(punishment.Id, "id", "operators"); existPunishment.Id > 0 {
punishment.Operators = s.dbModel.MakePunishmentOperators(userClaims.UserId, req.Type, existPunishment.Operators)
}
err = s.dbModel.UpdatePunishment(punishment)
if err != nil {
s.logger.Error("UpdatePunishment", zap.Error(err))
return nil, status.Errorf(codes.Internal, err.Error())
}
return &emptypb.Empty{}, nil
}
func (s *PunishmentAPIService) GetPunishment(ctx context.Context, req *pb.GetPunishmentRequest) (*pb.Punishment, error) {
_, err := s.checkPermission(ctx)
if err != nil {
return nil, err
}
punishment, err := s.dbModel.GetPunishment(req.Id)
if err != nil {
s.logger.Error("GetPunishment", zap.Error(err))
return nil, status.Errorf(codes.Internal, err.Error())
}
res := &pb.Punishment{}
err = util.CopyStruct(punishment, res)
if err != nil {
s.logger.Error("CopyStruct", zap.Error(err))
return nil, status.Errorf(codes.Internal, err.Error())
}
if punishment.UserId > 0 {
user, _ := s.dbModel.GetUser(punishment.UserId, "id", "username")
if user.Id > 0 {
res.Username = user.Username
}
}
return res, nil
}
func (s *PunishmentAPIService) ListPunishment(ctx context.Context, req *pb.ListPunishmentRequest) (*pb.ListPunishmentReply, error) {
_, err := s.checkPermission(ctx)
if err != nil {
return nil, err
}
opt := &model.OptionGetPunishmentList{
Page: int(req.Page),
Size: int(req.Size_),
WithCount: true,
SelectFields: req.Field,
QueryLike: make(map[string][]interface{}),
QueryIn: make(map[string][]interface{}),
}
if len(req.UserId) > 0 {
opt.QueryIn["user_id"] = util.Slice2Interface(req.UserId)
}
if len(req.Type) > 0 {
opt.QueryIn["type"] = util.Slice2Interface(req.Type)
}
if len(req.Enable) > 0 {
opt.QueryIn["enable"] = util.Slice2Interface(req.Enable)
}
if req.Order != "" {
opt.Sort = strings.Split(req.Order, ",")
}
if req.Wd != "" {
wd := strings.TrimSpace(req.Wd)
opt.QueryLike["reason"] = []interface{}{wd}
opt.QueryLike["remark"] = []interface{}{wd}
}
data, total, err := s.dbModel.GetPunishmentList(opt)
if err != nil && err != gorm.ErrRecordNotFound {
s.logger.Error("GetPunishmentList", zap.Error(err))
return nil, status.Errorf(codes.Internal, err.Error())
}
res := &pb.ListPunishmentReply{
Total: total,
}
err = util.CopyStruct(data, &res.Punishment)
if err != nil {
s.logger.Error("CopyStruct", zap.Error(err))
return nil, status.Errorf(codes.Internal, err.Error())
}
if len(res.Punishment) > 0 {
var (
userIds []int64
userIdMapIndexes = make(map[int64][]int)
)
for i, v := range res.Punishment {
userIds = append(userIds, v.UserId)
userIdMapIndexes[v.UserId] = append(userIdMapIndexes[v.UserId], i)
}
users, _, _ := s.dbModel.GetUserList(&model.OptionGetUserList{
Ids: userIds,
WithCount: false,
SelectFields: []string{
"id",
"username",
},
})
for _, v := range users {
if indexes, ok := userIdMapIndexes[v.Id]; ok {
for _, index := range indexes {
res.Punishment[index].Username = v.Username
}
}
}
}
return res, nil
}
// 取消惩罚
func (s *PunishmentAPIService) CancelPunishment(ctx context.Context, req *pb.CancelPunishmentRequest) (*emptypb.Empty, error) {
userCliams, err := s.checkPermission(ctx)
if err != nil {
return nil, err
}
s.logger.Debug("CancelPunishment", zap.Any("req", req))
data, _, err := s.dbModel.GetPunishmentList(&model.OptionGetPunishmentList{
Ids: req.Id,
})
if err != nil && err != gorm.ErrRecordNotFound {
s.logger.Error("GetPunishmentList", zap.Error(err))
return nil, status.Errorf(codes.Internal, err.Error())
}
for _, item := range data {
item.Enable = false
item.Operators = s.dbModel.MakePunishmentOperators(userCliams.UserId, 0, item.Operators)
err = s.dbModel.UpdatePunishment(&item, "enable", "operators")
if err != nil {
s.logger.Error("UpdatePunishment", zap.Error(err))
return nil, status.Errorf(codes.Internal, err.Error())
}
}
return &emptypb.Empty{}, nil
}

@ -63,6 +63,11 @@ func (s *UserAPIService) Register(ctx context.Context, req *pb.RegisterAndLoginR
return nil, status.Errorf(codes.InvalidArgument, "邮箱格式不正确")
}
req.Username = strings.TrimSpace(req.Username)
if util.IsValidEmail(req.Username) || util.IsValidMobile(req.Username) {
return nil, status.Errorf(codes.InvalidArgument, "出于隐私保护,用户名不能是邮箱或手机号码")
}
cfg := s.dbModel.GetConfigOfSecurity(
model.ConfigSecurityEnableCaptchaRegister,
model.ConfigSecurityEnableRegister,
@ -74,7 +79,7 @@ func (s *UserAPIService) Register(ctx context.Context, req *pb.RegisterAndLoginR
}
if cfg.IsClose {
return nil, status.Errorf(codes.InvalidArgument, "网站已关闭,时不允许注册")
return nil, status.Errorf(codes.InvalidArgument, "网站已关闭,时不允许注册")
}
if cfg.EnableCaptchaRegister && !captcha.VerifyCaptcha(req.CaptchaId, req.Captcha) {
@ -250,17 +255,18 @@ func (s *UserAPIService) UpdateUserProfile(ctx context.Context, req *pb.User) (*
Mobile: req.Mobile, Email: req.Email, Address: req.Address,
Signature: req.Signature, Avatar: req.Avatar,
Realname: req.Realname, Identity: req.Identity,
Status: int8(req.Status), Id: req.Id,
// Status: int8(req.Status),
Id: req.Id,
}
// 更改用户自己的资料
if req.Id <= 0 || req.Id == userClaims.UserId {
user.Id = userClaims.UserId
exist, _ := s.dbModel.GetUser(user.Id, "status")
if exist.Status != model.UserStatusNormal {
// 非正常的用户状态,禁止修改个人信息,以避免用户修改成非法信息等
return nil, status.Errorf(codes.InvalidArgument, "您的用户状态异常,禁止修改个人信息")
}
// exist, _ := s.dbModel.GetUser(user.Id, "status")
// if exist.Status != model.UserStatusNormal {
// // 非正常的用户状态,禁止修改个人信息,以避免用户修改成非法信息等
// return nil, status.Errorf(codes.InvalidArgument, "您的用户状态异常,禁止修改个人信息")
// }
if err := s.dbModel.UpdateUser(user, fields...); err != nil {
return nil, status.Errorf(codes.Internal, err.Error())
@ -372,9 +378,10 @@ func (s *UserAPIService) ListUser(ctx context.Context, req *pb.ListUserRequest)
}
opt := &model.OptionGetUserList{
Page: int(req.Page),
Size: int(req.Size_),
WithCount: true,
Page: int(req.Page),
Size: int(req.Size_),
WithCount: true,
SelectFields: req.Field,
}
if req.Limit > 0 {
opt.Page = 1
@ -383,12 +390,8 @@ func (s *UserAPIService) ListUser(ctx context.Context, req *pb.ListUserRequest)
}
if len(req.Id) > 0 {
var ids []interface{}
for _, id := range req.Id {
ids = append(ids, id)
}
opt.WithCount = false
opt.Ids = ids
opt.Ids = req.Id
}
if len(req.GroupId) > 0 {
@ -504,6 +507,11 @@ func (s *UserAPIService) AddUser(ctx context.Context, req *pb.SetUserRequest) (*
return nil, err
}
req.Username = strings.TrimSpace(req.Username)
if util.IsValidEmail(req.Username) || util.IsValidMobile(req.Username) {
return nil, status.Errorf(codes.InvalidArgument, "出于隐私保护,用户名不能是邮箱或手机号码")
}
err = validate.ValidateStruct(req, s.getValidFieldMap())
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@ -543,7 +551,7 @@ func (s *UserAPIService) CanIUploadDocument(ctx context.Context, req *emptypb.Em
return nil, err
}
if !s.dbModel.CanIUploadDocument(userClaims.UserId) {
if !s.dbModel.CanIAccessUploadDocument(userClaims.UserId) {
return nil, status.Errorf(codes.PermissionDenied, "您没有上传文档的权限")
}

@ -11,7 +11,7 @@ type Category struct {
Id int64 `form:"id" json:"id,omitempty" gorm:"primaryKey;autoIncrement;column:id;comment:;"`
Icon string `form:"icon" json:"icon,omitempty" gorm:"column:icon;comment:分类图标;type:varchar(255);size:255;"`
Cover string `form:"cover" json:"cover,omitempty" gorm:"column:cover;comment:分类封面;type:varchar(255);size:255;"`
ParentId int `form:"parent_id" json:"parent_id,omitempty" gorm:"column:parent_id;type:int(11);size:11;default:0;index:parent_id_title,unique;index:parent_id;comment:上级ID;"`
ParentId int64 `form:"parent_id" json:"parent_id,omitempty" gorm:"column:parent_id;type:int(11);size:11;default:0;index:parent_id_title,unique;index:parent_id;comment:上级ID;"`
Title string `form:"title" json:"title,omitempty" gorm:"column:title;type:varchar(64);size:64;index:parent_id_title,unique;comment:分类名称;"`
DocCount int `form:"doc_count" json:"doc_count,omitempty" gorm:"column:doc_count;type:int(11);size:11;default:0;comment:文档统计;"`
Sort int `form:"sort" json:"sort,omitempty" gorm:"column:sort;type:int(11);size:11;default:0;index:idx_sort;comment:排序,值越大越靠前;"`
@ -41,7 +41,95 @@ func (m *DBModel) CreateCategory(category *Category) (err error) {
// UpdateCategory 更新Category如果需要更新指定字段则请指定updateFields参数
func (m *DBModel) UpdateCategory(category *Category, updateFields ...string) (err error) {
db := m.db.Model(category)
var existCategory Category
err = m.db.Where("id = ?", category.Id).Find(&existCategory).Error
if err != nil && err != gorm.ErrRecordNotFound {
m.logger.Error("UpdateCategory", zap.Error(err))
return
}
tx := m.db.Begin()
defer func() {
if err != nil {
tx.Rollback()
return
}
tx.Commit()
}()
// 如果更新了父分类,则需要更新文档统计
if existCategory.ParentId != category.ParentId {
var (
oldParentIds, newParentIds, documentIds []int64
docCates []DocumentCategory
limit = 100
page = 1
modelDocCate = &DocumentCategory{}
modelCate = &Category{}
)
oldParentIds = m.GetCategoryParentIds(existCategory.Id)
if category.ParentId > 0 {
newParentIds = append(newParentIds, category.ParentId)
newParentIds = append(newParentIds, m.GetCategoryParentIds(category.ParentId)...)
}
// 获取需要更新的文档ID
for {
m.db.Model(modelDocCate).Select("document_id", "category_id").Where("category_id = ?", existCategory.Id).Limit(limit).Offset((page - 1) * limit).Find(&docCates)
if len(docCates) == 0 {
break
}
page++
for _, v := range docCates {
documentIds = append(documentIds, v.DocumentId)
}
if len(oldParentIds) > 0 {
// 删除旧的分类关联
err = tx.Model(modelDocCate).Where("category_id in (?) and document_id in (?)", oldParentIds, documentIds).Delete(modelDocCate).Error
if err != nil {
m.logger.Error("UpdateCategory", zap.Error(err))
return
}
// 更新旧的分类统计
err = tx.Model(modelCate).Where("id in (?)", oldParentIds).Update("doc_count", gorm.Expr("doc_count - ?", len(documentIds))).Error
if err != nil {
m.logger.Error("UpdateCategory", zap.Error(err))
return
}
}
if len(newParentIds) > 0 {
var newDocCates []DocumentCategory
for _, documentId := range documentIds {
for _, newCateId := range newParentIds {
newDocCates = append(newDocCates, DocumentCategory{
DocumentId: documentId,
CategoryId: newCateId,
})
}
}
// 创建新的分类关联
err = tx.Create(&newDocCates).Error
if err != nil {
m.logger.Error("UpdateCategory", zap.Error(err))
return
}
// 更新新的分类统计
err = tx.Model(modelCate).Where("id in (?)", newParentIds).Update("doc_count", gorm.Expr("doc_count + ?", len(documentIds))).Error
if err != nil {
m.logger.Error("UpdateCategory", zap.Error(err))
return
}
}
}
}
db := tx.Model(category)
updateFields = m.FilterValidFields(Category{}.TableName(), updateFields...)
if len(updateFields) > 0 { // 更新指定字段
@ -53,6 +141,7 @@ func (m *DBModel) UpdateCategory(category *Category, updateFields ...string) (er
err = db.Where("id = ?", category.Id).Updates(category).Error
if err != nil {
m.logger.Error("UpdateCategory", zap.Error(err))
return
}
if category.Cover != "" {
@ -79,7 +168,7 @@ func (m *DBModel) GetCategory(id interface{}, fields ...string) (category Catego
}
// GetCategoryByParentIdTitle(parentId int, title string, fields ...string) 根据唯一索引获取Category
func (m *DBModel) GetCategoryByParentIdTitle(parentId int, title string, fields ...string) (category Category, err error) {
func (m *DBModel) GetCategoryByParentIdTitle(parentId int64, title string, fields ...string) (category Category, err error) {
db := m.db
fields = m.FilterValidFields(Category{}.TableName(), fields...)
@ -137,7 +226,7 @@ func (m *DBModel) GetCategoryList(opt *OptionGetCategoryList) (categoryList []Ca
db = db.Offset((opt.Page - 1) * opt.Size).Limit(opt.Size)
err = db.Order("parent_id asc, sort desc, id asc").Find(&categoryList).Error
err = db.Order("parent_id asc, sort desc, title asc").Find(&categoryList).Error
if err != nil && err != gorm.ErrRecordNotFound {
m.logger.Error("GetCategoryList", zap.Error(err))
}
@ -177,3 +266,19 @@ func (m *DBModel) CountCategory() (count int64, err error) {
}
return
}
// 查询指定分类ID的所有父级分类ID
func (m *DBModel) GetCategoryParentIds(id int64) (ids []int64) {
var category Category
err := m.db.Model(&Category{}).Select("id", "parent_id").Where("id = ?", id).Find(&category).Error
if err != nil && err != gorm.ErrRecordNotFound {
m.logger.Error("GetCategoryParentIds", zap.Error(err), zap.Int64("id", id))
return
}
if category.ParentId > 0 {
ids = append(ids, category.ParentId)
ids = append(ids, m.GetCategoryParentIds(category.ParentId)...)
}
return
}

@ -692,7 +692,7 @@ func (m *DBModel) initConfig() (err error) {
{Category: ConfigCategoryFooter, Name: ConfigFooterFeedback, Label: "意见反馈", Value: "/article/feedback", Placeholder: "请输入意见反馈的链接地址,留空表示不显示", InputType: InputTypeText, Sort: 28, Options: ""},
// 转换配置项
{Category: ConfigCategoryConverter, Name: ConfigConverterMaxPreview, Label: "最大预览页数", Value: "0", Placeholder: "文档允许的最大预览页数0表示不限制", InputType: InputTypeNumber, Sort: 15, Options: ""},
{Category: ConfigCategoryConverter, Name: ConfigConverterMaxPreview, Label: "最大预览页数", Value: "12", Placeholder: "文档允许的最大预览页数0表示不限制", InputType: InputTypeNumber, Sort: 15, Options: ""},
{Category: ConfigCategoryConverter, Name: ConfigConverterTimeout, Label: "转换超时(分钟)", Value: "30", Placeholder: "文档转换超时时间默认为30分钟", InputType: InputTypeNumber, Sort: 16, Options: ""},
{Category: ConfigCategoryConverter, Name: ConfigConverterEnableGZIP, Label: "是否启用GZIP压缩", Value: "true", Placeholder: "是否对文档SVG预览文件启用GZIP压缩启用后转换效率会【稍微】下降但相对直接的SVG文件减少75%的存储空间", InputType: InputTypeSwitch, Sort: 17, Options: ""},
{Category: ConfigCategoryConverter, Name: ConfigConverterEnableSVGO, Label: "是否启用SVGO", Value: "false", Placeholder: "是否对文档SVG预览文件启用SVGO压缩启用后转换效率会【明显】下降但相对直接的SVG文件减少50%左右的存储空间", InputType: InputTypeSwitch, Sort: 18, Options: ""},

@ -47,10 +47,10 @@ func getPermissions() (permissions []Permission) {
{Title: "恢复回收站文档", Description: "", Method: "GRPC", Path: "/api.v1.RecycleAPI/RecoverRecycleDocument"},
{Title: "清空回收站文档", Description: "", Method: "GRPC", Path: "/api.v1.RecycleAPI/ClearRecycleDocument"},
{Title: "删除回收站文档", Description: "", Method: "GRPC", Path: "/api.v1.RecycleAPI/DeleteRecycleDocument"},
{Title: "文章管理", Description: "", Method: "GRPC", Path: "/api.v1.ArticleAPI/ListArticle"},
{Title: "更新文章", Description: "", Method: "GRPC", Path: "/api.v1.ArticleAPI/UpdateArticle"},
{Title: "删除文章", Description: "", Method: "GRPC", Path: "/api.v1.ArticleAPI/DeleteArticle"},
{Title: "创建文章", Description: "", Method: "GRPC", Path: "/api.v1.ArticleAPI/CreateArticle"},
{Title: "文章/单页管理", Description: "", Method: "GRPC", Path: "/api.v1.ArticleAPI/ListArticle"},
{Title: "更新文章/单页", Description: "", Method: "GRPC", Path: "/api.v1.ArticleAPI/UpdateArticle"},
{Title: "删除文章/单页", Description: "", Method: "GRPC", Path: "/api.v1.ArticleAPI/DeleteArticle"},
{Title: "创建文章/单页", Description: "", Method: "GRPC", Path: "/api.v1.ArticleAPI/CreateArticle"},
{Title: "上传文章图片和音视频", Description: "", Method: "POST", Path: "/api/v1/upload/article"},
{Title: "上传文档分类封面", Description: "", Method: "POST", Path: "/api/v1/upload/category"},
{Title: "上传配置图片文件", Description: "", Method: "POST", Path: "/api/v1/upload/config"},
@ -68,6 +68,14 @@ func getPermissions() (permissions []Permission) {
{Title: "更新头像", Description: "", Method: "POST", Path: "/api/v1/upload/avatar"},
{Title: "一键重转失败文档", Description: "", Method: "GRPC", Path: "/api.v1.DocumentAPI/SetDocumentReconvert"},
{Title: "批量修改文档分类", Description: "", Method: "GRPC", Path: "/api.v1.DocumentAPI/SetDocumentsCategory"},
{Title: "编辑导航", Description: "", Method: "GRPC", Path: "/api.v1.NavigationAPI/UpdateNavigation"},
{Title: "新增导航", Description: "", Method: "GRPC", Path: "/api.v1.NavigationAPI/CreateNavigation"},
{Title: "删除导航", Description: "", Method: "GRPC", Path: "/api.v1.NavigationAPI/DeleteNavigation"},
{Title: "获取用户处罚列表", Description: "", Method: "GRPC", Path: "/api.v1.PunishmentAPI/ListPunishment"},
{Title: "获取单个处罚信息", Description: "", Method: "GRPC", Path: "/api.v1.PunishmentAPI/GetPunishment"},
{Title: "取消用户处罚", Description: "", Method: "GRPC", Path: "/api.v1.PunishmentAPI/CancelPunishment"},
{Title: "更新用户处罚", Description: "", Method: "GRPC", Path: "/api.v1.PunishmentAPI/UpdatePunishment"},
{Title: "添加用户处罚", Description: "", Method: "GRPC", Path: "/api.v1.PunishmentAPI/CreatePunishment"},
}
return
}

@ -40,7 +40,7 @@ var DocumentStatusMap = map[int]struct{}{
type Document struct {
Id int64 `form:"id" json:"id,omitempty" gorm:"primaryKey;autoIncrement;column:id;comment:;"`
Title string `form:"title" json:"title,omitempty" gorm:"column:title;type:varchar(255);size:255;comment:文档名称;"`
Keywords string `form:"keywords" json:"keywords,omitempty" gorm:"column:keywords;type:varchar(128);size:128;comment:文档关键字;"`
Keywords string `form:"keywords" json:"keywords,omitempty" gorm:"column:keywords;type:varchar(255);size:255;comment:文档关键字;"`
Description string `form:"description" json:"description,omitempty" gorm:"column:description;type:varchar(255);size:255;comment:文档描述;"`
UserId int64 `form:"user_id" json:"user_id,omitempty" gorm:"column:user_id;type:bigint(20);size:20;default:0;index:user_id;comment:文档所属用户ID;"`
Width int `form:"width" json:"width,omitempty" gorm:"column:width;type:int(11);size:11;default:0;comment:宽;"`
@ -53,7 +53,7 @@ type Document struct {
CommentCount int `form:"comment_count" json:"comment_count,omitempty" gorm:"column:comment_count;type:int(11);size:11;default:0;comment:评论人次;"`
Score int `form:"score" json:"score,omitempty" gorm:"column:score;type:int(11);size:11;default:300;comment:评分3位整数表示500表示5分;"`
ScoreCount int `form:"score_count" json:"score_count,omitempty" gorm:"column:score_count;type:int(11);size:11;default:0;comment:评分数量;"`
Price int `form:"price" json:"price,omitempty" gorm:"column:price;type:int(11);size:11;default:0;comment:价格0表示免费;"`
Price int `form:"price" json:"price,omitempty" gorm:"column:price;type:int(11);size:11;default:0;comment:价格0表示免费;index:idx_price;"`
Size int64 `form:"size" json:"size,omitempty" gorm:"column:size;type:bigint(20);size:20;default:0;comment:文件大小;"`
Ext string `form:"ext" json:"ext,omitempty" gorm:"column:ext;type:varchar(16);size:16;index:idx_ext;comment:文件扩展名"`
Status int `form:"status" json:"status,omitempty" gorm:"column:status;type:smallint(6);size:6;default:0;index:status;comment:文档状态0 待转换1 转换中2 转换完成3 转换失败4 禁用;"`
@ -189,6 +189,7 @@ type OptionGetDocumentList struct {
Sort []string
IsRecycle bool // 是否是回收站模式查询
IsRecommend []bool
FeeType string // 费用类型free免费charge收费
}
// GetDocumentList 获取Document列表
@ -225,6 +226,15 @@ func (m *DBModel) GetDocumentList(opt *OptionGetDocumentList) (documentList []Do
}
}
if opt.FeeType != "" {
switch opt.FeeType {
case "free":
db = db.Where("d.`price` = ?", 0)
case "charge":
db = db.Where("d.`price` > ?", 0)
}
}
if opt.WithCount {
err = db.Group("d.id").Count(&total).Error
if err != nil {

@ -27,6 +27,22 @@ type TableColumn struct {
Comment string `gorm:"Comment"`
}
type TableIndex struct {
Table string `gorm:"column:Table"` // 表名
NonUnique int `gorm:"column:Non_unique"`
KeyName string `gorm:"column:Key_name"` // 索引名称
SeqInIndex int `gorm:"column:Seq_in_index"`
ColumnName string `gorm:"column:Column_name"` // 索引字段名称
Collation string `gorm:"column:Collation"` // 字符集
Cardinality int `gorm:"column:Cardinality"`
SubPart sql.NullInt64 `gorm:"column:Sub_part"`
Packed sql.NullString `gorm:"column:Packed"`
Null string `gorm:"column:Null"`
IndexType string `gorm:"column:Index_type"`
Comment string `gorm:"column:Comment"` // 索引备注
IndexComment string `gorm:"column:Index_comment"`
}
// 默认表前缀
var (
tablePrefix string = "mnt_"
@ -162,10 +178,15 @@ func (m *DBModel) SyncDB() (err error) {
&Sign{},
&Report{},
&Navigation{},
&Punishment{},
}
m.alterTableBeforeSyncDB()
if err = m.db.AutoMigrate(tableModels...); err != nil {
m.logger.Fatal("SyncDB", zap.Error(err))
return
}
m.alterTableAfterSyncDB()
if err = m.initDatabase(); err != nil {
m.logger.Fatal("SyncDB", zap.Error(err))
@ -185,6 +206,36 @@ func (m *DBModel) ShowTables() (tables []string, err error) {
return
}
func (m *DBModel) alterTableBeforeSyncDB() {
// 查询mnt_user表将email字段由唯一索引删掉以便变更为普通索引
tableUser := User{}.TableName()
indexes := m.ShowIndexes(tableUser)
m.logger.Debug("alterTableBeforeSyncDB", zap.String("table", tableUser), zap.Any("indexes", indexes))
if len(indexes) > 0 {
for _, index := range indexes {
if index.ColumnName == "email" && index.NonUnique == 0 { // 唯一索引,需要删除原索引
err := m.db.Exec(fmt.Sprintf("alter table %s drop index %s", tableUser, index.KeyName)).Error
if err != nil {
m.logger.Error("alterTableBeforeSyncDB", zap.Error(err))
}
}
}
}
}
func (m *DBModel) alterTableAfterSyncDB() {
}
func (m *DBModel) ShowIndexes(table string) (indexes []TableIndex) {
sql := "show index from " + table
err := m.db.Raw(sql).Find(&indexes).Error
if err != nil {
m.logger.Error("ShowIndexes", zap.Error(err))
}
return
}
// FilterValidFields 过滤掉不存在的字段
func (m *DBModel) FilterValidFields(tableName string, fields ...string) (validFields []string) {
alias := ""

@ -0,0 +1,188 @@
package model
import (
"time"
jsoniter "github.com/json-iterator/go"
"go.uber.org/zap"
"gorm.io/gorm"
)
const (
PunishmentTypeDisabled = 1 // 禁用账户:禁止登录、禁止评论、禁止上传、禁止下载、禁止收藏
PunishmentTypeCommentLimited = 2 // 禁止评论
PunishmentTypeUploadLimited = 3 // 禁止上传
PunishmentTypeDownloadLimited = 4 // 禁止下载
PunishmentTypeFavoriteLimited = 5 // 禁止收藏
)
type Punishment struct {
Id int64 `form:"id" json:"id,omitempty" gorm:"primaryKey;autoIncrement;column:id;comment:自增主键;"`
UserId int64 `form:"user_id" json:"user_id,omitempty" gorm:"column:user_id;type:bigint(20);size:20;default:0;index:idx_user_id;comment:用户ID;"`
Type int `form:"type" json:"type,omitempty" gorm:"column:type;type:int(11);size:11;default:0;comment:惩罚类型对应user表的status;"`
Enable bool `form:"enable" json:"enable,omitempty" gorm:"column:enable;type:tinyint(1);size:1;default:0;index:idx_enable;comment:0 关闭1启用;"`
Operators string `form:"operators" json:"operators,omitempty" gorm:"column:operators;type:text;comment:操作信息;"`
Reason string `form:"reason" json:"reason,omitempty" gorm:"column:reason;type:text;comment:惩罚原因;"`
Remark string `form:"remark" json:"remark,omitempty" gorm:"column:remark;type:text;comment:惩罚备注;"`
EndTime *time.Time `form:"end_time" json:"end_time,omitempty" gorm:"column:end_time;type:datetime;comment:惩罚结束时间,没有结束时间,则表示永久;"`
CreatedAt *time.Time `form:"created_at" json:"created_at,omitempty" gorm:"column:created_at;type:datetime;comment:创建时间;"`
UpdatedAt *time.Time `form:"updated_at" json:"updated_at,omitempty" gorm:"column:updated_at;type:datetime;comment:更新时间;"`
}
type PunishmentOperator struct {
UserId int64 `json:"u"`
Type int32 `json:"t"`
Timestamp int64 `json:"ts"`
}
func (Punishment) TableName() string {
return tablePrefix + "punishment"
}
func (m *DBModel) MakePunishmentOperators(userId int64, punishmentType int32, operaterStr ...string) string {
var operators []PunishmentOperator
if len(operaterStr) > 0 && operaterStr[0] != "" {
err := jsoniter.Unmarshal([]byte(operaterStr[0]), &operators)
if err != nil {
m.logger.Error("FormatPunishmentOperators", zap.Error(err))
return operaterStr[0]
}
}
operators = append(operators, PunishmentOperator{
UserId: userId,
Type: punishmentType,
Timestamp: time.Now().Unix(),
})
operatersByte, err := jsoniter.Marshal(operators)
if err != nil {
m.logger.Error("FormatPunishmentOperators", zap.Error(err))
if len(operaterStr) > 0 {
return operaterStr[0]
}
return ""
}
return string(operatersByte)
}
// CreatePunishment 创建Punishment
func (m *DBModel) CreatePunishment(punishment *Punishment) (err error) {
err = m.db.Create(punishment).Error
if err != nil {
m.logger.Error("CreatePunishment", zap.Error(err))
return
}
return
}
// UpdatePunishment 更新Punishment如果需要更新指定字段则请指定updateFields参数
func (m *DBModel) UpdatePunishment(punishment *Punishment, updateFields ...string) (err error) {
db := m.db.Model(punishment)
tableName := Punishment{}.TableName()
updateFields = m.FilterValidFields(tableName, updateFields...)
if len(updateFields) > 0 { // 更新指定字段
db = db.Select(updateFields)
} else { // 更新全部字段,包括零值字段
db = db.Select(m.GetTableFields(tableName))
}
err = db.Where("id = ?", punishment.Id).Updates(punishment).Error
if err != nil {
m.logger.Error("UpdatePunishment", zap.Error(err))
}
return
}
// GetPunishment 根据id获取Punishment
func (m *DBModel) GetPunishment(id interface{}, fields ...string) (punishment Punishment, err error) {
db := m.db
fields = m.FilterValidFields(Punishment{}.TableName(), fields...)
if len(fields) > 0 {
db = db.Select(fields)
}
err = db.Where("id = ?", id).First(&punishment).Error
return
}
type OptionGetPunishmentList struct {
Page int
Size int
WithCount bool // 是否返回总数
Ids []int64 // id列表
SelectFields []string // 查询字段
QueryRange map[string][2]interface{} // map[field][]{min,max}
QueryIn map[string][]interface{} // map[field][]{value1,value2,...}
QueryLike map[string][]interface{} // map[field][]{value1,value2,...}
Sort []string
}
// GetPunishmentList 获取Punishment列表
func (m *DBModel) GetPunishmentList(opt *OptionGetPunishmentList) (punishmentList []Punishment, total int64, err error) {
tableName := Punishment{}.TableName()
db := m.db.Model(&Punishment{})
db = m.generateQueryRange(db, tableName, opt.QueryRange)
db = m.generateQueryIn(db, tableName, opt.QueryIn)
db = m.generateQueryLike(db, tableName, opt.QueryLike)
if len(opt.Ids) > 0 {
db = db.Where("id in (?)", opt.Ids)
}
if opt.WithCount {
err = db.Count(&total).Error
if err != nil {
m.logger.Error("GetPunishmentList", zap.Error(err))
return
}
}
opt.SelectFields = m.FilterValidFields(tableName, opt.SelectFields...)
if len(opt.SelectFields) > 0 {
db = db.Select(opt.SelectFields)
}
db = m.generateQuerySort(db, tableName, opt.Sort)
db = db.Offset((opt.Page - 1) * opt.Size).Limit(opt.Size)
err = db.Find(&punishmentList).Error
if err != nil && err != gorm.ErrRecordNotFound {
m.logger.Error("GetPunishmentList", zap.Error(err))
}
return
}
// DeletePunishment 删除数据
func (m *DBModel) DeletePunishment(ids []int64) (err error) {
err = m.db.Where("id in (?)", ids).Delete(&Punishment{}).Error
if err != nil {
m.logger.Error("DeletePunishment", zap.Error(err))
}
return
}
func (m *DBModel) isInPunishing(userId int64, types []int) (yes bool, err error) {
if userId <= 1 {
return false, nil
}
punishment := &Punishment{}
err = m.db.Model(punishment).Select("id").
Where(
"user_id = ? and enable = ? and type in ? and (end_time IS NULL or end_time > ?)",
userId, true, types, time.Now(),
).Find(&punishment).Error
if err != nil {
if err == gorm.ErrRecordNotFound {
return false, nil
}
m.logger.Error("isInPunishing", zap.Error(err))
return
}
return punishment.Id > 0, nil
}

@ -12,11 +12,12 @@ import (
)
const (
UserStatusNormal = iota
UserStatusDisabled // 禁用
UserStatusPending // 审核中
UserStatusRejected // 拒绝
UserStatusIgnored // 忽略
UserStatusNormal = 0
UserStatusDisabled = 1 // 禁用账户:禁止登录、禁止评论、禁止上传、禁止下载、禁止收藏
UserStatusCommentLimited = 2 // 禁止评论
UserStatusUploadLimited = 3 // 禁止上传
UserStatusDownloadLimited = 4 // 禁止下载
UserStatusFavoriteLimited = 5 // 禁止收藏
)
// 用户的公开信息字段
@ -31,7 +32,7 @@ type User struct {
Username string `form:"username" json:"username,omitempty" gorm:"column:username;type:varchar(64);size:64;index:username,unique;comment:用户名;"`
Password string `form:"password" json:"password,omitempty" gorm:"column:password;type:varchar(128);size:128;comment:密码;"`
Mobile string `form:"mobile" json:"mobile,omitempty" gorm:"column:mobile;type:varchar(20);size:20;index:mobile;comment:手机号;"`
Email string `form:"email" json:"email,omitempty" gorm:"column:email;type:varchar(64);size:64;index:idx_email,unique;comment:联系邮箱;"`
Email string `form:"email" json:"email,omitempty" gorm:"column:email;type:varchar(64);size:64;index:idx_email;comment:联系邮箱;"`
Address string `form:"address" json:"address,omitempty" gorm:"column:address;type:varchar(255);size:255;comment:联系地址;"`
Signature string `form:"signature" json:"signature,omitempty" gorm:"column:signature;type:varchar(255);size:255;comment:签名;"`
LastLoginIp string `form:"last_login_ip" json:"last_login_ip,omitempty" gorm:"column:last_login_ip;type:varchar(64);size:64;comment:最后登录 ip 地址;"`
@ -42,13 +43,13 @@ type User struct {
FavoriteCount int `form:"favorite_count" json:"favorite_count,omitempty" gorm:"column:favorite_count;type:int(10);default:0;comment:收藏数;"`
CommentCount int `form:"comment_count" json:"comment_count,omitempty" gorm:"column:comment_count;type:int(11);size:11;default:0;comment:评论数;"`
CreditCount int `form:"credit_count" json:"credit_count,omitempty" gorm:"column:credit_count;type:int(11);size:11;default:0;comment:积分数量;"`
Status int8 `form:"status" json:"status,omitempty" gorm:"column:status;type:tinyint(4);size:4;default:0;index:status;comment:用户状态0正常 1禁用 2审核中 3审核拒绝 4审核忽略;"`
Avatar string `form:"avatar" json:"avatar,omitempty" gorm:"column:avatar;type:varchar(255);size:255;comment:头像;"`
Identity string `form:"identity" json:"identity,omitempty" gorm:"column:identity;type:char(18);size:18;comment:身份证号码;"`
Realname string `form:"realname" json:"realname,omitempty" gorm:"column:realname;type:varchar(20);size:20;comment:身份证姓名;"`
LoginAt *time.Time `form:"login_at" json:"login_at,omitempty" gorm:"column:login_at;type:datetime;comment:最后登录时间;"`
CreatedAt *time.Time `form:"created_at" json:"created_at,omitempty" gorm:"column:created_at;type:datetime;comment:创建时间;"`
UpdatedAt *time.Time `form:"updated_at" json:"updated_at,omitempty" gorm:"column:updated_at;type:datetime;comment:更新时间;"`
// Status int8 `form:"status" json:"status,omitempty" gorm:"column:status;type:tinyint(4);size:4;default:0;index:status;comment:用户状态0表示正常其他状态表示被惩罚;"`
}
func (User) TableName() string {
@ -191,7 +192,7 @@ type OptionGetUserList struct {
Page int
Size int
WithCount bool // 是否返回总数
Ids []interface{} // id列表
Ids []int64 // id列表
SelectFields []string // 查询字段
QueryRange map[string][2]interface{} // map[field][]{min,max}
QueryIn map[string][]interface{} // map[field][]{value1,value2,...}
@ -410,7 +411,13 @@ func (m *DBModel) SetUserGroupAndPassword(userId int64, groupId []int64, passwor
}
// CanIUploadDocument 判断用户是否有上传文档的权限
func (m *DBModel) CanIUploadDocument(userId int64) (yes bool) {
// 1. 用户是否被禁用或被处罚禁止上传文档
// 2. 用户所在的用户组是否允许上传文档
func (m *DBModel) CanIAccessUploadDocument(userId int64) (yes bool) {
if inPunishing, _ := m.isInPunishing(userId, []int{PunishmentTypeDisabled, PunishmentTypeUploadLimited}); inPunishing {
return false
}
var (
tableGroup = Group{}.TableName()
tableUserGroup = UserGroup{}.TableName()
@ -426,6 +433,39 @@ func (m *DBModel) CanIUploadDocument(userId int64) (yes bool) {
return group.Id > 0
}
// 用户是否可以下载文档:被禁用的账号或被禁止下载的账户不能下载
func (m *DBModel) CanIAccessDownload(userId int64) (yes bool, err error) {
yes, err = m.isInPunishing(userId, []int{PunishmentTypeDownloadLimited, PunishmentTypeDisabled})
yes = !yes
if err != nil {
m.logger.Error("CanIAccessDownload", zap.Error(err))
return
}
return
}
// 用户是否可以评论
func (m *DBModel) CanIAccessComment(userId int64) (yes bool, err error) {
yes, err = m.isInPunishing(userId, []int{PunishmentTypeCommentLimited, PunishmentTypeDisabled})
yes = !yes
if err != nil {
m.logger.Error("CanIAccessComment", zap.Error(err))
return
}
return
}
// 用户是否可以收藏文档
func (m *DBModel) CanIAccessFavorite(userId int64) (yes bool, err error) {
yes, err = m.isInPunishing(userId, []int{PunishmentTypeFavoriteLimited, PunishmentTypeDisabled})
yes = !yes
if err != nil {
m.logger.Error("CanIAccessFavorite", zap.Error(err))
return
}
return
}
// 用户是否发表评论
func (m *DBModel) CanIPublishComment(userId int64) (defaultCommentStatus int8, err error) {
if userId <= 0 {

@ -148,5 +148,14 @@ func RegisterGRPCService(dbModel *model.DBModel, logger *zap.Logger, endpoint st
return
}
// 惩罚服务
punishmentAPIService := biz.NewPunishmentAPIService(dbModel, logger)
v1.RegisterPunishmentAPIServer(grpcServer, punishmentAPIService)
err = v1.RegisterPunishmentAPIHandlerFromEndpoint(context.Background(), gwmux, endpoint, dialOpts)
if err != nil {
logger.Error("RegisterPunishmentAPIHandlerFromEndpoint", zap.Error(err))
return
}
return
}

@ -3,6 +3,7 @@ package device
import (
"fmt"
"runtime"
"strings"
"time"
"github.com/shirou/gopsutil/v3/cpu"
@ -51,28 +52,30 @@ func GetMemory() (memInfo MemInfo) {
func GetDisk() (diskInfos []DiskInfo) {
stats, _ := disk.Partitions(true)
if runtime.GOOS != "windows" {
usage, _ := disk.Usage("/")
diskInfos = append(diskInfos, DiskInfo{
DiskName: "/",
Total: usage.Total,
Used: usage.Used,
Free: usage.Free,
Percent: usage.UsedPercent,
})
return
}
for _, stat := range stats {
usage, _ := disk.Usage(stat.Mountpoint)
if usage != nil {
if usage == nil {
continue
}
if strings.ToLower(runtime.GOOS) == "windows" {
diskInfos = append(diskInfos, DiskInfo{
DiskName: stat.Mountpoint,
DiskName: usage.Path,
Total: usage.Total,
Used: usage.Used,
Free: usage.Free,
Percent: usage.UsedPercent,
})
} else {
fstype := strings.ToLower(usage.Fstype)
if strings.Contains(fstype, "ext") || strings.Contains(fstype, "ntfs") || strings.Contains(fstype, "fat") {
diskInfos = append(diskInfos, DiskInfo{
DiskName: usage.Path,
Total: usage.Total,
Used: usage.Used,
Free: usage.Free,
Percent: usage.UsedPercent,
})
}
}
}
return

@ -176,6 +176,13 @@ func IsValidEmail(email string) (yes bool) {
return reg.MatchString(email)
}
// IsValidMobile 验证手机号格式
func IsValidMobile(mobile string) (yes bool) {
pattern := `^1[3456789]\d{9}$`
reg := regexp.MustCompile(pattern)
return reg.MatchString(mobile)
}
// CheckCommandExists 验证命令是否存在
func CheckCommandExists(command string) error {
_, err := exec.LookPath(command)

@ -0,0 +1,42 @@
import service from '~/utils/request'
export const createPunishment = (data) => {
return service({
url: '/api/v1/punishment',
method: 'post',
data,
})
}
export const updatePunishment = (data) => {
return service({
url: '/api/v1/punishment',
method: 'put',
data,
})
}
export const getPunishment = (params) => {
return service({
url: '/api/v1/punishment',
method: 'get',
params,
})
}
export const listPunishment = (params) => {
return service({
url: '/api/v1/punishment/list',
method: 'get',
params,
})
}
// 取消惩罚
export const cancelPunishment = (data) => {
return service({
url: '/api/v1/punishment/cancel',
method: 'put',
data,
})
}

@ -0,0 +1,243 @@
<template>
<div class="com-form-punishment">
<el-form
ref="formPunishment"
label-position="top"
label-width="80px"
:model="punishment"
>
<el-form-item
label="用户"
prop="user_id"
:rules="
punishment.id === 0
? [{ required: true, trigger: 'blur', message: '' }]
: []
"
>
<el-select
v-if="punishment.id === 0"
v-model="punishment.user_id"
filterable
multiple
remote
reserve-keyword
placeholder="请输入和选择用户"
:remote-method="remoteSearchUser"
:loading="loading"
>
<el-option
v-for="user in users"
:key="'userid' + user.id"
:label="user.username"
:value="user.id"
>
</el-option>
</el-select>
<el-input v-else :disabled="true" v-model="punishment.username" />
</el-form-item>
<el-form-item
prop="type"
:rules="[
{ required: true, trigger: 'blur', message: '' },
]"
>
<template slot="label">
<ToolTip
content="禁止评论:不允许发表评论;禁止上传:不允许上传文档;禁止收藏:不允许收藏;禁止下载:不允许下载文档;禁用账户:包括上述全部禁用项"
/>
</template>
<el-checkbox-group v-if="punishment.id === 0" v-model="punishment.type">
<el-checkbox
v-for="item in punishmentTypeOptions"
:label="item.value"
:key="'checkbox-pt' + item.value"
>{{ item.label }}</el-checkbox
>
</el-checkbox-group>
<el-select v-else v-model="punishment.type" :disabled="true">
<el-option
v-for="item in punishmentTypeOptions"
:label="item.label"
:key="'select-pt-' + item.value"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="是否启用处罚">
<el-switch
v-model="punishment.enable"
style="display: block"
active-color="#13ce66"
inactive-color="#ff4949"
active-text="是"
inactive-text="否"
>
</el-switch> </el-form-item
></el-col>
<el-col :span="16">
<el-form-item>
<template slot="label">
<ToolTip content="用户被处罚的截止时间,留空则为永久" />
</template>
<el-date-picker
v-model="punishment.end_time"
type="datetime"
placeholder="请选择处罚截止时间"
:picker-options="datetimePickerPunishmentOptions"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="处罚原因">
<el-input
type="textarea"
v-model="punishment.reason"
:rows="3"
placeholder="请输入处罚原因,被处罚用户可见"
></el-input>
</el-form-item>
<el-form-item label="处罚备注">
<el-input
type="textarea"
v-model="punishment.remark"
:rows="3"
placeholder="请输入处罚备注,管理员可见"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
class="btn-block"
icon="el-icon-check"
:loading="loading"
@click="onSubmit"
></el-button
>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { createPunishment, updatePunishment } from '~/api/punishment'
import {
punishmentTypeOptions,
datetimePickerPunishmentOptions,
} from '~/utils/enum'
import { listUser } from '~/api/user'
export default {
name: 'FormPunishment',
props: {
initPunishment: {
type: Object,
default: () => {
return {}
},
},
},
data() {
return {
punishmentTypeOptions,
datetimePickerPunishmentOptions,
loading: false,
punishment: {
id: 0,
user_id: '',
remark: '',
reason: '',
type: [],
enable: true,
},
users: [],
}
},
watch: {
initPunishment: {
handler(val) {
let enable = val.enable || false
this.punishment = {
id: 0,
user_id: '',
remark: '',
reason: '',
type: [],
...val,
enable: enable,
}
},
immediate: true,
},
},
// created() {
// this.punishment = { ...this.initPunishment }
// },
methods: {
onSubmit() {
this.$refs.formPunishment.validate(async (valid) => {
if (!valid) {
return
}
this.loading = true
const punishment = { ...this.punishment }
if (this.punishment.id > 0) {
delete punishment.operators
const res = await updatePunishment(punishment)
if (res.status === 200) {
this.$message.success('')
this.$emit('success', res.data)
} else {
this.$message.error(res.data.message)
}
} else {
const res = await createPunishment(punishment)
if (res.status === 200) {
this.$message.success('')
this.$emit('success', res.data)
} else {
this.$message.error(res.data.message)
}
}
this.loading = false
})
},
async remoteSearchUser(wd) {
this.searchUser(wd)
},
async searchUser(wd, userId = []) {
const res = await listUser({
page: 1,
size: 10,
wd: wd,
id: userId || [],
field: ['id', 'username'],
})
if (res.status === 200) {
this.users = res.data.user || []
}
},
clearValidate() {
this.$refs.formPunishment.clearValidate()
},
resetFields() {
this.punishment = {
id: 0,
title: '',
link: '',
sort: 0,
enable: true,
description: '',
}
},
reset() {
this.resetFields()
this.clearValidate()
},
},
}
</script>

@ -46,6 +46,7 @@
:placeholder="field.placeholder"
></el-cascader>
</el-form-item>
<slot name="inputs"></slot>
<el-form-item>
<el-button
type="primary"

@ -0,0 +1,16 @@
<template>
<el-tooltip class="item" effect="dark" :content="content" placement="top">
<el-button size="small" type="text" icon="el-icon-info"></el-button>
</el-tooltip>
</template>
<script>
export default {
name: 'ToolTip',
props: {
content: {
type: String,
default: '',
},
},
}
</script>

@ -160,6 +160,11 @@ export default {
title: '',
icon: 'el-icon-circle-check',
},
{
page: '/admin/user/punishment',
title: '',
icon: 'el-icon-warning-outline',
},
],
},
{

@ -150,7 +150,10 @@
<nuxt />
</el-main>
<el-footer>
<div v-if="$route.path === '/'" class="footer-friendlink">
<div
v-if="$route.path === '/' && friendlinks.length > 0"
class="footer-friendlink"
>
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<strong></strong>

@ -6,19 +6,11 @@ export default function ({ store, route, redirect, from }) {
(route.name === 'login' || route.name === 'register') &&
!(from.name === 'login' || from.name === 'register')
) {
console.log(
'checkFront.js: route.name === login or register 1',
route.query
)
if (!route.query.redirect) {
route.query.redirect = from.fullPath
redirect(route)
return
}
console.log(
'checkFront.js: route.name === login or register 2',
route.query
)
}
store.dispatch('user/checkAndRefreshUser')

21404
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -20,7 +20,7 @@
"@wangeditor/plugin-md": "^1.0.0",
"core-js": "^3.19.3",
"echarts": "^5.4.2",
"element-ui": "^2.15.10",
"element-ui": "^2.15.13",
"hotkeys-js": "^3.10.0",
"nuxt": "^2.15.8",
"qrcodejs2": "0.0.2",

@ -171,11 +171,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
this.$router.resolve({
query: this.search,
}).href
) {
this.listArticle()
} else {

@ -144,11 +144,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
this.$router.resolve({
query: this.search,
}).href
) {
this.listAttachment()
} else {

@ -143,11 +143,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listBanner()
} else {

@ -175,11 +175,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listComment()
} else {

@ -481,7 +481,7 @@ export default {
},
{
label: 'Mhz',
value: res.data.cpu.mhz,
value: (res.data.cpu.mhz || 0).toFixed(0),
},
{
label: '',

@ -130,11 +130,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
this.$router.resolve({
query: this.search,
}).href
) {
this.listCategory()
} else {
@ -241,7 +240,7 @@ export default {
}
this.tableListFields = [
{ prop: 'title', label: '', minWidth: 120, fixed: 'left' },
{ prop: 'icon', label: '', width: 48, type: 'image' },
{ prop: 'id', label: 'ID', width: 80, type: 'number', fixed: 'left' },
{
prop: 'enable',
label: '',
@ -260,9 +259,9 @@ export default {
width: 80,
type: 'number',
},
{ prop: 'icon', label: '', width: 48, type: 'image' },
{ prop: 'cover', label: '', width: 100, type: 'image' },
{ prop: 'doc_count', label: '', width: 80, type: 'number' },
{ prop: 'id', label: 'ID', width: 80, type: 'number' },
{ prop: 'description', label: '', minWidth: 200 },
{ prop: 'created_at', label: '', width: 160, type: 'datetime' },
{ prop: 'updated_at', label: '', width: 160, type: 'datetime' },

@ -298,11 +298,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listDocument()
} else {

@ -214,11 +214,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listDocument()
} else {

@ -150,11 +150,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.$router.push({
query: this.search,

@ -160,11 +160,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listNavigation()
} else {

@ -155,11 +155,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listReport()
} else {

@ -175,11 +175,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listGroup()
} else {

@ -113,7 +113,7 @@ export default {
groups: [],
users: [],
user: { id: 0 },
total: 100,
total: 0,
searchFormFields: [],
listFields: [],
selectedRows: [],
@ -138,7 +138,9 @@ export default {
size: parseInt(this.$route.query.size) || 10,
...parseQueryIntArray(this.$route.query, ['group_id', 'status']),
}
if (this.groups.length === 0) {
await this.listGroup()
}
// 这里要执行下初始化,避免数据请求回来了,但是表格字段还没初始化,导致列表布局错乱
await this.initTableListFields()
this.listUser()
@ -148,7 +150,6 @@ export default {
async created() {
await this.initSearchForm()
await this.initTableListFields()
await this.listGroup()
await this.initSearchForm() // 请求完成用户组数据之后再初始化下搜索表单,因为下拉枚举需要用到用户组数据
},
methods: {
@ -159,6 +160,11 @@ export default {
let users = res.data.user || []
users.map((item) => {
item.username_html = genLinkHTML(item.username, `/user/${item.id}`)
let groups = (item.group_id || []).map((id) => {
let group = this.groups.find((group) => group.id === id)
return group ? group.title : ''
})
item.group = groups.join(', ')
})
this.users = users
this.total = res.data.total
@ -190,11 +196,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listUser()
} else {
@ -302,7 +307,6 @@ export default {
}
}),
},
// 暂时屏蔽
// {
// type: 'select',
// label: '状态',
@ -331,6 +335,11 @@ export default {
fixed: 'left',
type: 'html',
},
{
prop: 'group',
label: '',
width: 150,
},
{ prop: 'doc_count', label: '', width: 80, type: 'number' },
{ prop: 'credit_count', label: '', width: 100, type: 'number' },
{ prop: 'follow_count', label: '', width: 80, type: 'number' },

@ -133,11 +133,10 @@ export default {
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listPermission()
} else {

@ -0,0 +1,330 @@
<template>
<div>
<el-card shadow="never" class="search-card">
<FormSearch
:fields="searchFormFields"
:loading="loading"
:show-create="true"
:show-delete="false"
:disabled-delete="selectedRow.length === 0"
:default-search="search"
@onSearch="onSearch"
@onCreate="onCreate"
>
<template slot="inputs">
<el-form-item label="用户">
<el-select
v-model="search.user_id"
filterable
multiple
remote
reserve-keyword
placeholder="请输入用户名"
:remote-method="remoteSearchUser"
:loading="loading"
>
<el-option
v-for="user in users"
:key="'userid' + user.id"
:label="user.username"
:value="user.id"
>
</el-option>
</el-select>
</el-form-item>
</template>
<template slot="buttons">
<el-form-item>
<el-tooltip
class="item"
effect="dark"
content="批量取消处罚"
placement="top"
>
<el-button
type="warning"
@click="batchCancelPunishment"
:disabled="selectedRow.length === 0"
icon="el-icon-edit"
></el-button
>
</el-tooltip>
</el-form-item>
</template>
</FormSearch>
</el-card>
<el-card shadow="never" class="mgt-20px">
<TableList
:loading="loading"
:table-data="punishments"
:fields="tableListFields"
:show-actions="true"
:show-view="false"
:show-edit="true"
:show-delete="false"
:show-select="true"
:actions-min-width="80"
@selectRow="selectRow"
@editRow="editRow"
/>
</el-card>
<el-card shadow="never" class="mgt-20px">
<div class="text-right">
<el-pagination
background
:current-page="search.page"
:page-sizes="[10, 20, 50, 100]"
:page-size="search.size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handlePageChange"
>
</el-pagination>
</div>
</el-card>
<el-dialog
:close-on-click-modal="false"
:title="punishment.id ? '编辑惩罚' : '新增惩罚'"
:visible.sync="formPunishmentVisible"
width="640px"
>
<FormPunishment
ref="punishmentForm"
:init-punishment="punishment"
@success="formPunishmentSuccess"
/>
</el-dialog>
</div>
</template>
<script>
import {
listPunishment,
getPunishment,
cancelPunishment,
} from '~/api/punishment'
import { genLinkHTML, parseQueryIntArray } from '~/utils/utils'
import TableList from '~/components/TableList.vue'
import FormSearch from '~/components/FormSearch.vue'
import FormPunishment from '~/components/FormPunishment.vue'
import { punishmentTypeOptions } from '~/utils/enum'
import { listUser } from '~/api/user'
import { mapGetters } from 'vuex'
export default {
components: { TableList, FormSearch, FormPunishment },
layout: 'admin',
data() {
return {
punishmentTypeOptions,
loading: false,
formPunishmentVisible: false,
search: {
wd: '',
page: 1,
enable: [],
size: 10,
user_id: [],
},
punishments: [],
total: 0,
searchFormFields: [],
tableListFields: [],
selectedRow: [],
punishment: { id: 0 },
users: [],
}
},
head() {
return {
title: `处罚管理 - ${this.settings.system.sitename}`,
}
},
computed: {
...mapGetters('setting', ['settings']),
},
watch: {
'$route.query': {
immediate: true,
handler() {
this.search = {
...this.search,
...this.$route.query,
page: parseInt(this.$route.query.page) || 1,
size: parseInt(this.$route.query.size) || 10,
...parseQueryIntArray(this.$route.query, ['enable']),
...parseQueryIntArray(this.$route.query, ['user_id']),
}
this.listPunishment()
},
},
},
async created() {
this.initSearchForm()
this.initTableListFields()
// await this.listPunishment()
if ((this.search.user_id || []).length > 0) {
this.searchUser('', this.search.user_id)
}
},
methods: {
async remoteSearchUser(wd) {
this.searchUser(wd)
},
async searchUser(wd, userId = []) {
const res = await listUser({
page: 1,
size: 10,
wd: wd,
id: userId || [],
field: ['id', 'username'],
})
if (res.status === 200) {
this.users = res.data.user || []
}
},
async batchCancelPunishment() {
let res = await this.$confirm(
`您确定要取消选中的${this.selectedRow.length}条处罚吗?`,
'',
{
confirmButtonText: '',
cancelButtonText: '',
type: 'warning',
}
)
if (res) {
const ids = this.selectedRow.map((item) => item.id)
const res = await cancelPunishment({ id: ids })
if (res.status === 200) {
this.$message.success('')
this.listPunishment()
} else {
this.$message.error(res.data.message)
}
}
},
async listPunishment() {
this.loading = true
const res = await listPunishment(this.search)
if (res.status === 200) {
let punishments = res.data.punishment || []
punishments.map((item) => {
item.user_html = genLinkHTML(item.username, `/user/${item.id}`)
})
this.punishments = punishments
this.total = res.data.total
} else {
this.$message.error(res.data.message)
}
this.loading = false
},
handleSizeChange(val) {
this.search.size = val
this.$router.push({
query: this.search,
})
},
handlePageChange(val) {
this.search.page = val
this.$router.push({
query: this.search,
})
},
onSearch(search) {
this.search = {
...this.search,
...search,
user_id: this.search.user_id,
page: 1,
}
if (
location.pathname + location.search ===
        this.$router.resolve({
          query: this.search,
        }).href
) {
this.listPunishment()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
this.punishment = { id: 0, type: [], enable: true }
this.formPunishmentVisible = true
},
async editRow(row) {
const res = await getPunishment({ id: row.id })
if (res.status === 200) {
this.punishment = res.data
this.formPunishmentVisible = true
} else {
this.$message.error(res.data.message)
}
},
formPunishmentSuccess() {
this.formPunishmentVisible = false
this.listPunishment()
},
selectRow(rows) {
this.selectedRow = rows
},
initSearchForm() {
this.searchFormFields = [
{
type: 'select',
label: '',
name: 'type',
placeholder: '',
multiple: true,
options: this.punishmentTypeOptions,
},
{
type: 'text',
label: '',
name: 'wd',
placeholder: '',
},
]
},
initTableListFields() {
const enumOptions = {}
this.punishmentTypeOptions.map((item) => {
enumOptions[item.value] = item
})
this.tableListFields = [
{ prop: 'id', label: 'ID', width: 80, type: 'number', fixed: 'left' },
{
prop: 'enable',
label: '',
width: 80,
type: 'bool',
},
{
prop: 'type',
label: '',
minWidth: 120,
type: 'enum',
enum: enumOptions,
},
{
prop: 'user_html',
label: '',
minWidth: 150,
type: 'html',
},
{ prop: 'end_time', label: '', width: 160, type: 'datetime' },
{ prop: 'reason', label: '', minWidth: 250 },
{ prop: 'remark', label: '', minWidth: 250 },
{ prop: 'created_at', label: '', width: 160, type: 'datetime' },
{ prop: 'updated_at', label: '', width: 160, type: 'datetime' },
]
},
},
}
</script>
<style></style>

@ -77,6 +77,24 @@
>
</div>
</div>
<div class="item-row">
<div class="item-name"></div>
<div class="item-content">
<nuxt-link
v-for="item in feeTypeOptions"
:key="item.value"
:to="{ query: { ...$route.query, fee_type: item.value } }"
class="el-link"
:class="
item.value === $route.query.fee_type ||
(!item.value && !$route.query.fee_type)
? 'el-link--primary'
: 'el-link--default'
"
>{{ item.label }}</nuxt-link
>
</div>
</div>
</el-card>
</el-col>
</el-row>
@ -202,6 +220,11 @@ export default {
{ label: 'TXT', value: 'txt' },
{ label: '', value: 'other' },
],
feeTypeOptions: [
{ label: '', value: '' },
{ label: '', value: 'free' },
{ label: '', value: 'charge' },
],
}
},
head() {
@ -397,6 +420,7 @@ export default {
'ext',
'score',
],
fee_type: this.$route.query.fee_type,
})
if (res.status === 200) {
this.total = res.data.total
@ -488,6 +512,33 @@ export default {
.keywords {
.el-card__body {
padding-bottom: 10px;
max-height: 480px;
box-sizing: border-box;
overflow: auto;
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
&::-webkit-scrollbar {
background-color: transparent;
width: 6px;
height: 6px;
}
&:hover::-webkit-scrollbar {
background-color: rgb(241, 241, 241);
}
/*定义滚动条轨道 内阴影+圆角*/
&::-webkit-scrollbar-track {
background-color: transparent;
}
/*定义滑块 内阴影+圆角*/
&::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 3px;
}
&:hover::-webkit-scrollbar-thumb {
background-color: rgb(193, 193, 193);
}
&:hover::-webkit-scrollbar-thumb::hover {
background-color: rgb(168, 168, 168);
}
}
a {
margin-right: 10px;

@ -210,7 +210,7 @@
icon="el-icon-warning-outline"
></el-button
>
<el-button
<!-- <el-button
type="primary"
icon="el-icon-download"
class="float-right"
@ -218,7 +218,7 @@
:loading="downloading"
@click="downloadDocument"
>({{ formatBytes(document.size) }})</el-button
>
> -->
<el-button
v-if="favorite.id > 0"
type="primary"
@ -1020,6 +1020,9 @@ export default {
width: 100%;
background-color: #fff;
}
.el-image__error {
min-height: 360px;
}
}
}
.doc-page-more {

@ -521,13 +521,19 @@ export default {
padding-bottom: 0;
}
.el-card__body {
padding: 15px 0;
padding: 15px 0 20px;
max-height: 80px;
overflow: hidden;
display: -webkit-box;
// -webkit-box-orient: vertical;
-webkit-line-clamp: 3;
}
a {
display: inline-block;
padding: 5px 0;
padding: 2px 0 5px;
text-decoration: none;
margin-right: 10px;
margin-bottom: 5px;
}
}
}

@ -166,7 +166,7 @@
class="btn-block"
disabled
>
<span v-if="user.id > 0"></span>
<span v-if="user.id > 0"></span>
<span v-else></span>
</el-button>
</el-form-item>

@ -124,3 +124,80 @@ export const datetimePickerOptions = {
},
],
}
export const datetimePickerPunishmentOptions = {
shortcuts: [
{
text: '1',
onClick(picker) {
const end = new Date()
end.setTime(end.getTime() + 3600 * 1000)
picker.$emit('pick', end)
},
},
{
text: '12',
onClick(picker) {
const end = new Date()
end.setTime(end.getTime() + 3600 * 1000 * 12)
picker.$emit('pick', end)
},
},
{
text: '1',
onClick(picker) {
const end = new Date()
end.setTime(end.getTime() + 3600 * 1000 * 24)
picker.$emit('pick', end)
},
},
{
text: '2',
onClick(picker) {
const end = new Date()
end.setTime(end.getTime() + 3600 * 1000 * 24 * 2)
picker.$emit('pick', end)
},
},
{
text: '1',
onClick(picker) {
const end = new Date()
end.setTime(end.getTime() + 3600 * 1000 * 24 * 7)
picker.$emit('pick', end)
},
},
{
text: '1',
onClick(picker) {
const end = new Date()
end.setTime(end.getTime() + 3600 * 1000 * 24 * 30)
picker.$emit('pick', end)
},
},
{
text: '',
onClick(picker) {
const end = new Date()
end.setTime(end.getTime() + 3600 * 1000 * 24 * 183)
picker.$emit('pick', [start, end])
},
},
{
text: '1',
onClick(picker) {
const end = new Date()
end.setTime(end.getTime() + 3600 * 1000 * 24 * 365)
picker.$emit('pick', [start, end])
},
},
],
}
export const punishmentTypeOptions = [
{ label: '', value: 1, type: 'danger' },
{ label: '', value: 2, type: 'warning' },
{ label: '', value: 3, type: 'warning' },
{ label: '', value: 4, type: 'warning' },
{ label: '', value: 5, type: 'warning' },
]

@ -79,6 +79,12 @@ const cumstomPermissionMap = {
children: [],
pages: ['/admin/comment'],
},
'api.v1.PunishmentAPI': {
label: '',
path: 'ListPunishment',
children: [],
pages: ['/admin/user/punishment'],
},
upload: {
id: 0,
label: '',

Loading…
Cancel
Save