Selaa lähdekoodia

是否感兴趣处理

WH01243 2 vuotta sitten
vanhempi
commit
fea0b847c4

+ 1 - 0
jyBXSubscribe/api/bxsubscribe.api

@@ -151,6 +151,7 @@ type (
 		Times        []string `json:"times,optional"`
 		PushType     string   `json:"pushType,optional"`
 		PushValue    int64    `json:"pushValue,optiona"`
+		Interested   int64    `json:"interested,optiona"`
 	}
 )
 service bxsubscribe-api {

+ 1 - 0
jyBXSubscribe/api/internal/logic/setPushSetLogic.go

@@ -37,6 +37,7 @@ func (l *SetPushSetLogic) SetPushSet(req *types.SetPushSetReq) (*types.CommonRes
 		Ratemode:     req.Ratemode,
 		Times:        req.Times,
 		SetType:      req.SetType,
+		Interested:   req.Interested,
 	})
 	if err != nil {
 		return &types.CommonResp{

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

@@ -151,4 +151,5 @@ type SetPushSetReq struct {
 	Times        []string `json:"times,optional"`
 	PushType     string   `json:"pushType,optional"`
 	PushValue    int64    `json:"pushValue,optiona"`
+	Interested   int64    `json:"interested,optiona"`
 }

+ 5 - 3
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -281,7 +281,7 @@ message GetUserInfoReq{
   string  userId = 4;
   int64   positionType = 5;
   int64  baseUserId = 6;
-  string serviceType=7;
+  string serviceType = 7;
 }
 message GetUserInfoResq{
   GetUserInfo data = 1;
@@ -322,8 +322,9 @@ message PushSet{
   int64 i_wxpush = 2;
   int64 i_apppush = 3;
   int64 i_mailpush = 4;
-  int64 i_ratemode=5;
-  int64 isWxShow=6;
+  int64 i_ratemode = 5;
+  int64 isWxShow = 6;
+  int64 interested=7;
 }
 message SetPushSetReq{
   string  appId = 1;
@@ -337,6 +338,7 @@ message SetPushSetReq{
   string  pushType = 9;
   repeated  string  times = 10;
   int64  pushValue = 11;
+  int64 interested = 12;
 }
 
 

+ 1 - 1
jyBXSubscribe/rpc/internal/logic/setpushsetlogic.go

@@ -33,7 +33,7 @@ func (l *SetPushSetLogic) SetPushSet(in *bxsubscribe.SetPushSetReq) (*bxsubscrib
 		EntUserId:    in.EntUserId,
 		EntId:        in.EntId,
 	}
-	fool := subService.Update(in.Item, in.SetType, in.PushType, in.Ratemode, in.PushValue, in.Times)
+	fool := subService.Update(in.Item, in.SetType, in.PushType, in.Ratemode, in.PushValue, in.Interested, in.Times)
 	if fool {
 		return &bxsubscribe.StatusResp{
 			Status: 1,

+ 13 - 2
jyBXSubscribe/rpc/model/service/pushSet.go

@@ -19,7 +19,7 @@ type PushSetService struct {
 	PositionId   int64
 }
 
-func (this *PushSetService) Update(item, setType, pushType string, ratemode, pushValue int64, times []string) bool {
+func (this *PushSetService) Update(item, setType, pushType string, ratemode, pushValue, interested int64, times []string) bool {
 	set := map[string]interface{}{}
 	switch setType {
 	case "pushRoute":
@@ -27,11 +27,15 @@ func (this *PushSetService) Update(item, setType, pushType string, ratemode, pus
 			fmt.Sprintf("o_pushset.%s.%s", item, pushType): pushValue,
 		}
 		break
-	default:
+	case "a_times":
 		set = map[string]interface{}{
 			fmt.Sprintf("o_pushset.%s.a_times", item):    times,
 			fmt.Sprintf("o_pushset.%s.i_ratemode", item): ratemode,
 		}
+	default:
+		set = map[string]interface{}{
+			"o_pushset.i_interested": interested,
+		}
 	}
 	update := false
 	if this.PositionType == 0 {
@@ -57,6 +61,11 @@ func (this *PushSetService) Find() map[string]*bxsubscribe.PushSet {
 	powerData := IC.Middleground.PowerCheckCenter.Check("10000", this.UserId, this.BaseUserId, this.AccountId, this.EntId, this.PositionType, this.PositionId)
 	if pushSetList != nil && len(*pushSetList) > 0 {
 		o_pushset, _ := (*pushSetList)["o_pushset"].(map[string]interface{})
+		if o_pushset != nil {
+			pushSet["interested"] = &bxsubscribe.PushSet{
+				Interested: common.Int64All(o_pushset["i_interested"]),
+			}
+		}
 		fool, o_subset := pushSetMontage(o_pushset["o_subset"], "o_subset", powerData)
 		if fool {
 			pushSet["o_subset"] = o_subset
@@ -119,6 +128,7 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp) (bool,
 			}
 		}
 	case "o_follow_project", "o_follow_ent":
+		a_times = append(a_times, "实时推送")
 		if data == nil || len(*data) == 0 {
 			returnData = &bxsubscribe.PushSet{
 				ATimes:    a_times,
@@ -139,6 +149,7 @@ func pushSetMontage(in interface{}, name string, powerData *pb.CheckResp) (bool,
 			}
 		}
 	case "o_entinfo", "o_newproject_forecast":
+		a_times = append(a_times, "实时推送")
 		if powerData.Member.Status > 0 {
 			if data == nil || len(*data) == 0 {
 				returnData = &bxsubscribe.PushSet{

+ 29 - 9
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go

@@ -3142,12 +3142,13 @@ type PushSet struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	ATimes    []string `protobuf:"bytes,1,rep,name=a_times,json=aTimes,proto3" json:"a_times,omitempty"`
-	IWxpush   int64    `protobuf:"varint,2,opt,name=i_wxpush,json=iWxpush,proto3" json:"i_wxpush,omitempty"`
-	IApppush  int64    `protobuf:"varint,3,opt,name=i_apppush,json=iApppush,proto3" json:"i_apppush,omitempty"`
-	IMailpush int64    `protobuf:"varint,4,opt,name=i_mailpush,json=iMailpush,proto3" json:"i_mailpush,omitempty"`
-	IRatemode int64    `protobuf:"varint,5,opt,name=i_ratemode,json=iRatemode,proto3" json:"i_ratemode,omitempty"`
-	IsWxShow  int64    `protobuf:"varint,6,opt,name=isWxShow,proto3" json:"isWxShow,omitempty"`
+	ATimes     []string `protobuf:"bytes,1,rep,name=a_times,json=aTimes,proto3" json:"a_times,omitempty"`
+	IWxpush    int64    `protobuf:"varint,2,opt,name=i_wxpush,json=iWxpush,proto3" json:"i_wxpush,omitempty"`
+	IApppush   int64    `protobuf:"varint,3,opt,name=i_apppush,json=iApppush,proto3" json:"i_apppush,omitempty"`
+	IMailpush  int64    `protobuf:"varint,4,opt,name=i_mailpush,json=iMailpush,proto3" json:"i_mailpush,omitempty"`
+	IRatemode  int64    `protobuf:"varint,5,opt,name=i_ratemode,json=iRatemode,proto3" json:"i_ratemode,omitempty"`
+	IsWxShow   int64    `protobuf:"varint,6,opt,name=isWxShow,proto3" json:"isWxShow,omitempty"`
+	Interested int64    `protobuf:"varint,7,opt,name=interested,proto3" json:"interested,omitempty"`
 }
 
 func (x *PushSet) Reset() {
@@ -3224,6 +3225,13 @@ func (x *PushSet) GetIsWxShow() int64 {
 	return 0
 }
 
+func (x *PushSet) GetInterested() int64 {
+	if x != nil {
+		return x.Interested
+	}
+	return 0
+}
+
 type SetPushSetReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -3240,6 +3248,7 @@ type SetPushSetReq struct {
 	PushType     string   `protobuf:"bytes,9,opt,name=pushType,proto3" json:"pushType,omitempty"`
 	Times        []string `protobuf:"bytes,10,rep,name=times,proto3" json:"times,omitempty"`
 	PushValue    int64    `protobuf:"varint,11,opt,name=pushValue,proto3" json:"pushValue,omitempty"`
+	Interested   int64    `protobuf:"varint,12,opt,name=interested,proto3" json:"interested,omitempty"`
 }
 
 func (x *SetPushSetReq) Reset() {
@@ -3351,6 +3360,13 @@ func (x *SetPushSetReq) GetPushValue() int64 {
 	return 0
 }
 
+func (x *SetPushSetReq) GetInterested() int64 {
+	if x != nil {
+		return x.Interested
+	}
+	return 0
+}
+
 var File_bxsubscribe_proto protoreflect.FileDescriptor
 
 var file_bxsubscribe_proto_rawDesc = []byte{
@@ -3778,7 +3794,7 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
 	0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
 	0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
-	0x02, 0x38, 0x01, 0x22, 0xb4, 0x01, 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x12,
+	0x02, 0x38, 0x01, 0x22, 0xd4, 0x01, 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x12,
 	0x17, 0x0a, 0x07, 0x61, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
 	0x52, 0x06, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x5f, 0x77, 0x78,
 	0x70, 0x75, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x57, 0x78, 0x70,
@@ -3789,7 +3805,9 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x1d, 0x0a, 0x0a, 0x69, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20,
 	0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x52, 0x61, 0x74, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x1a,
 	0x0a, 0x08, 0x69, 0x73, 0x57, 0x78, 0x53, 0x68, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x08, 0x69, 0x73, 0x57, 0x78, 0x53, 0x68, 0x6f, 0x77, 0x22, 0xaf, 0x02, 0x0a, 0x0d, 0x53,
+	0x52, 0x08, 0x69, 0x73, 0x57, 0x78, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e,
+	0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
+	0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x22, 0xcf, 0x02, 0x0a, 0x0d, 0x53,
 	0x65, 0x74, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 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,
@@ -3808,7 +3826,9 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x70, 0x75, 0x73, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65,
 	0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1c,
 	0x0a, 0x09, 0x70, 0x75, 0x73, 0x68, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x09, 0x70, 0x75, 0x73, 0x68, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x32, 0xf9, 0x07, 0x0a,
+	0x03, 0x52, 0x09, 0x70, 0x75, 0x73, 0x68, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
+	0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0xf9, 0x07, 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,