wangkaiyue 1 жил өмнө
parent
commit
fd14b48d07

+ 1 - 0
rpc/internal/logic/checklogic.go

@@ -90,6 +90,7 @@ func (l *CheckLogic) Check(in *pb.CheckReq) (*pb.CheckResp, error) {
 			PpStatus:              data.Free.PpStatus,
 			PpStartTime:           data.Free.PpStartTime,
 			PpEndTime:             data.Free.PpEndTime,
+			PpAreaCount:           data.Free.PpAreaCount,
 		}
 		resp.Ent = &pb.Ent{
 			Name:                data.Ent.Name,

+ 1 - 1
rpc/internal/server/powercheckserver.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT!
+// Code generated by goctl. DO NOT EDIT.
 // Source: powerCheck.proto
 
 package server

+ 39 - 28
rpc/pb/powerCheck.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.28.0
-// 	protoc        v3.15.5
+// 	protoc-gen-go v1.30.0
+// 	protoc        v3.21.12
 // source: powerCheck.proto
 
 package pb
@@ -20,7 +20,7 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
-//公共返回 status
+// 公共返回 status
 type PowerCheckResp struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -282,7 +282,7 @@ func (x *CheckResp) GetDocs() *Docs {
 	return nil
 }
 
-//超级订阅相关
+// 超级订阅相关
 type Vip struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -426,7 +426,7 @@ func (x *Vip) GetOriginal() int64 {
 	return 0
 }
 
-//大会员相关
+// 大会员相关
 type Member struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -610,7 +610,7 @@ func (x *Member) GetOriginal() int64 {
 	return 0
 }
 
-//商机管理相关
+// 商机管理相关
 type Entniche struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -722,7 +722,7 @@ func (x *Entniche) GetOriginal() int64 {
 	return 0
 }
 
-//企业相关
+// 企业相关
 type Ent struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -858,7 +858,7 @@ func (x *Ent) GetServices() bool {
 	return false
 }
 
-//免费权益相关
+// 免费权益相关
 type Free struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -879,9 +879,10 @@ type Free struct {
 	Apppushunread         int64  `protobuf:"varint,13,opt,name=apppushunread,proto3" json:"apppushunread,omitempty"`                 //已读未读
 	OjyLength             int64  `protobuf:"varint,14,opt,name=ojyLength,proto3" json:"ojyLength,omitempty"`                         //ojy的长度
 	Original              int64  `protobuf:"varint,15,opt,name=original,proto3" json:"original,omitempty"`                           //免费用户查看原文次数/每月
-	PpStatus              int64  `protobuf:"varint,16,opt,name=ppStatus,proto3" json:"ppStatus,omitempty"`                           //免费用户查看原文次数/每月
-	PpStartTime           int64  `protobuf:"varint,17,opt,name=ppStartTime,proto3" json:"ppStartTime,omitempty"`                     //免费用户查看原文次数/每月
-	PpEndTime             int64  `protobuf:"varint,18,opt,name=ppEndTime,proto3" json:"ppEndTime,omitempty"`                         //免费用户查看原文次数/每月
+	PpStatus              int64  `protobuf:"varint,16,opt,name=ppStatus,proto3" json:"ppStatus,omitempty"`                           //省份订阅包
+	PpStartTime           int64  `protobuf:"varint,17,opt,name=ppStartTime,proto3" json:"ppStartTime,omitempty"`                     //省份订阅包开始时间
+	PpEndTime             int64  `protobuf:"varint,18,opt,name=ppEndTime,proto3" json:"ppEndTime,omitempty"`                         //省份订阅包结束时间
+	PpAreaCount           int64  `protobuf:"varint,19,opt,name=ppAreaCount,proto3" json:"ppAreaCount,omitempty"`                     //省份订阅购买数量
 }
 
 func (x *Free) Reset() {
@@ -1042,7 +1043,14 @@ func (x *Free) GetPpEndTime() int64 {
 	return 0
 }
 
-//文库
+func (x *Free) GetPpAreaCount() int64 {
+	if x != nil {
+		return x.PpAreaCount
+	}
+	return 0
+}
+
+// 文库
 type Docs struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1251,7 +1259,7 @@ var file_powerCheck_proto_rawDesc = []byte{
 	0x70, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x75, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0b,
 	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x75, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12,
 	0x1a, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28,
-	0x08, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0xca, 0x04, 0x0a, 0x04,
+	0x08, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0xec, 0x04, 0x0a, 0x04,
 	0x46, 0x72, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x46, 0x72, 0x65, 0x65, 0x18, 0x01,
 	0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
 	0x66, 0x72, 0x65, 0x65, 0x48, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
@@ -1288,21 +1296,24 @@ var file_powerCheck_proto_rawDesc = []byte{
 	0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70,
 	0x70, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x70,
 	0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70,
-	0x70, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x7a, 0x0a, 0x04, 0x44, 0x6f, 0x63, 0x73,
-	0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72,
-	0x74, 0x44, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61,
-	0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74,
-	0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65,
-	0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64,
-	0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x44, 0x6f, 0x77, 0x6e,
-	0x6c, 0x6f, 0x61, 0x64, 0x32, 0x59, 0x0a, 0x0a, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x68, 0x65,
-	0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x09, 0x2e, 0x43, 0x68,
-	0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x2b, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
-	0x64, 0x69, 0x73, 0x12, 0x09, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x0f,
-	0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x42,
-	0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x70, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x70, 0x41, 0x72,
+	0x65, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70,
+	0x70, 0x41, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7a, 0x0a, 0x04, 0x44, 0x6f,
+	0x63, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74,
+	0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73,
+	0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x44,
+	0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61,
+	0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f,
+	0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x44, 0x6f,
+	0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x32, 0x59, 0x0a, 0x0a, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x43,
+	0x68, 0x65, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x09, 0x2e,
+	0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b,
+	0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x09, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71,
+	0x1a, 0x0f, 0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73,
+	0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x33,
 }
 
 var (

+ 15 - 10
rpc/pb/powerCheck_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
-// - protoc-gen-go-grpc v1.2.0
-// - protoc             v3.15.5
+// - protoc-gen-go-grpc v1.3.0
+// - protoc             v3.21.12
 // source: powerCheck.proto
 
 package pb
@@ -18,13 +18,18 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
+const (
+	PowerCheck_Check_FullMethodName         = "/powerCheck/Check"
+	PowerCheck_DelCheckRedis_FullMethodName = "/powerCheck/DelCheckRedis"
+)
+
 // PowerCheckClient is the client API for PowerCheck service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 type PowerCheckClient interface {
-	//用户权限判断
+	// 用户权限判断
 	Check(ctx context.Context, in *CheckReq, opts ...grpc.CallOption) (*CheckResp, error)
-	//清除权限缓存
+	// 清除权限缓存
 	DelCheckRedis(ctx context.Context, in *CheckReq, opts ...grpc.CallOption) (*PowerCheckResp, error)
 }
 
@@ -38,7 +43,7 @@ func NewPowerCheckClient(cc grpc.ClientConnInterface) PowerCheckClient {
 
 func (c *powerCheckClient) Check(ctx context.Context, in *CheckReq, opts ...grpc.CallOption) (*CheckResp, error) {
 	out := new(CheckResp)
-	err := c.cc.Invoke(ctx, "/powerCheck/Check", in, out, opts...)
+	err := c.cc.Invoke(ctx, PowerCheck_Check_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -47,7 +52,7 @@ func (c *powerCheckClient) Check(ctx context.Context, in *CheckReq, opts ...grpc
 
 func (c *powerCheckClient) DelCheckRedis(ctx context.Context, in *CheckReq, opts ...grpc.CallOption) (*PowerCheckResp, error) {
 	out := new(PowerCheckResp)
-	err := c.cc.Invoke(ctx, "/powerCheck/DelCheckRedis", in, out, opts...)
+	err := c.cc.Invoke(ctx, PowerCheck_DelCheckRedis_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -58,9 +63,9 @@ func (c *powerCheckClient) DelCheckRedis(ctx context.Context, in *CheckReq, opts
 // All implementations must embed UnimplementedPowerCheckServer
 // for forward compatibility
 type PowerCheckServer interface {
-	//用户权限判断
+	// 用户权限判断
 	Check(context.Context, *CheckReq) (*CheckResp, error)
-	//清除权限缓存
+	// 清除权限缓存
 	DelCheckRedis(context.Context, *CheckReq) (*PowerCheckResp, error)
 	mustEmbedUnimplementedPowerCheckServer()
 }
@@ -98,7 +103,7 @@ func _PowerCheck_Check_Handler(srv interface{}, ctx context.Context, dec func(in
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/powerCheck/Check",
+		FullMethod: PowerCheck_Check_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(PowerCheckServer).Check(ctx, req.(*CheckReq))
@@ -116,7 +121,7 @@ func _PowerCheck_DelCheckRedis_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/powerCheck/DelCheckRedis",
+		FullMethod: PowerCheck_DelCheckRedis_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(PowerCheckServer).DelCheckRedis(ctx, req.(*CheckReq))

+ 1 - 1
rpc/powercheck/powercheck.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT!
+// Code generated by goctl. DO NOT EDIT.
 // Source: powerCheck.proto
 
 package powercheck