Selaa lähdekoodia

浏览状态修改

WH01243 2 vuotta sitten
vanhempi
commit
8e8745708c

+ 13 - 0
jyBXSubscribe/api/bxsubscribe.api

@@ -60,6 +60,17 @@ type (
 		UserType        string                   `path:"userType,optional"`
 		UserId          string                   `header:"userId,optional"`
 	}
+	SetReadReq {
+		AppId     string `header:"appId"`
+		UserId    string `header:"userId"`
+		EntId     string `header:"entId,optional"`
+		EntUserId string `header:"entUserId,optional"`
+		DeptId    string `header:"deptId,optional"` //部门id
+		Vsid      string `json:"vsid"`
+		NewUserId int64  `header:"newUserId"`
+		IsEnt     bool   `json:"isEnt,optional"`
+		UserType  string `path:"userType,optional"`
+	}
 )
 service bxsubscribe-api {
 	@handler subscribeList
@@ -70,4 +81,6 @@ service bxsubscribe-api {
 	post /jybx/subscribe/:userType/update(subscribeUpdateReq) returns (commonResp)
 	@handler ByPushHistory
 	post /jybx/subscribe/:userType/byPushHistory(subscribeReq) returns (commonResp)
+	@handler SetRead
+	post /jybx/subscribe/:userType/setRead(SetReadReq) returns (commonResp)
 }

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

@@ -32,6 +32,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/jybx/subscribe/:userType/byPushHistory",
 				Handler: ByPushHistoryHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/subscribe/:userType/setRead",
+				Handler: SetReadHandler(serverCtx),
+			},
 		},
 	)
 }

+ 28 - 0
jyBXSubscribe/api/internal/handler/setReadHandler.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 SetReadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.SetReadReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewSetReadLogic(r.Context(), svcCtx)
+		resp, err := l.SetRead(&req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 51 - 0
jyBXSubscribe/api/internal/logic/setReadLogic.go

@@ -0,0 +1,51 @@
+package logic
+
+import (
+	"context"
+	"jyBXSubscribe/rpc/bxsubscribe"
+
+	"jyBXSubscribe/api/internal/svc"
+	"jyBXSubscribe/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type SetReadLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewSetReadLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SetReadLogic {
+	return &SetReadLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *SetReadLogic) SetRead(req *types.SetReadReq) (resp *types.CommonResp, err error) {
+	// todo: add your logic here and delete this line
+	res, err := l.svcCtx.Suscribe.SetRead(l.ctx, &bxsubscribe.SetReadReq{
+		AppId:     req.AppId,
+		UserType:  req.UserType,
+		UserId:    req.UserId,
+		NewUserId: req.NewUserId,
+		EntId:     req.EntId,
+		IsEnt:     req.IsEnt,
+		EntUserId: req.EntUserId,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: res.ErrorCode,
+			Err_msg:  res.ErrorMsg,
+			Data:     nil,
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrorCode,
+		Err_msg:  res.ErrorMsg,
+		Data:     nil,
+	}, nil
+	return
+}

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

@@ -52,3 +52,15 @@ type SubscribeUpdateReq struct {
 	UserType        string                   `path:"userType,optional"`
 	UserId          string                   `header:"userId,optional"`
 }
+
+type SetReadReq struct {
+	AppId     string `header:"appId"`
+	UserId    string `header:"userId"`
+	EntId     string `header:"entId,optional"`
+	EntUserId string `header:"entUserId,optional"`
+	DeptId    string `header:"deptId,optional"` //部门id
+	Vsid      string `json:"vsid"`
+	NewUserId int64  `header:"newUserId"`
+	IsEnt     bool   `json:"isEnt,optional"`
+	UserType  string `path:"userType,optional"`
+}

+ 12 - 1
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -136,7 +136,16 @@ message Keys {
 	repeated string appendKey=5;
 }
 
-
+message SetReadReq{
+  string  appId = 1;
+  string  userId = 2;
+  string  userType = 3;
+  int64   vsid = 4;
+  string  EntId = 5;
+  int64   newUserId = 6;
+  string  entUserId = 7;
+  bool    isEnt=8;
+}
 service Bxsubscribe {
   //获取订阅推送列表
   rpc GetSubList(SubscribeInfosReq) returns(SubscribeInfosResp);
@@ -146,4 +155,6 @@ service Bxsubscribe {
   rpc UpdateSubScribeInfo(UpdateSubScribeInfoReq)returns(StatusResp);
   //推送页面筛选导出
   rpc ByPushHistory(SubscribeInfosReq)returns(ByPushHistoryResp);
+  //推送数据浏览状态修改
+  rpc SetRead(SetReadReq)returns(StatusResp);
 }

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

@@ -17,6 +17,7 @@ type (
 	CityList               = bxsubscribe.CityList
 	Items                  = bxsubscribe.Items
 	Keys                   = bxsubscribe.Keys
+	SetReadReq             = bxsubscribe.SetReadReq
 	SomeInfo               = bxsubscribe.SomeInfo
 	SomeInfoReq            = bxsubscribe.SomeInfoReq
 	SomeInfoResp           = bxsubscribe.SomeInfoResp
@@ -36,6 +37,8 @@ type (
 		UpdateSubScribeInfo(ctx context.Context, in *UpdateSubScribeInfoReq, opts ...grpc.CallOption) (*StatusResp, error)
 		// 推送页面筛选导出
 		ByPushHistory(ctx context.Context, in *SubscribeInfosReq, opts ...grpc.CallOption) (*ByPushHistoryResp, error)
+		// 推送数据浏览状态修改
+		SetRead(ctx context.Context, in *SetReadReq, opts ...grpc.CallOption) (*StatusResp, error)
 	}
 
 	defaultBxsubscribe struct {
@@ -72,3 +75,9 @@ func (m *defaultBxsubscribe) ByPushHistory(ctx context.Context, in *SubscribeInf
 	client := bxsubscribe.NewBxsubscribeClient(m.cli.Conn())
 	return client.ByPushHistory(ctx, in, opts...)
 }
+
+// 推送数据浏览状态修改
+func (m *defaultBxsubscribe) SetRead(ctx context.Context, in *SetReadReq, opts ...grpc.CallOption) (*StatusResp, error) {
+	client := bxsubscribe.NewBxsubscribeClient(m.cli.Conn())
+	return client.SetRead(ctx, in, opts...)
+}

+ 33 - 0
jyBXSubscribe/rpc/internal/logic/setreadlogic.go

@@ -0,0 +1,33 @@
+package logic
+
+import (
+	"context"
+	"jyBXSubscribe/rpc/model"
+
+	"jyBXSubscribe/rpc/internal/svc"
+	"jyBXSubscribe/rpc/type/bxsubscribe"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type SetReadLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewSetReadLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SetReadLogic {
+	return &SetReadLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 推送数据浏览状态修改
+func (l *SetReadLogic) SetRead(in *bxsubscribe.SetReadReq) (*bxsubscribe.StatusResp, error) {
+	// todo: add your logic here and delete this line
+	resp := &bxsubscribe.StatusResp{}
+	model.NewSubscribePush(in.UserType).SetRead(in.NewUserId, in.GetVsid(), in.UserId, in.EntUserId, in.EntId, in.IsEnt)
+	return resp, nil
+}

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

@@ -45,3 +45,9 @@ func (s *BxsubscribeServer) ByPushHistory(ctx context.Context, in *bxsubscribe.S
 	l := logic.NewByPushHistoryLogic(ctx, s.svcCtx)
 	return l.ByPushHistory(in)
 }
+
+// 推送数据浏览状态修改
+func (s *BxsubscribeServer) SetRead(ctx context.Context, in *bxsubscribe.SetReadReq) (*bxsubscribe.StatusResp, error) {
+	l := logic.NewSetReadLogic(ctx, s.svcCtx)
+	return l.SetRead(in)
+}

+ 42 - 3
jyBXSubscribe/rpc/model/push.go

@@ -576,9 +576,9 @@ func (s *subscribePush) GetInfoByIds(Mgo_bidding mongodb.MongodbSim, bidding, bi
 			}
 		}
 	}
-	//
 	for k, v := range pushCas {
 		info := infos[v.InfoId]
+		info["Visit"] = v.Visit
 		if info == nil {
 			info = map[string]interface{}{}
 		}
@@ -725,8 +725,47 @@ func UpdateUserPushUnread(userid string, vt string) {
 		IC.Mgo.UpdateById("user", userid, map[string]interface{}{"$set": map[string]interface{}{"i_apppushunread": 0}})
 	}
 }
-
-//
+func (s *subscribePush) SetRead(newUserId, id int64, userId, entUserId, entId string, isEnt bool) error {
+	if id <= 0 {
+		return nil
+	}
+	if newUserId == 0 {
+		return nil
+	}
+	if isEnt {
+		IC.BaseServiceMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 where entid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entId, id)
+	} else {
+		if s.ModuleFlag == "eType" {
+			//商机管理
+			IC.BaseServiceMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entUserId, id)
+		} else {
+			//其他
+			IC.BaseServiceMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), newUserId, id)
+		}
+	}
+	todaySubPush, err := s.GetTodayCache(userId)
+	//当天数据处理
+	if err == nil && todaySubPush != nil {
+		for _, v := range todaySubPush.Datas {
+			if v.CaIndex == id {
+				v.CaIsvisit = 1
+				break
+			}
+		}
+		s.PutTodayCache(userId, todaySubPush)
+	}
+	//全部数据处理
+	allSubPush, err := s.GetAllCache(userId)
+	if err == nil && allSubPush != nil {
+		for _, v := range allSubPush.Datas {
+			if v.CaIndex == id {
+				v.CaIsvisit = 1
+				break
+			}
+		}
+		s.PutAllCache(userId, allSubPush)
+	}
+}
 
 // 获取用户信息
 func (s *subscribePush) UserInfo(userId string) (*map[string]interface{}, int64) {

+ 168 - 33
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go

@@ -1252,6 +1252,109 @@ func (x *Keys) GetAppendKey() []string {
 	return nil
 }
 
+type SetReadReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	AppId     string `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId,omitempty"`
+	UserId    string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
+	UserType  string `protobuf:"bytes,3,opt,name=userType,proto3" json:"userType,omitempty"`
+	Vsid      int64  `protobuf:"varint,4,opt,name=vsid,proto3" json:"vsid,omitempty"`
+	EntId     string `protobuf:"bytes,5,opt,name=EntId,proto3" json:"EntId,omitempty"`
+	NewUserId int64  `protobuf:"varint,6,opt,name=newUserId,proto3" json:"newUserId,omitempty"`
+	EntUserId string `protobuf:"bytes,7,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
+	IsEnt     bool   `protobuf:"varint,8,opt,name=isEnt,proto3" json:"isEnt,omitempty"`
+}
+
+func (x *SetReadReq) Reset() {
+	*x = SetReadReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxsubscribe_proto_msgTypes[13]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SetReadReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetReadReq) ProtoMessage() {}
+
+func (x *SetReadReq) ProtoReflect() protoreflect.Message {
+	mi := &file_bxsubscribe_proto_msgTypes[13]
+	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 SetReadReq.ProtoReflect.Descriptor instead.
+func (*SetReadReq) Descriptor() ([]byte, []int) {
+	return file_bxsubscribe_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *SetReadReq) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+func (x *SetReadReq) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *SetReadReq) GetUserType() string {
+	if x != nil {
+		return x.UserType
+	}
+	return ""
+}
+
+func (x *SetReadReq) GetVsid() int64 {
+	if x != nil {
+		return x.Vsid
+	}
+	return 0
+}
+
+func (x *SetReadReq) GetEntId() string {
+	if x != nil {
+		return x.EntId
+	}
+	return ""
+}
+
+func (x *SetReadReq) GetNewUserId() int64 {
+	if x != nil {
+		return x.NewUserId
+	}
+	return 0
+}
+
+func (x *SetReadReq) GetEntUserId() string {
+	if x != nil {
+		return x.EntUserId
+	}
+	return ""
+}
+
+func (x *SetReadReq) GetIsEnt() bool {
+	if x != nil {
+		return x.IsEnt
+	}
+	return false
+}
+
 var File_bxsubscribe_proto protoreflect.FileDescriptor
 
 var file_bxsubscribe_proto_rawDesc = []byte{
@@ -1436,29 +1539,46 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
 	0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70, 0x70,
 	0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x70,
-	0x70, 0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x32, 0xc9, 0x02, 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, 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,
+	0x70, 0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x22, 0xd2, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x52,
+	0x65, 0x61, 0x64, 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, 0x16, 0x0a, 0x06,
+	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,
+	0x12, 0x12, 0x0a, 0x04, 0x76, 0x73, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
+	0x76, 0x73, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65,
+	0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e,
+	0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x18,
+	0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x32, 0x86, 0x03, 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, 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 (
@@ -1473,7 +1593,7 @@ func file_bxsubscribe_proto_rawDescGZIP() []byte {
 	return file_bxsubscribe_proto_rawDescData
 }
 
-var file_bxsubscribe_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
+var file_bxsubscribe_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
 var file_bxsubscribe_proto_goTypes = []interface{}{
 	(*SubscribeInfosReq)(nil),      // 0: bxsubscribe.SubscribeInfosReq
 	(*SubscribeInfosResp)(nil),     // 1: bxsubscribe.SubscribeInfosResp
@@ -1488,13 +1608,14 @@ var file_bxsubscribe_proto_goTypes = []interface{}{
 	(*CityList)(nil),               // 10: bxsubscribe.CityList
 	(*Items)(nil),                  // 11: bxsubscribe.Items
 	(*Keys)(nil),                   // 12: bxsubscribe.Keys
-	nil,                            // 13: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
+	(*SetReadReq)(nil),             // 13: bxsubscribe.SetReadReq
+	nil,                            // 14: 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
-	13, // 3: bxsubscribe.UpdateSubScribeInfoReq.area:type_name -> bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
+	14, // 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
 	10, // 6: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry.value:type_name -> bxsubscribe.CityList
@@ -1502,12 +1623,14 @@ var file_bxsubscribe_proto_depIdxs = []int32{
 	4,  // 8: bxsubscribe.Bxsubscribe.GetSubSomeInfo:input_type -> bxsubscribe.SomeInfoReq
 	9,  // 9: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:input_type -> bxsubscribe.UpdateSubScribeInfoReq
 	0,  // 10: bxsubscribe.Bxsubscribe.ByPushHistory:input_type -> bxsubscribe.SubscribeInfosReq
-	1,  // 11: bxsubscribe.Bxsubscribe.GetSubList:output_type -> bxsubscribe.SubscribeInfosResp
-	5,  // 12: bxsubscribe.Bxsubscribe.GetSubSomeInfo:output_type -> bxsubscribe.SomeInfoResp
-	7,  // 13: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:output_type -> bxsubscribe.StatusResp
-	8,  // 14: bxsubscribe.Bxsubscribe.ByPushHistory:output_type -> bxsubscribe.ByPushHistoryResp
-	11, // [11:15] is the sub-list for method output_type
-	7,  // [7:11] is the sub-list for method input_type
+	13, // 11: bxsubscribe.Bxsubscribe.SetRead:input_type -> bxsubscribe.SetReadReq
+	1,  // 12: bxsubscribe.Bxsubscribe.GetSubList:output_type -> bxsubscribe.SubscribeInfosResp
+	5,  // 13: bxsubscribe.Bxsubscribe.GetSubSomeInfo:output_type -> bxsubscribe.SomeInfoResp
+	7,  // 14: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:output_type -> bxsubscribe.StatusResp
+	8,  // 15: bxsubscribe.Bxsubscribe.ByPushHistory:output_type -> bxsubscribe.ByPushHistoryResp
+	7,  // 16: bxsubscribe.Bxsubscribe.SetRead:output_type -> bxsubscribe.StatusResp
+	12, // [12:17] is the sub-list for method output_type
+	7,  // [7:12] is the sub-list for method input_type
 	7,  // [7:7] is the sub-list for extension type_name
 	7,  // [7:7] is the sub-list for extension extendee
 	0,  // [0:7] is the sub-list for field type_name
@@ -1675,6 +1798,18 @@ func file_bxsubscribe_proto_init() {
 				return nil
 			}
 		}
+		file_bxsubscribe_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SetReadReq); 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{
@@ -1682,7 +1817,7 @@ func file_bxsubscribe_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_bxsubscribe_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   14,
+			NumMessages:   15,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

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

@@ -30,6 +30,8 @@ type BxsubscribeClient interface {
 	UpdateSubScribeInfo(ctx context.Context, in *UpdateSubScribeInfoReq, opts ...grpc.CallOption) (*StatusResp, error)
 	//推送页面筛选导出
 	ByPushHistory(ctx context.Context, in *SubscribeInfosReq, opts ...grpc.CallOption) (*ByPushHistoryResp, error)
+	//推送数据浏览状态修改
+	SetRead(ctx context.Context, in *SetReadReq, opts ...grpc.CallOption) (*StatusResp, error)
 }
 
 type bxsubscribeClient struct {
@@ -76,6 +78,15 @@ func (c *bxsubscribeClient) ByPushHistory(ctx context.Context, in *SubscribeInfo
 	return out, nil
 }
 
+func (c *bxsubscribeClient) SetRead(ctx context.Context, in *SetReadReq, opts ...grpc.CallOption) (*StatusResp, error) {
+	out := new(StatusResp)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/SetRead", 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
@@ -88,6 +99,8 @@ type BxsubscribeServer interface {
 	UpdateSubScribeInfo(context.Context, *UpdateSubScribeInfoReq) (*StatusResp, error)
 	//推送页面筛选导出
 	ByPushHistory(context.Context, *SubscribeInfosReq) (*ByPushHistoryResp, error)
+	//推送数据浏览状态修改
+	SetRead(context.Context, *SetReadReq) (*StatusResp, error)
 	mustEmbedUnimplementedBxsubscribeServer()
 }
 
@@ -107,6 +120,9 @@ func (UnimplementedBxsubscribeServer) UpdateSubScribeInfo(context.Context, *Upda
 func (UnimplementedBxsubscribeServer) ByPushHistory(context.Context, *SubscribeInfosReq) (*ByPushHistoryResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method ByPushHistory not implemented")
 }
+func (UnimplementedBxsubscribeServer) SetRead(context.Context, *SetReadReq) (*StatusResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SetRead not implemented")
+}
 func (UnimplementedBxsubscribeServer) mustEmbedUnimplementedBxsubscribeServer() {}
 
 // UnsafeBxsubscribeServer may be embedded to opt out of forward compatibility for this service.
@@ -192,6 +208,24 @@ func _Bxsubscribe_ByPushHistory_Handler(srv interface{}, ctx context.Context, de
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Bxsubscribe_SetRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SetReadReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxsubscribeServer).SetRead(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxsubscribe.Bxsubscribe/SetRead",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxsubscribeServer).SetRead(ctx, req.(*SetReadReq))
+	}
+	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)
@@ -215,6 +249,10 @@ var Bxsubscribe_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "ByPushHistory",
 			Handler:    _Bxsubscribe_ByPushHistory_Handler,
 		},
+		{
+			MethodName: "SetRead",
+			Handler:    _Bxsubscribe_SetRead_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "bxsubscribe.proto",