Эх сурвалжийг харах

Merge branch 'dev/v1.1.51_dx' of BaseService/jyMicroservices into feature/v1.1.51

duxin 1 жил өмнө
parent
commit
f3b77b5945

+ 5 - 1
jyBXCore/rpc/entity/search.go

@@ -97,7 +97,11 @@ func (kws *KeyWordsSearch) GetBidSearchListByCache(in *bxcore.SearchReq) (list [
 		if count > limitCount {
 			count = limitCount
 		}
-		list = l[(in.PageNum-1)*in.PageSize : in.PageNum*in.PageSize]
+		if len(l) >= int(in.PageNum*in.PageSize) {
+			list = l[(in.PageNum-1)*in.PageSize : in.PageNum*in.PageSize]
+		} else {
+			list = l[(in.PageNum-1)*in.PageSize:]
+		}
 		//是否收藏
 		util.MakeCollection(in.UserId, list)
 	}