Browse Source

Merge branch 'dev/v1.1.48_wjh' of BaseService/jyMicroservices into feature/v1.1.48

wangjianghan 1 year ago
parent
commit
46ca0cfb64

+ 1 - 0
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -346,6 +346,7 @@ message PushSet{
   int64 i_ratemode = 5;
   int64 isWxShow = 6;
   int64 interested = 7;
+  int64 isMailShow = 8;
   int64 i_nomsgtip=9;
   int64 i_apppush_tip=10;
 }

+ 7 - 7
jyBXSubscribe/rpc/model/push.go

@@ -2250,17 +2250,17 @@ func (s *subscribePush) SubRecList(userId string, keyword []ViewKeyWord) (hasNex
 		if ids, ok := (*infos)[0]["infoids"].([]interface{}); ok && len(ids) > 0 {
 			length := len(ids)
 			resultList = make([]*bxsubscribe.SubscribeInfo, length)
-			for i, id := range ids {
-				info, b := IC.MgoBidding.FindOneByField("bidding", bson.M{"autoid": id}, bidField)
-				if b && info != nil && len(*info) > 0 {
-					title := strings.Replace(common.ObjToString((*info)["title"]), " ", "", -1)
+			binfo, _ := IC.MgoBidding.Find("bidding", bson.M{"autoid": bson.M{"$in": ids}}, `{"publishtime": -1}`, bidField, false, -1, -1)
+			if binfo != nil && len(*binfo) > 0 {
+				for i, m := range *binfo {
+					title := strings.Replace(common.ObjToString(m["title"]), " ", "", -1)
 					matchkeys := getKeys(title, keyword)
 					resultList[i] = s.InfoFormat(&PushCa{
-						InfoId:     mongodb.BsonIdToSId((*info)["_id"]),
+						InfoId:     mongodb.BsonIdToSId(m["_id"]),
 						Date:       time.Now().Unix(),
 						Keys:       matchkeys,
-						FileExists: (*info)["filetext"] != nil,
-					}, info, false)
+						FileExists: m["filetext"] != nil,
+					}, &m, false)
 				}
 			}
 			total = int64(len(resultList))

+ 12 - 2
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go

@@ -3347,6 +3347,7 @@ type PushSet struct {
 	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"`
+	IsMailShow  int64    `protobuf:"varint,8,opt,name=isMailShow,proto3" json:"isMailShow,omitempty"`
 	INomsgtip   int64    `protobuf:"varint,9,opt,name=i_nomsgtip,json=iNomsgtip,proto3" json:"i_nomsgtip,omitempty"`
 	IApppushTip int64    `protobuf:"varint,10,opt,name=i_apppush_tip,json=iApppushTip,proto3" json:"i_apppush_tip,omitempty"`
 }
@@ -3432,6 +3433,13 @@ func (x *PushSet) GetInterested() int64 {
 	return 0
 }
 
+func (x *PushSet) GetIsMailShow() int64 {
+	if x != nil {
+		return x.IsMailShow
+	}
+	return 0
+}
+
 func (x *PushSet) GetINomsgtip() int64 {
 	if x != nil {
 		return x.INomsgtip
@@ -4597,7 +4605,7 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x23, 0x0a, 0x08,
 	0x54, 0x69, 0x6d, 0x65, 0x4a, 0x73, 0x6f, 0x6e, 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, 0x22, 0x97, 0x02, 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x12, 0x17, 0x0a,
+	0x73, 0x22, 0xb7, 0x02, 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, 0x75, 0x73,
@@ -4610,7 +4618,9 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x69, 0x73, 0x57, 0x78, 0x53, 0x68, 0x6f, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 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, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x5f, 0x6e, 0x6f,
+	0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x4d, 0x61,
+	0x69, 0x6c, 0x53, 0x68, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x73,
+	0x4d, 0x61, 0x69, 0x6c, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x5f, 0x6e, 0x6f,
 	0x6d, 0x73, 0x67, 0x74, 0x69, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x4e,
 	0x6f, 0x6d, 0x73, 0x67, 0x74, 0x69, 0x70, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x5f, 0x61, 0x70, 0x70,
 	0x70, 0x75, 0x73, 0x68, 0x5f, 0x74, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,