瀏覽代碼

fix:数据导出

duxin 2 年之前
父節點
當前提交
493cfaf338
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 0
      jyBXSubscribe/rpc/internal/logic/bypushhistorylogic.go
  2. 2 2
      jyBXSubscribe/rpc/model/push.go

+ 1 - 0
jyBXSubscribe/rpc/internal/logic/bypushhistorylogic.go

@@ -83,6 +83,7 @@ func (l *ByPushHistoryLogic) ByPushHistory(in *bxsubscribe.SubscribeInfosReq) (*
 			listMap[pushData.XId] = strings.Join(pushData.MatchKeys, ",")
 		}
 	}
+	logx.Info("数据导出搜索条数与去重后对比+++++++++++++", len(list), len(listMap))
 	//获取id与对应关键词
 	for k, v := range listMap {
 		if xid := util.DecodeId(k); len(xid) > 0 {

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

@@ -103,7 +103,7 @@ type SubPushQueryParam struct {
 }
 
 func (spqp *SubPushQueryParam) IsEmpty() bool {
-	return spqp.SelectTime == "" && spqp.Area == "" && spqp.City == "" && spqp.Buyerclass == "" && spqp.Subscopeclass == "" && spqp.Subtype == "" && spqp.Key == "" && spqp.Price == "" && spqp.FileExists == ""
+	return (spqp.SelectTime == "" || spqp.SelectTime == "all") && spqp.Area == "" && spqp.City == "" && spqp.Buyerclass == "" && spqp.Subscopeclass == "" && spqp.Subtype == "" && spqp.Key == "" && spqp.Price == "" && spqp.FileExists == ""
 }
 
 type subscribePush struct {
@@ -267,7 +267,7 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 			result = subPush.Datas[start:end]
 		}
 		total = int64(length)
-	} else if spqp.IsEmpty() && (spqp.PageNum-1)*spqp.PageSize < 250 && len(spqp.SelectInfoIds) == 0 { //全部,没有过滤条件 之前缓存5页*50条=250
+	} else if spqp.IsEmpty() && (spqp.PageNum-1)*spqp.PageSize < 250 && len(spqp.SelectInfoIds) == 0 && !spqp.Export { //全部,没有过滤条件 之前缓存5页*50条=250 非数据导出
 		logx.Info("a2:", s.allKey(spqp.UserId))
 		allCache := &SubPush{}
 		var err error