WH01243 1 ano atrás
pai
commit
0e25f38627
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      jyBXSubscribe/rpc/model/push.go

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

@@ -318,9 +318,6 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam, bsp *ViewCondition) (hasN
 			}
 		}
 	}
-	/*result, total = s.inactiveQuery(spqp, bsp)
-	hasNextPage = len(result) >= spqp.PageSize
-	return*/
 	//不活跃用户处理
 	if spqp.UserType == "fType" && spqp.PositionType == 0 && spqp.SubPushInactive == 1 {
 		result, total = s.inactiveQuery(spqp, bsp)
@@ -417,6 +414,9 @@ func (s *subscribePush) inactiveQuery(spqp *SubPushQueryParam, bsp *ViewConditio
 		list = elastic.Get("bidding", "bidding", fmt.Sprintf(query, strings.Join(spqp.SelectInfoIds, `","`), len(spqp.SelectInfoIds)))
 		count = gconv.Int64(len(*list))
 	} else {
+		if len(bsp.Keyword) == 0 {
+			return []*bxsubscribe.SubscribeInfo{}, int64(0)
+		}
 		//通过条件查询
 		starttime := int64(0)
 		endtime := int64(0)
@@ -476,7 +476,7 @@ func (s *subscribePush) inactiveQuery(spqp *SubPushQueryParam, bsp *ViewConditio
 			if infotype == "" {
 				infotype = common.ObjToString(m["toptype"])
 			}
-			area := common.If(m["area"] == nil, nil, common.If(common.ObjToString(m["area"]) == "A", "全国", ""))
+			area := common.If(m["area"] == nil, "", common.If(common.ObjToString(m["area"]) == "A", "全国", common.ObjToString(m["area"])))
 			formatInfo = &bxsubscribe.SubscribeInfo{
 				XId:          encrypt.EncodeArticleId2ByCheck(infoid),
 				Title:        common.InterfaceToStr(m["title"]),