Explorar o código

wip:无数据

wangshan hai 9 meses
pai
achega
fd38438ef9

+ 2 - 1
jyBXCore/rpc/internal/logic/purchasesearchlogic.go

@@ -50,7 +50,8 @@ func (l *PurchaseSearchLogic) PurchaseSearch(in *bxcore.PurchaseReq) (*bxcore.Pu
 			}
 		}
 		if flag < 0 {
-			return &bxcore.PurchaseResp{}, fmt.Errorf("暂无数据")
+			log.Println("--并发队列--", fmt.Errorf("暂无数据"))
+			return &bxcore.PurchaseResp{}, nil
 		}
 	}
 	list, err := ps.GetPurchaseData()

+ 3 - 2
jyBXCore/rpc/service/purchase.go

@@ -449,9 +449,10 @@ func (p *Purchase) FindDataFromES() (int64, []map[string]interface{}, error) {
 		HighLight:  false, //是否高亮正文
 	}
 	total, list = biddingSearch.GetAllByNgramWithCount(es.LoginTypePay)
-	fmt.Println(total, "-------------------", list)
+	log.Println(total, "---------222----------", list)
 	if total == 0 || list == nil {
-		return 0, nil, fmt.Errorf("暂无数据")
+		log.Println(fmt.Errorf("暂无数据"))
+		return 0, nil, nil
 	}
 	return total, *list, err
 }