Pārlūkot izejas kodu

feat:增加查看状态接口

duxin 2 gadi atpakaļ
vecāks
revīzija
ad0d60772f

+ 8 - 0
jyBXSubscribe/api/bxsubscribe.api

@@ -93,6 +93,12 @@ type (
 		Region    string `path:"region,optional"`
 		SelectIds string `json:"selectIds,optional"`
 	}
+	viewStatusReq {
+		AppId     string `header:"appId"`
+		EntId     string `header:"entId,optional"`
+		EntUserId string `header:"entUserId,optional"`
+		InfoId    string `json:"infoId,optional"`
+	}
 )
 service bxsubscribe-api {
 	@handler subscribeList
@@ -109,4 +115,6 @@ service bxsubscribe-api {
 	post /jybx/subscribe/:userType/getKey(GetKeyReq) returns (commonResp)
 	@handler distributor
 	post /jybx/subscribe/:userType/distributor(DistributorReq) returns (commonResp)
+	@handler viewStatus
+	post /jybx/subscribe/:userType/viewStatus(viewStatusReq) returns (commonResp)
 }

+ 5 - 0
jyBXSubscribe/api/internal/handler/routes.go

@@ -47,6 +47,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/jybx/subscribe/:userType/distributor",
 				Handler: distributorHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/subscribe/:userType/viewStatus",
+				Handler: viewStatusHandler(serverCtx),
+			},
 		},
 	)
 }

+ 28 - 0
jyBXSubscribe/api/internal/handler/viewStatusHandler.go

@@ -0,0 +1,28 @@
+package handler
+
+import (
+	"net/http"
+
+	"github.com/zeromicro/go-zero/rest/httpx"
+	"jyBXSubscribe/api/internal/logic"
+	"jyBXSubscribe/api/internal/svc"
+	"jyBXSubscribe/api/internal/types"
+)
+
+func viewStatusHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.ViewStatusReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewViewStatusLogic(r.Context(), svcCtx)
+		resp, err := l.ViewStatus(&req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 48 - 0
jyBXSubscribe/api/internal/logic/viewStatusLogic.go

@@ -0,0 +1,48 @@
+package logic
+
+import (
+	"context"
+	"jyBXSubscribe/rpc/type/bxsubscribe"
+
+	"jyBXSubscribe/api/internal/svc"
+	"jyBXSubscribe/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ViewStatusLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewViewStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ViewStatusLogic {
+	return &ViewStatusLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *ViewStatusLogic) ViewStatus(req *types.ViewStatusReq) (resp *types.CommonResp, err error) {
+	// todo: add your logic here and delete this line
+	res, err := l.svcCtx.Suscribe.GetViewStatus(l.ctx, &bxsubscribe.GetViewStatusReq{
+		AppId:     req.AppId,
+		EntId:     req.EntId,
+		EntUserId: req.EntUserId,
+		InfoId:    req.InfoId,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: res.ErrCode,
+			Err_msg:  res.ErrMsg,
+			Data:     nil,
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res,
+	}, nil
+	return
+}

+ 7 - 0
jyBXSubscribe/api/internal/types/types.go

@@ -88,3 +88,10 @@ type DistributorReq struct {
 	Region    string `path:"region,optional"`
 	SelectIds string `json:"selectIds,optional"`
 }
+
+type ViewStatusReq struct {
+	AppId     string `header:"appId"`
+	EntId     string `header:"entId,optional"`
+	EntUserId string `header:"entUserId,optional"`
+	InfoId    string `json:"infoId,optional"`
+}

+ 22 - 0
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -202,6 +202,26 @@ message userResp {
   string phone = 3;
 }
 
+message GetViewStatusReq{
+  string  appId = 1;
+  string  entId = 2;
+  string  entUserId = 3;
+  string  infoId = 4;
+}
+
+message ViewStatusResp {
+  int64 err_code = 1;
+  string err_msg = 2;
+  repeated UserStatus items = 3;//分发人员
+}
+message UserStatus {
+  string name =1;
+  int64 id =2;
+  int64 isvisit =3;
+  int64 visittime =4;
+}
+
+
 service Bxsubscribe {
   //获取订阅推送列表
   rpc GetSubList(SubscribeInfosReq) returns(SubscribeInfosResp);
@@ -217,4 +237,6 @@ service Bxsubscribe {
   rpc GetKey(GetKeyReq)returns(KeyResp);
   //手动分发人员
   rpc GetDistributor(GetDistributorReq)returns(DistributorResp);
+  //查看状态
+  rpc GetViewStatus(GetViewStatusReq)returns(ViewStatusResp);
 }

+ 11 - 0
jyBXSubscribe/rpc/bxsubscribe/bxsubscribe.go

@@ -18,6 +18,7 @@ type (
 	DistributorResp        = bxsubscribe.DistributorResp
 	GetDistributorReq      = bxsubscribe.GetDistributorReq
 	GetKeyReq              = bxsubscribe.GetKeyReq
+	GetViewStatusReq       = bxsubscribe.GetViewStatusReq
 	Items                  = bxsubscribe.Items
 	Key                    = bxsubscribe.Key
 	KeyItems               = bxsubscribe.KeyItems
@@ -34,6 +35,8 @@ type (
 	SubscribeInfosResp     = bxsubscribe.SubscribeInfosResp
 	UpdateSubScribeInfoReq = bxsubscribe.UpdateSubScribeInfoReq
 	UserResp               = bxsubscribe.UserResp
+	UserStatus             = bxsubscribe.UserStatus
+	ViewStatusResp         = bxsubscribe.ViewStatusResp
 
 	Bxsubscribe interface {
 		// 获取订阅推送列表
@@ -50,6 +53,8 @@ type (
 		GetKey(ctx context.Context, in *GetKeyReq, opts ...grpc.CallOption) (*KeyResp, error)
 		// 手动分发人员
 		GetDistributor(ctx context.Context, in *GetDistributorReq, opts ...grpc.CallOption) (*DistributorResp, error)
+		// 查看状态
+		GetViewStatus(ctx context.Context, in *GetViewStatusReq, opts ...grpc.CallOption) (*ViewStatusResp, error)
 	}
 
 	defaultBxsubscribe struct {
@@ -104,3 +109,9 @@ func (m *defaultBxsubscribe) GetDistributor(ctx context.Context, in *GetDistribu
 	client := bxsubscribe.NewBxsubscribeClient(m.cli.Conn())
 	return client.GetDistributor(ctx, in, opts...)
 }
+
+// 查看状态
+func (m *defaultBxsubscribe) GetViewStatus(ctx context.Context, in *GetViewStatusReq, opts ...grpc.CallOption) (*ViewStatusResp, error) {
+	client := bxsubscribe.NewBxsubscribeClient(m.cli.Conn())
+	return client.GetViewStatus(ctx, in, opts...)
+}

+ 87 - 0
jyBXSubscribe/rpc/internal/logic/getviewstatuslogic.go

@@ -0,0 +1,87 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"fmt"
+	IC "jyBXSubscribe/rpc/init"
+	"jyBXSubscribe/rpc/model"
+	"log"
+	"strings"
+
+	"jyBXSubscribe/rpc/internal/svc"
+	"jyBXSubscribe/rpc/type/bxsubscribe"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type GetViewStatusLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewGetViewStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetViewStatusLogic {
+	return &GetViewStatusLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 查看状态
+func (l *GetViewStatusLogic) GetViewStatus(in *bxsubscribe.GetViewStatusReq) (*bxsubscribe.ViewStatusResp, error) {
+	// todo: add your logic here and delete this line
+	user := model.EntInfo(common.IntAll(in.EntId), common.IntAll(in.EntUserId))
+	var (
+		users  *[]*model.User
+		ss     []string
+		finsql string
+	)
+	res := new(bxsubscribe.ViewStatusResp)
+
+	finsql = `SELECT userid,isvisit,visittime,date FROM pushentniche where  infoid =? and type in (2,3) order By date desc`
+	if user.Role_admin_department {
+		users = model.GetDisUsers(common.IntAll(in.EntId), user.Dept.Id)
+		if users != nil && len(*users) > 0 {
+			//获取所有部门和子部门员工
+			for _, v := range *users {
+				ss = append(ss, common.InterfaceToStr(v.Id))
+			}
+		} else {
+			log.Println("部门管理员下为获取到员工", in.EntUserId)
+			return &bxsubscribe.ViewStatusResp{}, nil
+		}
+	} else if user.Role_admin_system {
+		//获取企业所有用户
+		users = model.GetEntUsers(common.IntAll(in.EntId))
+	}
+	if len(ss) > 0 {
+		finsql = fmt.Sprintf(`SELECT userid,isvisit,visittime,date FROM pushentniche where  infoid =? and type in (2,3) %s order By date asc`, fmt.Sprintf(`and userid in (%s)`, strings.Join(ss, ",")))
+	}
+	data := IC.BaseServiceMysql.SelectBySql(finsql, in.InfoId)
+	userMap := make(map[int]string)
+	for _, u := range *users {
+		userMap[u.Id] = u.Name
+	}
+	if data != nil && len(*data) > 0 {
+		d := make(map[string]int)
+		for _, v := range *data {
+			userid := common.IntAll(v["userid"])
+			if name, ok := userMap[userid]; ok && name != "" {
+				var da bxsubscribe.UserStatus
+				da.Name = name
+				da.Isvisit = common.Int64All(v["Isvisit"])
+				da.Visittime = common.Int64All(v["visittime"])
+				da.Id = common.Int64All(userid)
+				if v2, ok1 := d[common.InterfaceToStr(userid)]; !ok1 {
+					res.Items = append(res.Items, &da)
+					d[common.InterfaceToStr(userid)] = len(res.Items) - 1
+				} else {
+					res.Items[v2] = &da
+				}
+			}
+		}
+	}
+	return res, nil
+}

+ 6 - 0
jyBXSubscribe/rpc/internal/server/bxsubscribeserver.go

@@ -63,3 +63,9 @@ func (s *BxsubscribeServer) GetDistributor(ctx context.Context, in *bxsubscribe.
 	l := logic.NewGetDistributorLogic(ctx, s.svcCtx)
 	return l.GetDistributor(in)
 }
+
+// 查看状态
+func (s *BxsubscribeServer) GetViewStatus(ctx context.Context, in *bxsubscribe.GetViewStatusReq) (*bxsubscribe.ViewStatusResp, error) {
+	l := logic.NewGetViewStatusLogic(ctx, s.svcCtx)
+	return l.GetViewStatus(in)
+}

+ 4 - 0
jyBXSubscribe/rpc/model/push.go

@@ -386,6 +386,10 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 						userIds = append(userIds, common.InterfaceToStr(v.Id))
 					}
 					userStr += fmt.Sprintf(" a.userid in (%s)  ", strings.Join(userIds, ","))
+				} else {
+					log.Printf("部门管理员为获取到部门员工:%s", spqp.EntUserId)
+					result = []*bxsubscribe.SubscribeInfo{}
+					return
 				}
 			}
 		} else {

+ 333 - 60
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go

@@ -1923,6 +1923,211 @@ func (x *UserResp) GetPhone() string {
 	return ""
 }
 
+type GetViewStatusReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	AppId     string `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId,omitempty"`
+	EntId     string `protobuf:"bytes,2,opt,name=entId,proto3" json:"entId,omitempty"`
+	EntUserId string `protobuf:"bytes,3,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
+	InfoId    string `protobuf:"bytes,4,opt,name=infoId,proto3" json:"infoId,omitempty"`
+}
+
+func (x *GetViewStatusReq) Reset() {
+	*x = GetViewStatusReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxsubscribe_proto_msgTypes[21]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *GetViewStatusReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetViewStatusReq) ProtoMessage() {}
+
+func (x *GetViewStatusReq) ProtoReflect() protoreflect.Message {
+	mi := &file_bxsubscribe_proto_msgTypes[21]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetViewStatusReq.ProtoReflect.Descriptor instead.
+func (*GetViewStatusReq) Descriptor() ([]byte, []int) {
+	return file_bxsubscribe_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *GetViewStatusReq) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+func (x *GetViewStatusReq) GetEntId() string {
+	if x != nil {
+		return x.EntId
+	}
+	return ""
+}
+
+func (x *GetViewStatusReq) GetEntUserId() string {
+	if x != nil {
+		return x.EntUserId
+	}
+	return ""
+}
+
+func (x *GetViewStatusReq) GetInfoId() string {
+	if x != nil {
+		return x.InfoId
+	}
+	return ""
+}
+
+type ViewStatusResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrCode int64         `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
+	ErrMsg  string        `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
+	Items   []*UserStatus `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` //分发人员
+}
+
+func (x *ViewStatusResp) Reset() {
+	*x = ViewStatusResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxsubscribe_proto_msgTypes[22]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ViewStatusResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ViewStatusResp) ProtoMessage() {}
+
+func (x *ViewStatusResp) ProtoReflect() protoreflect.Message {
+	mi := &file_bxsubscribe_proto_msgTypes[22]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ViewStatusResp.ProtoReflect.Descriptor instead.
+func (*ViewStatusResp) Descriptor() ([]byte, []int) {
+	return file_bxsubscribe_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *ViewStatusResp) GetErrCode() int64 {
+	if x != nil {
+		return x.ErrCode
+	}
+	return 0
+}
+
+func (x *ViewStatusResp) GetErrMsg() string {
+	if x != nil {
+		return x.ErrMsg
+	}
+	return ""
+}
+
+func (x *ViewStatusResp) GetItems() []*UserStatus {
+	if x != nil {
+		return x.Items
+	}
+	return nil
+}
+
+type UserStatus struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	Id        int64  `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
+	Isvisit   int64  `protobuf:"varint,3,opt,name=isvisit,proto3" json:"isvisit,omitempty"`
+	Visittime int64  `protobuf:"varint,4,opt,name=visittime,proto3" json:"visittime,omitempty"`
+}
+
+func (x *UserStatus) Reset() {
+	*x = UserStatus{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxsubscribe_proto_msgTypes[23]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserStatus) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserStatus) ProtoMessage() {}
+
+func (x *UserStatus) ProtoReflect() protoreflect.Message {
+	mi := &file_bxsubscribe_proto_msgTypes[23]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserStatus.ProtoReflect.Descriptor instead.
+func (*UserStatus) Descriptor() ([]byte, []int) {
+	return file_bxsubscribe_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *UserStatus) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *UserStatus) GetId() int64 {
+	if x != nil {
+		return x.Id
+	}
+	return 0
+}
+
+func (x *UserStatus) GetIsvisit() int64 {
+	if x != nil {
+		return x.Isvisit
+	}
+	return 0
+}
+
+func (x *UserStatus) GetVisittime() int64 {
+	if x != nil {
+		return x.Visittime
+	}
+	return 0
+}
+
 var File_bxsubscribe_proto protoreflect.FileDescriptor
 
 var file_bxsubscribe_proto_rawDesc = []byte{
@@ -2189,42 +2394,68 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
 	0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
 	0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x32, 0x8e, 0x04, 0x0a, 0x0b, 0x42, 0x78, 0x73, 0x75,
-	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x75,
-	0x62, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
-	0x69, 0x62, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66,
-	0x6f, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
-	0x69, 0x62, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66,
-	0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62,
-	0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
-	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
-	0x65, 0x71, 0x1a, 0x19, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
-	0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a,
-	0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x53, 0x63, 0x72, 0x69, 0x62, 0x65,
-	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
-	0x62, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x53, 0x63, 0x72, 0x69,
-	0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75,
-	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x4f, 0x0a, 0x0d, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68, 0x48, 0x69, 0x73, 0x74,
-	0x6f, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
-	0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73,
-	0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
-	0x65, 0x2e, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x12, 0x17,
-	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x65, 0x74,
-	0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73,
-	0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x36, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x62, 0x78, 0x73,
-	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52,
-	0x65, 0x71, 0x1a, 0x14, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
-	0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44,
-	0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73,
-	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x74,
-	0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x62, 0x78, 0x73,
-	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
-	0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x62, 0x78,
-	0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x33,
+	0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x74, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x56, 0x69,
+	0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61,
+	0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49,
+	0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x22, 0x73, 0x0a,
+	0x0e, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72,
+	0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72,
+	0x4d, 0x73, 0x67, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03,
+	0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
+	0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65,
+	0x6d, 0x73, 0x22, 0x68, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+	0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x76, 0x69, 0x73, 0x69, 0x74, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x73, 0x76, 0x69, 0x73, 0x69, 0x74, 0x12, 0x1c,
+	0x0a, 0x09, 0x76, 0x69, 0x73, 0x69, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x09, 0x76, 0x69, 0x73, 0x69, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x32, 0xdb, 0x04, 0x0a,
+	0x0b, 0x42, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x4d, 0x0a, 0x0a,
+	0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73,
+	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x62, 0x78, 0x73,
+	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, 0x47,
+	0x65, 0x74, 0x53, 0x75, 0x62, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e,
+	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65,
+	0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x53, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x53,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x62, 0x78, 0x73, 0x75,
+	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75,
+	0x62, 0x53, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x17,
+	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61,
+	0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x0d, 0x42, 0x79, 0x50, 0x75, 0x73,
+	0x68, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
+	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
+	0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
+	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68, 0x48, 0x69, 0x73,
+	0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x52,
+	0x65, 0x61, 0x64, 0x12, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
+	0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62,
+	0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
+	0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12,
+	0x16, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65,
+	0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4e, 0x0a,
+	0x0e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x12,
+	0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65,
+	0x74, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x1a,
+	0x1c, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x44, 0x69,
+	0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a,
+	0x0d, 0x47, 0x65, 0x74, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d,
+	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74,
+	0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e,
+	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x56, 0x69, 0x65, 0x77,
+	0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f,
+	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x33,
 }
 
 var (
@@ -2239,7 +2470,7 @@ func file_bxsubscribe_proto_rawDescGZIP() []byte {
 	return file_bxsubscribe_proto_rawDescData
 }
 
-var file_bxsubscribe_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
+var file_bxsubscribe_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
 var file_bxsubscribe_proto_goTypes = []interface{}{
 	(*SubscribeInfosReq)(nil),      // 0: bxsubscribe.SubscribeInfosReq
 	(*SubscribeInfosResp)(nil),     // 1: bxsubscribe.SubscribeInfosResp
@@ -2262,38 +2493,44 @@ var file_bxsubscribe_proto_goTypes = []interface{}{
 	(*KeyResp)(nil),                // 18: bxsubscribe.KeyResp
 	(*DistributorResp)(nil),        // 19: bxsubscribe.DistributorResp
 	(*UserResp)(nil),               // 20: bxsubscribe.userResp
-	nil,                            // 21: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
+	(*GetViewStatusReq)(nil),       // 21: bxsubscribe.GetViewStatusReq
+	(*ViewStatusResp)(nil),         // 22: bxsubscribe.ViewStatusResp
+	(*UserStatus)(nil),             // 23: bxsubscribe.UserStatus
+	nil,                            // 24: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
 }
 var file_bxsubscribe_proto_depIdxs = []int32{
 	2,  // 0: bxsubscribe.SubscribeInfosResp.data:type_name -> bxsubscribe.subscribeData
 	3,  // 1: bxsubscribe.subscribeData.list:type_name -> bxsubscribe.subscribeInfo
 	6,  // 2: bxsubscribe.SomeInfoResp.data:type_name -> bxsubscribe.SomeInfo
-	21, // 3: bxsubscribe.UpdateSubScribeInfoReq.area:type_name -> bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
+	24, // 3: bxsubscribe.UpdateSubScribeInfoReq.area:type_name -> bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
 	11, // 4: bxsubscribe.UpdateSubScribeInfoReq.items:type_name -> bxsubscribe.Items
 	12, // 5: bxsubscribe.Items.a_key:type_name -> bxsubscribe.Keys
 	14, // 6: bxsubscribe.KeyItems.a_key:type_name -> bxsubscribe.Key
 	13, // 7: bxsubscribe.KeyResp.items:type_name -> bxsubscribe.KeyItems
 	20, // 8: bxsubscribe.DistributorResp.items:type_name -> bxsubscribe.userResp
-	10, // 9: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry.value:type_name -> bxsubscribe.CityList
-	0,  // 10: bxsubscribe.Bxsubscribe.GetSubList:input_type -> bxsubscribe.SubscribeInfosReq
-	4,  // 11: bxsubscribe.Bxsubscribe.GetSubSomeInfo:input_type -> bxsubscribe.SomeInfoReq
-	9,  // 12: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:input_type -> bxsubscribe.UpdateSubScribeInfoReq
-	0,  // 13: bxsubscribe.Bxsubscribe.ByPushHistory:input_type -> bxsubscribe.SubscribeInfosReq
-	15, // 14: bxsubscribe.Bxsubscribe.SetRead:input_type -> bxsubscribe.SetReadReq
-	16, // 15: bxsubscribe.Bxsubscribe.GetKey:input_type -> bxsubscribe.GetKeyReq
-	17, // 16: bxsubscribe.Bxsubscribe.GetDistributor:input_type -> bxsubscribe.GetDistributorReq
-	1,  // 17: bxsubscribe.Bxsubscribe.GetSubList:output_type -> bxsubscribe.SubscribeInfosResp
-	5,  // 18: bxsubscribe.Bxsubscribe.GetSubSomeInfo:output_type -> bxsubscribe.SomeInfoResp
-	7,  // 19: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:output_type -> bxsubscribe.StatusResp
-	8,  // 20: bxsubscribe.Bxsubscribe.ByPushHistory:output_type -> bxsubscribe.ByPushHistoryResp
-	7,  // 21: bxsubscribe.Bxsubscribe.SetRead:output_type -> bxsubscribe.StatusResp
-	18, // 22: bxsubscribe.Bxsubscribe.GetKey:output_type -> bxsubscribe.KeyResp
-	19, // 23: bxsubscribe.Bxsubscribe.GetDistributor:output_type -> bxsubscribe.DistributorResp
-	17, // [17:24] is the sub-list for method output_type
-	10, // [10:17] is the sub-list for method input_type
-	10, // [10:10] is the sub-list for extension type_name
-	10, // [10:10] is the sub-list for extension extendee
-	0,  // [0:10] is the sub-list for field type_name
+	23, // 9: bxsubscribe.ViewStatusResp.items:type_name -> bxsubscribe.UserStatus
+	10, // 10: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry.value:type_name -> bxsubscribe.CityList
+	0,  // 11: bxsubscribe.Bxsubscribe.GetSubList:input_type -> bxsubscribe.SubscribeInfosReq
+	4,  // 12: bxsubscribe.Bxsubscribe.GetSubSomeInfo:input_type -> bxsubscribe.SomeInfoReq
+	9,  // 13: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:input_type -> bxsubscribe.UpdateSubScribeInfoReq
+	0,  // 14: bxsubscribe.Bxsubscribe.ByPushHistory:input_type -> bxsubscribe.SubscribeInfosReq
+	15, // 15: bxsubscribe.Bxsubscribe.SetRead:input_type -> bxsubscribe.SetReadReq
+	16, // 16: bxsubscribe.Bxsubscribe.GetKey:input_type -> bxsubscribe.GetKeyReq
+	17, // 17: bxsubscribe.Bxsubscribe.GetDistributor:input_type -> bxsubscribe.GetDistributorReq
+	21, // 18: bxsubscribe.Bxsubscribe.GetViewStatus:input_type -> bxsubscribe.GetViewStatusReq
+	1,  // 19: bxsubscribe.Bxsubscribe.GetSubList:output_type -> bxsubscribe.SubscribeInfosResp
+	5,  // 20: bxsubscribe.Bxsubscribe.GetSubSomeInfo:output_type -> bxsubscribe.SomeInfoResp
+	7,  // 21: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:output_type -> bxsubscribe.StatusResp
+	8,  // 22: bxsubscribe.Bxsubscribe.ByPushHistory:output_type -> bxsubscribe.ByPushHistoryResp
+	7,  // 23: bxsubscribe.Bxsubscribe.SetRead:output_type -> bxsubscribe.StatusResp
+	18, // 24: bxsubscribe.Bxsubscribe.GetKey:output_type -> bxsubscribe.KeyResp
+	19, // 25: bxsubscribe.Bxsubscribe.GetDistributor:output_type -> bxsubscribe.DistributorResp
+	22, // 26: bxsubscribe.Bxsubscribe.GetViewStatus:output_type -> bxsubscribe.ViewStatusResp
+	19, // [19:27] is the sub-list for method output_type
+	11, // [11:19] is the sub-list for method input_type
+	11, // [11:11] is the sub-list for extension type_name
+	11, // [11:11] is the sub-list for extension extendee
+	0,  // [0:11] is the sub-list for field type_name
 }
 
 func init() { file_bxsubscribe_proto_init() }
@@ -2554,6 +2791,42 @@ func file_bxsubscribe_proto_init() {
 				return nil
 			}
 		}
+		file_bxsubscribe_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GetViewStatusReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxsubscribe_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ViewStatusResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxsubscribe_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserStatus); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -2561,7 +2834,7 @@ func file_bxsubscribe_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_bxsubscribe_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   22,
+			NumMessages:   25,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 38 - 0
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe_grpc.pb.go

@@ -36,6 +36,8 @@ type BxsubscribeClient interface {
 	GetKey(ctx context.Context, in *GetKeyReq, opts ...grpc.CallOption) (*KeyResp, error)
 	// 手动分发人员
 	GetDistributor(ctx context.Context, in *GetDistributorReq, opts ...grpc.CallOption) (*DistributorResp, error)
+	// 查看状态
+	GetViewStatus(ctx context.Context, in *GetViewStatusReq, opts ...grpc.CallOption) (*ViewStatusResp, error)
 }
 
 type bxsubscribeClient struct {
@@ -109,6 +111,15 @@ func (c *bxsubscribeClient) GetDistributor(ctx context.Context, in *GetDistribut
 	return out, nil
 }
 
+func (c *bxsubscribeClient) GetViewStatus(ctx context.Context, in *GetViewStatusReq, opts ...grpc.CallOption) (*ViewStatusResp, error) {
+	out := new(ViewStatusResp)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/GetViewStatus", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // BxsubscribeServer is the server API for Bxsubscribe service.
 // All implementations must embed UnimplementedBxsubscribeServer
 // for forward compatibility
@@ -127,6 +138,8 @@ type BxsubscribeServer interface {
 	GetKey(context.Context, *GetKeyReq) (*KeyResp, error)
 	// 手动分发人员
 	GetDistributor(context.Context, *GetDistributorReq) (*DistributorResp, error)
+	// 查看状态
+	GetViewStatus(context.Context, *GetViewStatusReq) (*ViewStatusResp, error)
 	mustEmbedUnimplementedBxsubscribeServer()
 }
 
@@ -155,6 +168,9 @@ func (UnimplementedBxsubscribeServer) GetKey(context.Context, *GetKeyReq) (*KeyR
 func (UnimplementedBxsubscribeServer) GetDistributor(context.Context, *GetDistributorReq) (*DistributorResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetDistributor not implemented")
 }
+func (UnimplementedBxsubscribeServer) GetViewStatus(context.Context, *GetViewStatusReq) (*ViewStatusResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetViewStatus not implemented")
+}
 func (UnimplementedBxsubscribeServer) mustEmbedUnimplementedBxsubscribeServer() {}
 
 // UnsafeBxsubscribeServer may be embedded to opt out of forward compatibility for this service.
@@ -294,6 +310,24 @@ func _Bxsubscribe_GetDistributor_Handler(srv interface{}, ctx context.Context, d
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Bxsubscribe_GetViewStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetViewStatusReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxsubscribeServer).GetViewStatus(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxsubscribe.Bxsubscribe/GetViewStatus",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxsubscribeServer).GetViewStatus(ctx, req.(*GetViewStatusReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Bxsubscribe_ServiceDesc is the grpc.ServiceDesc for Bxsubscribe service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -329,6 +363,10 @@ var Bxsubscribe_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "GetDistributor",
 			Handler:    _Bxsubscribe_GetDistributor_Handler,
 		},
+		{
+			MethodName: "GetViewStatus",
+			Handler:    _Bxsubscribe_GetViewStatus_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "bxsubscribe.proto",